jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "WebLogic ear deployment and jsp packaging" Watch "WebLogic ear deployment and jsp packaging" New topic

WebLogic ear deployment and jsp packaging

Danny Vittal

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: 232

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.



Dhanaraj K

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

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.



Hope it helps.
I agree. Here's the link: http://aspose.com/file-tools
subject: WebLogic ear deployment and jsp packaging
It's not a secret anymore!