[jboss-user] [Installation, Configuration & Deployment] - EAR Deployment, Third-party libraries and Struts

KooKoolen do-not-reply at jboss.com
Thu Dec 14 20:25:29 EST 2006


Hello everybody,

I'm currently developing a J2EE software which uses EJB3 for the business layer and a web front-end to access and input data.
I started developping the two modules separately and deploying them separately. It worked fine.

Now, I want to package them in a single EAR file. Since they share third-party libraries, I put those libraries in the lib directory at the root of my EAR archive and declared those JARs int the MANIFEST of both the web module and the EJB module (but not in the EAR MANIFEST, should I ?).

When deploying th EAR, the deployment goes well (no errors). That means third-party libraries are taken into account by the EJB module since it needs some of them at startup.

The problem arises when accessing the web front-end. My web module uses the Struts framework. I tried two different packaging:

- struts-core.jar and struts-taglibs.jar are in the WEB-INF/lib directory of my web module.
 Jasper throws a compilation exception with the following message:

  | org.apache.jasper.JasperException: Unable to compile class for JSP
  | 
  | Generated servlet error:
  | The method _jspx_meth_bean_message_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (HtmlTag, PageContext)
  | 
  | Generated servlet error:
  | The method _jspx_meth_html_base_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (HtmlTag, PageContext)
  | 
  | Generated servlet error:
  | The method _jspx_meth_html_rewrite_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (HtmlTag, PageContext)
  | 
  | Generated servlet error:
  | The method _jspx_meth_bean_message_1(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (HtmlTag, PageContext)
  | 
  | Generated servlet error:
  | The method _jspx_meth_bean_write_0(JspTag, PageContext) in the type index_jsp is not applicable for the arguments (MessagesTag, PageContext)
  | 
  | Generated servlet error:
  | javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN cannot be resolved
  | 
  | Generated servlet error:
  | The method doAfterBody() is undefined for the type MessagesPresentTag
  | 
  | Generated servlet error:
  | javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN cannot be resolved
  | 
The message is longer but they are all similar to the preceding.

- struts-core.jar and struts-taglibs.jar are in the lib directory of the EAR archive and referenced in the classpath entry of the MANIFEST for the web module
The web container throws an exception saying it can't find Struts TLDs nor in the web.xml, nor in the JARs packaged in the application.
So I tried to extract Struts TLDs, put them in my WEB-INF and referencing them in my web.xml and then I get the same error than the first packaging solution I tried.

I also tried to isolate the EAR classloading by setting true in the EAR deployer configuration but that way it can not even deploy my EAR.

Thanks for your answers and for the great job you do,
Sylvain

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994087#3994087

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994087



More information about the jboss-user mailing list