java-ee

E-commerce web site with J2EE

hello everybody, I need to create a Ecommerce web site with J2EE. So any one has a source code, tutorial any things can help. ...

How to setup Eclipselink with JPA?

The Eclipselink documentation says that I need the following entries in my pom.xml to get it with Maven: <dependencies> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>eclipselink</artifactId> <version>2.0.0</version> <scope>compile</scope> ... </dependency> <dependencies> ... <reposi...

EJB and asynchronous processing

I need to execute some stuff asynchronously after a EJB method is called. This need seems to be fulfilled in EJB 3.1 but unfortunately we're not there yet and have to use 3.0 version. What would you suggest as the simplest way and are there caveats? I can think of the following approaches: JMS (maybe overkill) TimerService (looks sim...

Calendar Control in Java

How can i control calendar user interface in java? My current project needs to provide calendar in web. User can control public holiday, block day and so on when client choose to book. So i need to provide calendar control with java. ...

Use external jars in EJB (JBoss)

I want to use two external jars from EJB: jar #1 - all interfaces of the EJB (home, remote etc) jar #2 - some types which I use inside my EJB What should I do to achieve this? If I put this jars inside ear it doesn't work, and JBoss throws NoClassFoundException ...

JPA in distributed Java EE configuration

Hello, I'm developing a JEE application to run on Glassfish: Database (javaDB, MS SQL, MySQL or Oracle) EJB layer with JPA (Toplink essentials - from Glassfish) for database access JSF/Icefaces based web UI accessing the EJB layer The application will have a lot of concurrent web client, so I want to run it on different physi...

Create a web project from an ant buildfile in Eclipse

A guy at work needs to import an existing Java webapp into Eclipse. When he imports it from the Ant buildfile it creates a normal Java project instead of a web project. I think he also said it doesn't import the struts and faces? Something like that. Is there a way to create a web project in Eclipse EE from an Ant buildfile? If so, ...

Type of object returned by an input from a web page

I'm attempting to upload a file into a jsp and then use the file in some other code. My problem is that it comes into the servlet as an Object via the request.getAttribute() call so I don't know what to cast it to. I have this code so far to try and test what it is but I'm getting a NullPointerException. test.jsp <%@ page language="j...

JAX-WS, Weblogic interoperability problem - No start attachment specified in the Multipart/Related document

Hi all! I'm trying to use JAX-WS on WebLogic 10.3 as a WS Client consuming a Web Service on a WebLogic 9.2 server. The problem I have is that when I add an attachment part in a SOAPHandler, the JAX-WS implementation does not include a Start parameter in the Content-Type header. Apparently this should not be needed, but the WS implement...

Business Logics on the client side

Why do people say that business logics should be implemented on the server side code (e.g. EJB) and not on the client application code? The example that I have in mind is a business object validation on a EJB based architecture. Does it really have to be delegated to the EJB or is it ok to run it on the client before the object is sent...

Auto login on website

I'm working on an application which consists of a Web Application and a Standalone Application. Both of the applications use the same database and require authentication and authorization. Within the Standalone Application a web browser needs to be opened, going to a page within the Web Application. This page is for authorized users onl...

Inject a EJB into JAX-RS (RESTfull service)

I'm trying to inject Stateless EJB into my JAX-RS webservice via Annotations. Unfortunately the EJB is just null and I get a NullPointerException when I try to use it. @Path("book") public class BookResource { @EJB private BookEJB bookEJB; public BookResource() { } @GET @Produces("application/xml") @Path(...

Flex+JPA/Hibernate+BlazeDS+MySQL how to debug this monster?!

Ok so I'm making a "simple" web app using the technologies from the topic, recently I found http://www.adobe.com/devnet/flex/articles/flex_hibernate.html so I'm following it and I try to apply it to my app, the only difference being I'm working on a Mac and I'm using MAMP for the database (so no command line for me). The thing is I'm ha...

httpOnly Session Cookie + Servlet 3.0 (e.g. Glassfish v3)

By default, Glassfish v3 doesn't set the httpOnly flag on session cookies (when created as usual with request.getSession()). I know, there is a method javax.servlet.SessionCookieConfig.setHttpOnly(), but I'm not sure, if that's the best way to do it, and if yes, where the best place would be to put that line. BTW, of course it can't be...

Available J2ee Frameworks

Hi All, I am working in Struts 1.6. I want to learn good, scopeful new j2ee technologies. Anyone can help me out what are the technologies available to J2ee first and which one is best. Thanks ...

Java EE 6.0 and .NET 4.0 comparison

We are running our applications on .NET 3.5 and are planning on either updating to .NET 4.0 or switching entirely to the Java platform, Java EE 6.0, as we've heard from some clients that "it's better." Can anyone either explain some of the large differences between the two platforms and maybe what kind of costs would be associated with ...

How to get deployed jars in Jboss

How can I get the list of jars deployed in JBoss? I want to compile some classes at runtime in EJB, but they may use some of the deployed jars, so I need to specify classpath during compilation. ...

Java session facade not being found via InitialContext lookups

I have a project that is Java EE 5 running on Glassfish. The IDE is Netbeans 6.7.1. We periodically have a very annoying problem with new session facades not being located via InitialContext: javax.naming.NameNotFoundException: No object bound to name java:comp/env/GlobalConfigEntityFacadeLocal In my class (within the same EJB contai...

MVC architecture EJB funcionallity

HI would like to understand how do ejbs work in an MVC architecture, what i do not get is: When the web app starts, the system creates an ejb for each record in every table of db or an ejb with all the records of all tables? Thank you very much ...

How to Get JSF 2.0 Working with Eclipse 3.5 and JBoss 5.1

I am running Eclipse 3.5 and JBoss 5.1. I want to create a JSF 2.0 project. I heard here that the Eclipse JBoss Tools plugin version 3.1 (available here) could do this for me. I have installed the plugin. However, if I go to the Project Facets properties page for a Dynamic Web Project, I only see Facets for JavaServer Faces 1.1 and 1...