Two Laptop Bag*
The moose likes BEA/Weblogic and the fly likes WebLogic ear deployment and jsp packaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WebLogic ear deployment and jsp packaging" Watch "WebLogic ear deployment and jsp packaging" New topic
Author

WebLogic ear deployment and jsp packaging

Danny Vittal
Greenhorn

Joined: Feb 24, 2005
Posts: 10
As part of the build process, I have pre-compiled all the jsps and placed inside the war/WEB-INF/classes/jsp_servlet folder. My intention is not to supply the jsp source with the ear. I like to pack only the compiled jsp's generated .class files with the ear.

When I do not pack the jsps in the ear. I get 404 file not found exception for the jsps. But I have all the compiled jsps, class files present inside WEB-INF/classes/jsp_servlet folder.

Whether it is mandatory to supply the jsp source with the ear for WebLogic to work?

Any help or suggestion is greatly appreciated.
German Gonzalez-Morris
Ranch Hand

Joined: Nov 16, 2009
Posts: 184

Yes, JSPs are mandatory to be packaged into the war file.
You cannot remove them, they are considered a resource that can be reach by the browser, then later will be compiled (if necessary).

The only solution will be to separate the tiers. Your presentation tier with logical/business one.
You can use any of the know MVC frameworks. Or even to use Servlets/POJOs and leave your JSPs only as presentation.

Regards,

German

http://devwebcl.blogspot.com/
Dhanaraj K
Greenhorn

Joined: Nov 29, 2004
Posts: 9
Thank you for the response.

I was doing this exercise as part of the product migration project from OC4J (Oracle Application Server) to WebLogic. We used to supply only the jsp's generated classes in the ear for OC4J deployment and it used to work. I was trying to do the same for WebLogic deployment as well.

The release team expectation is to supply only the generated class files rather than the source. Since this is being done for all the OC4J customers, the same was expected for me to do for WebLogic release as well.

Once I moved the jsp source to the ear, and enabled <wls:precompile>true</wls:precompile> in weblogic.xml, the deployment times out due to the deployment time. <BEA-240003> <Console encountered the following error java.lang.RuntimeException: Timed out waiting for completion.

Any suggestions.
>
Dhanaraj K
Greenhorn

Joined: Nov 29, 2004
Posts: 9
Looks like there is an option in WebLogic not to supply the JSP source. The ear can be packaged with the jsp generated .class files alone.

I was going through Oracle documentation and we can achieve this by changing the default JSPServlet with JSPClassServlet. I added the below servlet mapping to my application web.xml. Now I am not able to deploy in OC4J after this addition due to common code base. Need to find a way.

<servlet>
<servlet-name>JSPClassServlet</servlet-name>
<servlet-class>weblogic.servlet.JSPClassServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>JSPClassServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>

Hope it helps.
 
jQuery in Action, 2nd edition
 
subject: WebLogic ear deployment and jsp packaging