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?
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.
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.
Joined: Nov 29, 2004
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.