Loading
JSP pre compilation

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  What is JSP pre-compilation ? What is the advantage of this?


Ans)

Due to compilation JSPs load very slow when accessed first time and could be a Performance issue. So we could avoid this and improve the performance by doing pre-compilation the JSPs and create the classes and ship them as part of Build artifacts like  WAR file .

This Pre-Compilation could be done different ways, most of the Application Servers have their own built in configuration TAGs to achieve this.

For Weblogic, you should have this in weblogic.xml
<jsp-param>
<param-name>precompile</param-name>
<param-value>true</param-value>

</jsp-param>


For doing this using ANT target, do the following, you have to use JASPER ant task.
<target name="jspc">
<jasper2
validateXml="false"
uriroot="${build.war.dir}"
webXmlFragment="${build.war.dir}/WEB-INF/generated_web.xml"
addWebXmlMappings="true"
outputDir="${build.src.dir}" />

</target>



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

JSP pre compilation


JSP pre compilation

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free