j2ee

How to load themes from a database in Spring MVC based on user-agent , etc

Hi I am brand new to Spring web MVC. I am trying to create a simple 1 paged site that will check the users browser and display the current theme for that browser. If its a mobile app, I need to allow the user a button to switch to the regular site. Also the current theme for mobile and non-mobile is stored in a database, which inclu...

Tomcat 6 - The requested resource ... is not available.

I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file <?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.su...

Java Unicode problem

Hi there. My question would be what's wrong with the next code? I'm trying with j2ee to read some unicode from a database and some characters are returned as the famous question mark. try { Class.forName("com.mysql.jdbc.Driver"); String connectionUrl = "jdbc:mysql://localhost/hortimart?" + ...

EJB Spec Violation

I created an EJB 2 named EvenementBean for test. I then deleted it. and whenever trying to deploy my .ear project now, I get these errors : WARN [verifier] EJB sepc violation: Bean: Evenement Section: 22.2 Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterpri...

EJB client error

I created an EJB 2. I deployed it on JBoss-IDE 1.6 and then, I created a JUnit test to access it. here's the code I used for the client : public class DossierBeanTest extends TestCase { protected DossierHome dossierHome; protected Dossier dossier; public DossierBeanTest(String argo){ super(...

How to merge wars into one?

In our company, we have a number different modules constructed as separate wars. Each client can pick and choose module he wishes to buy. Since all modules share same session, security context etc, it makes sense to merge them into a single war. Is it possible to automate this process? For example, it should merge web.xml, calculate e...

Pattern to model a business object in Seam framework ?

Hi, I habe been studying Seam framework for a long time. Altough i do not use it at work, i like its approach. It is very interesting. But i have some doubts. After reading Seam in Action book, i think it is not possible you bind more than one parameter to a business method. Something like @Stateless public class BusinessObjectImpl imp...

Display popup message when user login to site in J2EE(Filters)

Hi, I would like to show a popup message to the users when ever login to my site, only when login( later on it is not required). we are using java/j2ee for my application, and authentication provided using the Filters, once login success we are redirecting the request to the requested page(it is not the same always it depends on user a...

Threads in a J2EE application

I have a J2EE application that has two components: First is a service that scrapes some information from internet and fills it into database. Second is a web interface (deployed on tomcat) from where user can browse that information. What could be the best approach to implement the first component? Should it be run as a background Daemo...

Hibernate QueryException couldn't resolve property

I have this .hbm.xml file : Evenement.hbm.xml : <hibernate-mapping package="com.af.evenement"> <class name="Evenement" table="TB_EVENEMENT"> <id name="id" type="string" column="CODE_EVENEMENT"> <generator class="assigned" /> </id> <set name="causesAnnexes"> <...

Steps to develop a website

What are the aspects to be considered when I want to develop a website using J2EE application server and a database for back end, I am looking for an answer that can guide me through the steps required to get the site set up- ...

Mapping a directory outside the web-app to URL in TOMCAT

Hi, I need to map an directory containing images which resides outside tomcat webapps folder, so that application can serve those images. I am making a J2EE Web application running under tomcat 6. User can upload/delete images in the application. Currenly I store these images to a directory under application's WebContent folder, but I...

Quality references for Servlet session management documentation

What are the best, most up to date references to have handy for J2EE session management principles and practice? Thank you. ...

Using rownum in EJBQL for Pagination CMP 2.1

I need to implement Pagintion of CMP2.1 Entity Beans. Is it possible to do it using EJB-QL ? Am using weblogic10.3 + Oracle DB. I was planning to use "rownum >= min_row_size + PreparedQUery.setMaxResult()" to get desired result . But rownum in EJB-QL is not recognized by weblogic . Is there any way to specify psuedo column in EJb-QL ? ...

How to create EJB 2.1 beans in Eclipse 3.5

I am not able to create EJB 2.1 beans using a wizard in the latest version of Eclipse. I only see options to create EJB 3.0 beans. I selected 2.1 as the 'EJB Module Version' while creating the "EJB Project". But now when I want to create a session bean, I don't see any option to create a 2.1 bean. Is there a plugin/setting I need to en...

Javassist Enhancement failed

I use Jboss IDE as IDE. I have created a Hibernate project. and I get this error when deploying my .har (Hibernate project) : 16:16:30,910 ERROR [BasicLazyInitializer] Javassist Enhancement failed: com.afrikbrain.iard.srv.ref.AssGarantieProduit java.lang.NullPointerException at org.jboss.mx.loading.RepositoryClassLoader.findClass(Repos...

How to call an EJB from another EJB ?

I use jboss-IDE. so, I created a project with many EJB's in the same project. now, I need a functionality exposed by EJB A in EJB B. so, I need to call EJB A in EJB B. How do I do that ? P.S : dealing with EJB 2. ...

Huge EAR deployment

Hello all, I'm trying to figure out how to deploy a huge (40-50 MB) EAR file to the server through a rather slow VPN connection. The EAR contains EJB and WAR projects created in Glassfish, and 90% of the file size is from external dependency libraries used. Has anyone came up with a strategy for elegant deployment to production system...

Problem creating bean of sessionFactory in spring-hibernate configuration

Hello, I am using spring and hibernate for configuration with mysql db. My we.xml file has following code : <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun....

J2EE - JPA - EJB3 - Transactions in MDB methods

Hi, I have resource local datasource (Oracle9i) deployed at JBoss 5.1.0: <datasources> <local-tx-datasource> <jndi-name>OracleDS</jndi-name> <connection-url>jdbc:oracle:thin:@IP_ADDRESS:1521:inv9i</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>***</user-name> <password>***<...