How to pre-compile JSP?

Does anyone know how to pre-compile JSP so as to get faster browsing response?

I know little about JSPs but from what I can remember, JSPs are compiled first time when they are being asked to be executed .Unless changes are made to those programs they would not be compiled, as a result of that, it would run faster. Correct me if I am wrong though

Similar Messages

  • How to pre-compile jsp and deploy to tomcat

    Hi All,
    I wuld like to know how to pre-compile JSPs and deploy to tomcat. I am using ANT tool to build and deploy the war file.
    Thanks in Advance.
    Regards,
    --Nagesh.                                                                                                                                                                                                                                                                                                                                               

    for Tomcat 5.0 (You'll need to edit to fit your needs)
        <path id="jsp.classpath">       
            <!-- point classpath to directory containing jasper-compiler.jar and
                   jasper-runtime.jar -->
            <fileset dir="C:\tomcat\common\lib">
                <include name="**/*.jar"/>
            </fileset>
            <fileset dir="C:/tomcat/common/endorsed">
                <include name="**/*.jar"/>
            </fileset>       
        </path> 
        <target name="jsp" >
        <!--
             The Ant JSPC task doesn't work with Tomcat 5.0
             so in the meantime we need to define our own task.
          -->
        <taskdef name="jspc50" classname="org.apache.jasper.JspC">
            <classpath>
                    <path refid="jsp.classpath"/>    
            </classpath>
        </taskdef>
        <jspc50 outputDir="${build.classes}"
                package="jsp"
                uriroot="${project.dir}/web/webApp"
                webXmlFragment="c:/web.xml"
                verbose="9"
                validateXml="false">           
        </jspc50>
        <javac srcdir="${build.classes}/jsp"
               destdir="${build.classes}"
               debug="true"
               optimize="false"
               includes="**/*.java"
               source="1.4">
                <classpath>
                    <path refid="classpath"/>
                    <path refid="jsp.classpath"/>
                </classpath>          
        </javac>
    </target>    More information can be found here :
    http://www.onjava.com/pub/a/onjava/excerpt/AntTDG_chap8/index1.html?page=last

  • Pre-Compiled JSP

    Hi All,
    Can anyone tell me, how to pre-compile jsp and deploy it in Tomcat and Websphere and also how stop the app server recompiling the JSP at runtime. Searched the net for but was not really that successful.

    Read the documentation that come along the application server. For Tomcat it's for example this: [http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html].

  • How to pre-compile a JSP

    Hi all,
    I struckup with a doubt as fallows
    How to pre-compile a JSP to Servlet(.class file) bfore the first request ,so that the first response takes same time as later responses.

    Thanx Ram for ur response,
    I know Tomcat is assembled with Jasper compiler.My actual doubt is I want to precompile the Jsp bfore the first request. Actually the compilation occurs at the time of first request.U said it is server specific ,can u plz s let me know the pre-compile option for WEBLOGIC Server.

  • Pre-compiled JSPs getting re-compiled by the server

    For our project we are using wlappc to pre-compile JSPs and generate EJB classes. We are using the split directory format, so this is what the task looks like -
    <target name="appCompile" depends="init" >
    <delete dir="${ear.dist}" />
    <mkdir dir="${ear.dist}" />
    <wlpackage srcdir="${ear.src}" destdir="${ear.build}"
    toDir="${ear.dist}" />
         <wlappc source="${ear.dist}" verbose="true" classpath="${classpath}" />
    </target>
    After this, we are using wldeploy to deploy the application to another server.
    This is how the task looks like -
         <target name="beadeploy" depends="init" >
         <wldeploy action="deploy"
              source="${src.dir}/dist/myapp.ear"
              name="myApplication" remote="true"
              user="${deploy.username}" password="${deploy.password}"
              verbose="true" adminurl="t3://${deploy.host}:${deploy.port}"
              upload="true"
              debug="true" targets="${deploy.target}"/>          
         </target>
    The problem that I am facing is that, even after re-compiling the JSPs, they get compiled again by the server when accessed for the first time !
    We using Weblogic 8.1.2.0. Can you please provide a soplution for this ?

    Hi,
    The following steps help you troubleshoot why you may be having problems with JSPs recompiling:
    1. When invoking jspc, your classpath must contain the same release, service-pack, and any temporary patches as the servers you wish to deploy on. Otherwise, the Server will read the JSPs as being compiled on a different version of the WebLogic, and will recompile them all.
    2. You should invoke jspc from the root directory of your open-directory exploded) WebApp or specify -webapp) and use the -d option to deploy the generated classes to the WEB-INF/classes directory. You can then archive these JSP classes into a JAR if you wish from the WEB-INF/classes directory.
    3. The JSPs should then be deployed either individually to the WEB-INF/classes/jsp_servlet directory or in a JAR file under the WEB-INF/lib directory.
    4. One other thing that could cause JSPs to be recompiled is if the timestamp of the class is different from that of the source.
    Also, if your ant classpath is different from whatever WLS-related classpath entries you use to run WLS, this may cause problems, too.
    -- Prasanna
    Prasanna Yalam

  • How to pre-compile JSF pages?

    Hi,
    I am new to JSF and would appriciate if any one can help me find out how to pre-compile JSF pages?
    Thanks in advance
    satsdn

    The same way you pre-compile JSP pages: Set it up in your faces-config.xml file.
    Here's how I do it:
         <servlet>
              <servlet-name>AcctID</servlet-name>
              <display-name>AcctID</display-name>
              <jsp-file>/AcctID.jsp</jsp-file>
              <load-on-startup>-1</load-on-startup>
         </servlet>Put one of these tags for each JSP you want to pre-compile. The -1 load-on-startup value is important.
    CowKing

  • Pre-compile jsp in Weblogic

    Hello all,
              I have been trying to add following tags in weblogic.xml to precompile my all jsps at Deployment time, but it gives me error as follows. [I am pasting messages from the console....]
              I am using WL express 7.0 and jdk1.3 that comes along with the server.
              Here is my tag:
              <jsp-descriptor>
                   <jsp-param>
                        <param-name>precompile</param-name>
              <param-value>true</param-value>
                   </jsp-param>
              </jsp-descriptor>
              What is the wrong here ? Is there any special configuration in weblogic server that I am ignoring here ?
              =======================================
              <Nov 9, 2004 9:33:32 AM EST> <Debug> <HTTP> <101211> <ppdm:jsp Precompiling JSPs at startup with JSP config [JspConfig: verbose=true,package
              Prefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\bea\user_projects\icmgdomain\.\icmgone\.wlnotdelete\icmgone_ppdm_jsp,pageChec
              kSeconds=1,superclass=weblogic.servlet.jsp.JspBase,keepgenerated=false,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,
              defaultfilename=index.jsp,compilerclass=null,noTryBlocks=false,debugEnabled=false,printNulls=true]>
              log4j:WARN No appenders could be found for logger (org.apache.struts.util.MessageResourcesFactory).
              log4j:WARN Please initialize the log4j system properly.
              <Nov 9, 2004 9:33:52 AM EST> <Error> <Deployer> <149233> <Unexpected error was encountered during the deployment process.>
              <Nov 9, 2004 9:33:52 AM EST> <Error> <Deployer> <149201> <The Slave Deployer failed to complete the deployment task with id 11 for the appli
              cation ppdm.
              java.lang.ExceptionInInitializerError: java.lang.NullPointerException
              at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
              at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
              at java.lang.Class.forName0(Native Method)

              And make sure you don't have any other patches installed!
              The generated servlet specifically checks to make sure that the servlet is running
              on the same EXACT setup (service pack, patches, etc.) that was used to generate
              it from the original JSP.
              Tim
              "Eric Ma" <[email protected]> wrote:
              >
              >Upgrade to WebLogic 6.1 SP3.
              >
              >Eric Ma
              >
              >Charley Chu <[email protected]> wrote:
              >>Did you figure out how to do it?
              >>
              >>I use weblogic.jspc in the Ant script to compile all my JSP and target
              >>the output to the WEB-INF\classes directory. Package the app into war
              >>and ear. But the server still generates the class for jsp when the jsp
              >>page is accessed on the first time.
              >>
              >>I could use deployment descriptor in weblogic.xml to pre-compile jsp
              >>when the server starts but I'd rather do it in Ant script.
              >>
              >>Any hint?
              >>
              >>Thanks!
              >
              

  • I want to know the pre compiler jsp

    please give information

    see in one interview ,i was beign asked about the pre
    compiler jsp.
    i told him that i dont know.What did he ask about it?

  • Pre-compiled JSPs when deploying an EAR under WebLogic 6.1 SP4

    Hello,
    We have sucessfully pre-compiled JSP pages when working with and
    deploying WAR files (WebLogic 6.1 SP4, Windows).
    However, we can't seem to make it work when deploying EAR files.
    Examing the "secret" unpacked directories after deployment doesn't
    seem to help.
    If we extract the WAR from the EAR and deploy it, everything is perfect.
    Any ideas? Anyone able to make this work? If so, could you share the
    output of
    jar -tf yourCoolEarFileThatWorks.ear
    as well as the same for the embedded WAR file?
    Thank you,
    Mike Leo

    Some followup information.
    We've changed the place where it looks for JSP classes using the
    "workingDir" parameter in weblogic.xml.
    And we also set "pageCheckSeconds" (also in weblogic.xml) to "-1".
    Now, everything in the base directory comes up without being recompiled.
    However, nothing in subfolders of the base directory is "picked up". Those
    pages are still being compiled when they are accessed.
    Any ideas welcome.
    Mike Leo
    On Tue, 05 Aug 2003 18:43:41 -0500, Michael Leo <[email protected]>
    wrote:
    Hello,
    We have sucessfully pre-compiled JSP pages when working with and
    deploying WAR files (WebLogic 6.1 SP4, Windows).
    However, we can't seem to make it work when deploying EAR files.
    Examing the "secret" unpacked directories after deployment doesn't
    seem to help.
    If we extract the WAR from the EAR and deploy it, everything is perfect.
    Any ideas? Anyone able to make this work? If so, could you share the
    output of
    jar -tf yourCoolEarFileThatWorks.ear
    as well as the same for the embedded WAR file?
    Thank you,
    Mike Leo

  • Problem with pre-compiling jsp's

              hi,
              we have an .ear running on wls 6.0 sp2.
              Our app has a web component(part of the .ear) as well which has tld's & jsp.We
              are following the struts framework.
              We configured the <jsp-descriptor> element in the weblogic.xml file to pre-compile
              the jsp's..but the server complains of the following
              any suggestions would be appreciated
              ==================================================================================================================================
              <Jan 9, 2002 4:00:06 PM EST> <Error> <HTTP> <[WebAppServletContext(3001228,ppp)]
              failure pre-compiling JSP's
              java.lang.NullPointerException
              at weblogic.servlet.jsp.Jsp2Java.makeReader(Jsp2Java.java:232)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:112)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253)
              at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:124)
              at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:44)
              at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletContext.java:2003)
              at weblogic.servlet.internal.dd.DescriptorLoader.initFromWebApp(DescriptorLoader.java:742)
              at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(DescriptorLoader.java:359)
              at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:467)
              at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:404)
              at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
              at weblogic.j2ee.Application.addComponent(Application.java:133)
              at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:115)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:327)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:143)
              at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
              at $Proxy44.addWebDeployment(Unknown Source)
              at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1012)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:313)
              at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:277)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:232)
              at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:192)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
              at $Proxy41.updateDeployments(Unknown Source)
              at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2299)
              at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:240)
              at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:122)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:562)
              at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:548)
              at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:285)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439)
              at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180)
              at $Proxy33.start(Unknown Source)
              at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:435)
              at weblogic.management.Admin.startApplicationManager(Admin.java:1033)
              at weblogic.management.Admin.finish(Admin.java:493)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:429)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:170)
              at weblogic.Server.main(Server.java:35)
              >
              <Jan 9, 2002 4:00:06 PM EST> <Debug> <HTTP> <Exception thrown while loading ppp:
              weblogic.utils.NestedException: failure pre-compiling JSP's - with nested exception:
              [java.lang.NullPointerException]>
              <Jan 9, 2002 4:00:06 PM EST> <Error> <J2EE> <Error deploying application ppp:
              Could not load ppp>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[HTTP myserver] Loading web app: wl_management_internal2>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[HTTP myserver] Loading wl_management_internal2
              from WAR file: C:\engr\project\ppp\.\config\Synchronoss\applications\.wl_temp_do_not_delete\wl_local_comp45831.war>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[Default WebApp] extracting classfiles
              to C:\engr\project\ppp\.\config\Synchronoss\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_wl_management_internal2:>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[Default WebApp] extracted classfiles
              successfully...>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(6559849,wl_management_internal2)]
              registering JSPServlet with initArgs '[JspConfig: verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\engr\project\ppp\.\config\Synchronoss\applications\.wl_temp_do_not_delete\WEB-INF\_tmp_war_myserver_myserver_wl_management_internal2,pageCheckSeconds=1,superclass=null,keepgenerated=false,encoding=null,defaultfilename=index.jsp,noTryBlocks=false]'>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(6559849,wl_management_internal2)]
              registering classpath servlet with initArgs 'null'>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(6559849,wl_management_internal2)]
              registering getior servlet with initArgs 'null'>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <J2EE> <Deployed : wl_management_internal2>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <J2EE> <Deployed MailSession named com.bea.wlpi.MailSession>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <Initializing WEB server myserver>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[HTTP myserver] Loading web app: DefaultWebApp_myserver>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[HTTP myserver] Loading DefaultWebApp_myserver
              from directory: .\config\Synchronoss\applications\DefaultWebApp_myserver>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(4157813,DefaultWebApp_myserver)]
              registering JSPServlet with initArgs '[JspConfig: verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\engr\project\ppp\.\config\Synchronoss\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver,pageCheckSeconds=1,superclass=null,keepgenerated=false,encoding=null,defaultfilename=index.jsp,noTryBlocks=false]'>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(4157813,DefaultWebApp_myserver)]
              registering classpath servlet with initArgs 'null'>
              <Jan 9, 2002 4:00:06 PM EST> <Info> <HTTP> <[WebAppServletContext(4157813,DefaultWebApp_myserver)]
              registering getior servlet with initArgs 'null'>
              

    [att1.html]
              

  • Failure in pre-compiling JSP's

              Hi,
              I am getting the following error while pre-compiling a jsp (showcode.jsp).
              I am using weblogic 5.1 SP8.
              Wed Oct 24 12:03:09 MDT 2001:<E> <WebAppServletContext-quote> cannot make temp
              directory '/cemr2/dev1/app/examples/j
              sp/tagext/quote/WEB-INF/_tmp_war_quote', will not be able to compile JSPs
              Wed Oct 24 12:03:09 MDT 2001:<I> <WebAppServletContext-quote> checking /showcode.jsp:
              Wed Oct 24 12:03:11 MDT 2001:<E> <WebAppServletContext-quote> failure pre-compiling
              JSP's
              java.io.FileNotFoundException: /cemr2/dev1/app/examples/jsp/tagext/quote/WEB-INF/_tmp_war_quote/examples/jsp/tagext/
              sql/_showcode.java (No such file or directory)
              at java.io.FileOutputStream.open(Native Method)
              at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled Code)
              at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled Code)
              at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled Code)
              at java.io.FileWriter.<init>(FileWriter.java, Compiled Code)
              at weblogic.servlet.jsp.Jsp2Java.makeOutputStream(Jsp2Java.java, Compiled Code)
              at weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java, Compiled
              Code)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java, Compiled
              Code)
              at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java, Compiled Code)
              at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java, Compiled Code)
              at weblogic.servlet.internal.ServletContextImpl.precompileJSPs(ServletContextImpl.java,
              Compiled Code)
              at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(DescriptorLoader.java,
              Compiled Code)
              at weblogic.t3.srvr.HttpServer.loadWARContext(HttpServer.java, Compiled Code)
              at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java, Compiled
              Code)
              at weblogic.t3.srvr.HttpServer.start(HttpServer.java, Compiled Code)
              at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
              at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java, Compiled Code)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.Server.startServerDynamically(Server.java, Compiled Code)
              at weblogic.Server.main(Server.java, Compiled Code)
              at weblogic.Server.main(Server.java, Compiled Code)
              

              << cannot make temp directory '/cemr2/dev1/app/examples/j sp/tagext/quote/WEB-INF/_tmp_war_quote',
              will not be >>
              You don't have sufficiend permission to crease directory.
              Thnaks
              Jignesh Patel
              "Sreenivas Kotapati" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am getting the following error while pre-compiling a jsp (showcode.jsp).
              >
              >I am using weblogic 5.1 SP8.
              >
              >Wed Oct 24 12:03:09 MDT 2001:<E> <WebAppServletContext-quote> cannot
              >make temp
              >directory '/cemr2/dev1/app/examples/j
              >sp/tagext/quote/WEB-INF/_tmp_war_quote', will not be able to compile
              >JSPs
              >Wed Oct 24 12:03:09 MDT 2001:<I> <WebAppServletContext-quote> checking
              >/showcode.jsp:
              >Wed Oct 24 12:03:11 MDT 2001:<E> <WebAppServletContext-quote> failure
              >pre-compiling
              >JSP's
              >java.io.FileNotFoundException: /cemr2/dev1/app/examples/jsp/tagext/quote/WEB-INF/_tmp_war_quote/examples/jsp/tagext/
              >sql/_showcode.java (No such file or directory)
              > at java.io.FileOutputStream.open(Native Method)
              > at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled
              >Code)
              > at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled
              >Code)
              > at java.io.FileOutputStream.<init>(FileOutputStream.java, Compiled
              >Code)
              > at java.io.FileWriter.<init>(FileWriter.java, Compiled Code)
              > at weblogic.servlet.jsp.Jsp2Java.makeOutputStream(Jsp2Java.java, Compiled
              >Code)
              > at weblogic.utils.compiler.CodeGenerator.generateCode(CodeGenerator.java,
              >Compiled
              >Code)
              > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java,
              >Compiled
              >Code)
              > at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java, Compiled
              >Code)
              > at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java, Compiled
              >Code)
              > at weblogic.servlet.internal.ServletContextImpl.precompileJSPs(ServletContextImpl.java,
              >Compiled Code)
              > at weblogic.servlet.internal.dd.DescriptorLoader.createServletContext(DescriptorLoader.java,
              >Compiled Code)
              > at weblogic.t3.srvr.HttpServer.loadWARContext(HttpServer.java, Compiled
              >Code)
              > at weblogic.t3.srvr.HttpServer.initServletContexts(HttpServer.java,
              >Compiled
              >Code)
              > at weblogic.t3.srvr.HttpServer.start(HttpServer.java, Compiled Code)
              > at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java, Compiled Code)
              > at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java, Compiled Code)
              > at java.lang.reflect.Method.invoke(Native Method)
              > at weblogic.Server.startServerDynamically(Server.java, Compiled Code)
              > at weblogic.Server.main(Server.java, Compiled Code)
              > at weblogic.Server.main(Server.java, Compiled Code)
              >
              

  • Auto deploy pre-compiled JSP

    Hello
    In the post of gadegaard in november 2002, there was a problem to au deploy pre-compiled JSP. Is this problem has been fix in the 9.0.4 OC4J version ?
    If yes, is it sufficient to create a "_pages" directory in the war (the war is contained in an ear) and auto deploy it ? Because my pre-compiled JSP are not deployed.
    Tanks in advance for your answer
    Emmanuelle

    Emmanuelle:
    There are two ways to use the precomiled JSP files.
    Method one: You can just copy the generated JSP page implementation classes to the directory application-deployments/yourApp/yourWebApp/persistence/_pages. If the init-param "main_mode" of jsp servlet of your web app is reload, then these classes will be used without stopping the server. This is the fastest way in development.
    Method two: You can packaged the generated JSP page implementation classes into a jar just like any other java class libraries. Then create your war with that jar inside WEB-INF/lib. Make sure the init-param "main_mode" of jsp servlet in your web.xml is justrun. Now you have a deployable war file. You can deploy the war file (within an ear file) to oc4j and access the JSP page.
    Please tell me if either of thse methods works for you
    Please note since oc4j 10.1.3, ojspc will package the generated classes into a jar under WEB-INF/lib if given an war or ear file.

  • Pre compiling JSPs?

    Is there anywayto pre-compile JSPs for a web project outside of Workshop, for example
    using the wlwBuild.sh tool, or some existing bea ant task?
    Thanks,
    Byron

    Byron,
    Building the project/application will cause the jsp's to be compiled into
    the .workshop directory. Currently there is no mechanism by which the build
    process can determine if the JSP has been modified, hence the JSP will be
    rebuilt , during the next build.
    Is there a reason why you would like to precompile the JSP outside Workshop
    Regards,
    Raj Alagumalai
    Backline Workshop Support
    "Byron Foster" <[email protected]> wrote in message
    news:3ff11395$[email protected]..
    >
    Is there anywayto pre-compile JSPs for a web project outside of Workshop,for example
    using the wlwBuild.sh tool, or some existing bea ant task?
    Thanks,
    Byron

  • Pre-compiled JSPs not being recognized (WLS 8.1 SP2)

              We're running into a strange problem here, where our pre-compiled JSPs (precompiled
              via an ant target) are being recognized as "stale" and recompiled by Weblogic,
              as the following log message indicates. The strange thing is, on one hand it says
              they were precompiled by a "different" version of Weblogic server, and then right
              after that, immediately contradicts itself by logging the SAME version for the
              JSP and WLS builds:
              ####<Jan 31, 2004 11:24:40 AM PST> <Info> <HTTP> <ladybug> <fwmharris-ms01> <ExecuteThread:
              '11' for
              queue: 'default'> <dhecking> <> <BEA-101295> <Recompiling JSP
              [ServletContext(id=20425572,name=fwmhis-www,context-path=)], resource
              [tiles/table/td_twisty_group_tile.jsp], because it is stale. It was previously
              compiled using a
              different version of WebLogic Server.
              JSP build version: 8.1.2.0
              WLS build version: 8.1.2.0.>
              As can be seen, the two build versions are identical (8.1.2.0) which is the correct
              version (Weblogic 8.1 SP2). Has anyone else run into this problem? If so, is there
              a fix?
              The platform is Solaris btw.
              Thank you.
              ..Hrishi
              Hrishi Dixit
              Finaplex
              [email protected]
              

    Kostas Symeonidis wrote:
              > I have exactly the same problem with 8.1sp2 on Win2000 and I will test it tomorrow on Solaris.
              >
              > It seems that the code checks two things:
              > 1. the version of the JSPC
              > 2. the timestamp of the files
              > In both cases the logged message is the same(!!!) "recompiling because is stale..." but you can see that clearly the version numbers are the same, therefore the stale check failed on step 2.
              >
              > Now my guess is that step 2, either doesn't find the page, or the time check is done erratically. Mind you, in 8.1sp2 BEA changed the isResourceStale method signature and added an extra String parameter for the TimeZone, see code in generated JSPs below:
              > public boolean _isStale() {
              > weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext());
              > java.io.File f = null;
              > long lastModWhenBuilt = 0L;
              > if (sci.isResourceStale("/index.jsp", 1082047780159L, "8.1.2.0", "Europe/London")) return true;
              > return false;
              > }
              >
              > I'm also quite sure that we should be waiting for a rolling patch quite soon.
              Your guess is correct. Unfortunately a the message logged is wrong. A
              patch for CR133453 fixes that. Basically its failing (2) and logging the
              same message as (1).
              

  • Pre-compiling JSP's

    I am using build.cmd to create an ear and war of my application. I am
              having problems with the code below:
              @REM Create WAR file
              COPY src\dd\war\WEB-INF\* stage\WEB-INF
              COPY src\dd\war\WEB-INF\tlds\* stage\WEB-INF\tlds
              java -classpath %CLASSPATH%;./stage/WEB-INF/classes;./src/jsp;./stage
              weblogic.jspc -docroot src/jsp -d stage/WEB-INF/classes src/jsp/*/*.jsp
              jar cv0f stage/edeploy2WAR.war -C stage WEB-INF -C src/jsp .
              On the third line (the one that starts with java) - I get the following
              error:
              [jspc] warning: expected file C:\edeploy2\src\jsp\WEB-INF\web.xml not found,
              tag
              libraries cannot be resolved.
              [jspc] parsing /*/*.jsp:
              Error: translation of /*/*.jsp failed: java.io.FileNotFoundException:
              src\jsp\*\
              *.jsp (The filename, directory name, or volume label syntax is incorrect)
              Error: [jspc]: 1 file(s) failed:
              /*/*.jsp
              I am trying to pre-compile all the jsp's that are located in 10
              subdirectories under src/jsp/.. subdir
              I shouldn't need a web.xml file should I?
              Thanks,
              Matt
              

    I am now using the following command, which seems to work:
              java weblogic.jspc -compileAll -webapp src\jsp -d stage/WEB-INF/classes
              However, when it begins, it looks for WEB-INF in src\jsp - is there anyway
              to make it look in src\dd for WEB-INF?
              Secondly, I added src/WEB-INF/web.xml for my tag libraries, but now I get
              the following:
              [jspc] resolved taglib uri 'RDBMS' to taglib-location
              ../../src/dd/WEB-INF/tlds/
              rdbmstags6_0.tld:
              [jspc] looking for taglib uri RDBMS as resource /WEB-INF/RDBMS in Web
              Applicatio
              n root:
              [jspc] looking for taglib uri RDBMS as resource RDBMS in Web Application
              root:
              Error: translation of /dev/DB_ConfigurationLocation.jsp failed:
              weblogic.servlet
              .jsp.JspException: (line 5): Could not parse deployment descriptor:
              java.io.IOEx
              ception: cannot resolve 'RDBMS' into a valid tag library
              Error: [jspc]: 1 file(s) failed:
              /dev/DB_ConfigurationLocation.jsp
              Any ideas?
              Thanks,
              Matt
              "Mettu Kumar" <[email protected]> wrote in message
              news:[email protected]...
              > Matt,
              >
              > I use a batch file with following contents. While compiles all my jsp's
              > (including ones in subfolders).
              >
              > java weblogic.jspc -classpath %CLASSPATH% -compileAll -webapp
              > e:\bea\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver
              >
              > Hope this helps you.
              >
              > Thanks,
              > Kumar.
              >
              > Matt Raible wrote:
              >
              > > How do I change this line?
              > >
              > > java -classpath %CLASSPATH%;./stage/WEB-INF/classes;./src/jsp;./stage
              > > weblogic.jspc -docroot src/jsp -d stage/WEB-INF/classes src/jsp/*/*.jsp
              > >
              > > Thanks,
              > >
              > > Matt
              > >
              > > "Mettu Kumar" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > Matt,
              > > >
              > > > Why not use -webapp option which should fix your problem?
              > > >
              > > > Thanks,
              > > > Kumar.
              > > >
              > > > Matt Raible wrote:
              > > >
              > > > > I am using build.cmd to create an ear and war of my application. I
              am
              > > > > having problems with the code below:
              > > > >
              > > > > @REM Create WAR file
              > > > > COPY src\dd\war\WEB-INF\* stage\WEB-INF
              > > > > COPY src\dd\war\WEB-INF\tlds\* stage\WEB-INF\tlds
              > > > > java -classpath
              %CLASSPATH%;./stage/WEB-INF/classes;./src/jsp;./stage
              > > > > weblogic.jspc -docroot src/jsp -d stage/WEB-INF/classes
              src/jsp/*/*.jsp
              > > > > jar cv0f stage/edeploy2WAR.war -C stage WEB-INF -C src/jsp .
              > > > >
              > > > > On the third line (the one that starts with java) - I get the
              following
              > > > > error:
              > > > >
              > > > > [jspc] warning: expected file C:\edeploy2\src\jsp\WEB-INF\web.xml
              not
              > > found,
              > > > > tag
              > > > > libraries cannot be resolved.
              > > > > [jspc] parsing /*/*.jsp:
              > > > > Error: translation of /*/*.jsp failed:
              java.io.FileNotFoundException:
              > > > > src\jsp\*\
              > > > > *.jsp (The filename, directory name, or volume label syntax is
              > > incorrect)
              > > > > Error: [jspc]: 1 file(s) failed:
              > > > > /*/*.jsp
              > > > >
              > > > > I am trying to pre-compile all the jsp's that are located in 10
              > > > > subdirectories under src/jsp/.. subdir
              > > > >
              > > > > I shouldn't need a web.xml file should I?
              > > > >
              > > > > Thanks,
              > > > >
              > > > > Matt
              > > >
              >
              

Maybe you are looking for

  • Report needed to identify shipments having volume less than 1cbm in a month

    Hi, I need to know which tcode we can use to get a report showing the total shipments in a month having volume of each less than 1 cbm. Thanks & Regards, Ameya Khanwalkar.

  • Html email & entourage

    hey, sent out an html email....works fine but with entourage and mac mail my images (that are absolute) are also attachments, and show up after the initial email, is there code to solve this...? or is a setting on the viewers side? much appreciated,

  • Plse...help me on the communicating between CLEAN ACCESS MANAGER and Switch 3560E-24Ps by snmp

    Dear All, I try to configure in both Clean Access Manager and Switch 3560E-24Ps on SNMP Version 2 protocol but I can't make it working together (For CAM and Switch 3560G-48Ps I can do that). Plse give me any suggestion to solve that problem. All conf

  • Keystrokes for button actions in JOptionPane

    When running my app in Windows, the Alt key must be pressed to cause the "Yes" button or "No" button to respond from the keyboard. Can I set an option in JOptionPane, or elsewhere, to not require pressing the Alt key to activate a button in JOptionPa

  • NAT port is closed , cannot open it up

    I am having trouble with the airport extreme base station port mapping feature. I must be putting in the wrong IP address numers. Could someone steer me in the right direction ?!