Re: Precompile JSP's in Weblogic 5.1/SP6

          http://www.weblogic.com/docs51/classdocs/webappguide.html
          Search for pre-compile on this page.
          Mike
          "Gagan Bhalla" <[email protected]> wrote:
          >
          >Hello,
          >How do you get the precomplilation of JSP's to work in
          >5.1? I have
          >seen some emails on this mailing list about how to precompile
          >the
          >JSP's in 6.0 but I would like to know how to do it in
          >5.1. looking
          >at the documentation here: http://www.weblogic.com/docs51/classdocs/API_jsp.html#register
          >
          >In the weblogic properties file we have them set as follows:
          >
          >weblogic.httpd.documentRoot=htdocs/
          ># # # # # # # # # # # # # # # # # # # # # # # # # # #
          ># # # # #
          ># #
          ># WEBLOGIC JSP PROPERTIES
          ># ------------------------------------------------
          ># Sets up automatic page compilation for JSP. Adjust init
          >argsfor
          ># directory locations and uncomment to use.
          >weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
          >weblogic.httpd.initArgs.*.jsp=\
          > pageCheckSeconds=1,\
          > keepgenerated=true,\
          > compileCommand=d:/jdk1.2.2/bin/javac.exe,\
          > workingDir=D:/Mediaprise/mpsite/WebLogicServer,\
          > verbose=true
          >
          >that should be picking up any JSP's underneath the document
          >root
          >folder (htdocs, in this case) and precompile them to the
          >working
          >dir. now we have JSP's in the htdocs folder and a whole
          >stucture
          >of JSP's underneath the htdocs folder in a folder called
          >JSP with
          >it's own file and directory structure. The weblogic.log
          >file shows
          >that the above properties are being set correctly on startup
          >but
          >no precompilation seems to be happening to the working
          >dir. any
          >ideas on how to make this work in 5.1??
          >I am working on Weblogic 5.1 with SP6.
          >Thanks,
          >Gagan
          

In WebLogic 6.0 register each jsp in the web.xml with a <servlet-name>, <jsp-file>
          and <load-on-startup>. For example:
          <web-app>
          <servlet>
          <servlet-name></servlet-name>
          <jsp-file></jsp-file>
          <load-on-startup></load-on-startup>
          </servlet>
          <servlet-mapping>
          <servlet-name></servlet-name>
          <url-pattern></url-pattern>
          </servlet-mapping>
          </web-app>
          The optional value of load-on-startup element must be a positive integer indicating
          the order in which the servlet should be loaded.
          In WebLogic 6.1 set the precompile parameter in weblogic.xml.
          <jsp-descriptor>
          <jsp-param>
          <param-name>
          precompile
          </param-name>
          <param-value>
          true
          </param-value>
          </jsp-param>
          </jsp-descriptor>
          Vaibhav wrote:
          > This solution is with web.xml, if I am
          > using weblogic.properties only and no web.xml, How do I specify precompile=true ?
          

Similar Messages

  • Precompile JSP's in Weblogic 5.1/SP6

              Hello,
              How do you get the precomplilation of JSP's to work in 5.1? I have
              seen some emails on this mailing list about how to precompile the
              JSP's in 6.0 but I would like to know how to do it in 5.1. looking
              at the documentation here: http://www.weblogic.com/docs51/classdocs/API_jsp.html#register
              In the weblogic properties file we have them set as follows:
              weblogic.httpd.documentRoot=htdocs/
              # WEBLOGIC JSP PROPERTIES
              # Sets up automatic page compilation for JSP. Adjust init argsfor
              # directory locations and uncomment to use.
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.initArgs.*.jsp=\
              pageCheckSeconds=1,\
              keepgenerated=true,\
              compileCommand=d:/jdk1.2.2/bin/javac.exe,\
              workingDir=D:/Mediaprise/mpsite/WebLogicServer,\
              verbose=true
              that should be picking up any JSP's underneath the document root
              folder (htdocs, in this case) and precompile them to the working
              dir. now we have JSP's in the htdocs folder and a whole stucture
              of JSP's underneath the htdocs folder in a folder called JSP with
              it's own file and directory structure. The weblogic.log file shows
              that the above properties are being set correctly on startup but
              no precompilation seems to be happening to the working dir. any
              ideas on how to make this work in 5.1??
              I am working on Weblogic 5.1 with SP6.
              Thanks,
              Gagan
              

    In WebLogic 6.0 register each jsp in the web.xml with a <servlet-name>, <jsp-file>
              and <load-on-startup>. For example:
              <web-app>
              <servlet>
              <servlet-name></servlet-name>
              <jsp-file></jsp-file>
              <load-on-startup></load-on-startup>
              </servlet>
              <servlet-mapping>
              <servlet-name></servlet-name>
              <url-pattern></url-pattern>
              </servlet-mapping>
              </web-app>
              The optional value of load-on-startup element must be a positive integer indicating
              the order in which the servlet should be loaded.
              In WebLogic 6.1 set the precompile parameter in weblogic.xml.
              <jsp-descriptor>
              <jsp-param>
              <param-name>
              precompile
              </param-name>
              <param-value>
              true
              </param-value>
              </jsp-param>
              </jsp-descriptor>
              Vaibhav wrote:
              > This solution is with web.xml, if I am
              > using weblogic.properties only and no web.xml, How do I specify precompile=true ?
              

  • Can we precompile JSPs to avoid Weblogic Recompile JSPs

    We'll prevent Weblogic 10.3 to Recompile JSPs when deployment and running. So we precompile JSPs when build by weblogic.jspc and added staments below in weblogic.xml, but we failed, weblogic will recompile JSPs as before. Anybody can help me?
    <jsp-param>
    <param-name>precompile</param-name>
    <param-value>false</param-value>
    </jsp-param>
    <jsp-param>
    <param-name>pageCheckSeconds</param-name>
    <param-value>-1</param-value>
    </jsp-param>
    Comman in ANT build file is below:
    <java classname="weblogic.jspc" fork="yes" classpath="${esc2.classpath}">
                   <arg line="-webapp ${esc.buildwardir} -compileAll -compiler javac -d ${esc.buildwardir.classes} -k"/>
                   <arg line="-J-mx256m"/>
              </java>

    Hi,
    If the classes are still being recompiled then you are running different WLS versions - make sure you are compiling your classes using the same release & version as the one to which you are deploying
    You can have a look at the below URL for further information
    http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs81/jsp/reference.html

  • Precompiling jsp's in weblogic

    Hi ,
    I want to precompile my jsp's when I start the server. I don't want wait for long time when the page start's loading. Can we do this in weblogic.
    Any help will be appreciated.
    Thanks
    Anitha

    hi anitha,
    yes you can do that in Weblogic by setting up the precompile parameter for <jsp-descriptor> element to be true in weblogic.xml descriptor file when the web application gets deployed or re-deployed !!
    cheers
    abhijeet

  • Precompile jsps via ant

    I have a development project that has been setup to use JDeveloper 10.1.3.5.0 to create and EAR for deployment. The EAR is comprised of three sub applications - appData, appEjb, appWeb. Each subapplication has its own resource to deploy in JDeveloper. The appWeb has an additional resource defined in JDeveloper to deploy the EAR.
    I am attempting to move the build process out of JDeveloper and into ant in order to integrate the application with an automated build management framework.
    I have been successful in creating an ant build.xml to pull the code from source control, compile the three subapplications, jar the appData, and jar the appEjb. The issue I am having is precompiling the jsp files in the appWeb.
    The JDeveloper resource for appWeb.deploy precompiles all the jsps and packages the jsp class files along with all the other appWeb content as part of the appWeb.war.
    I thought JDeveloper was utilizing an internal J2EE standalone OC4J. I created a classpath and taskdef as follows
    <path id="ojspc.classpath">
    <fileset dir="jdevstudio">
    <include name="**/*.jar"/>
    </fileset>
    <pathelement location="${env.JAVA_HOME}/lib/tools.jar" />
    <pathelement location="${outDir}/appData"/>
    <pathelement location="${outDir}/appWeb"/>
    <pathelement location="${outDir}/appEjb"/>
    </path>
    <taskdef name="ojspc" classpathref="ojspc.classpath" classname="org.apache.tools.ant.taskdefs.optional.jsp.OjspC" />
    My original attempts had a much more constrained classpath definition (using the classpath found in the manifest file within j2ee\home\ojspc.jar); however, ant is unable to find the OjspC class and thus I expanded the classpath to include all jar files.
    After reading through blogs, forums, and documentation, I am unable to figure out how to define a task within ant to precompile the jsps in my project which mirrors the work being done via the JDeveloper deploy resource. Does anyone know the actual class to use for precompiling the jsps?
    Any help is greatly apprciated,
    /dclink

    GR wrote:
              > Is there any ant task for precompiling jsp provided by weblogic 8.1.2?
              > (Ant's wljspc doesnt work with 8.1.2).
              Have you tired a regular java task that calls the class weblogic.jspc?
              A little more direct but I imagine it would work
              ~Ryan
              

  • Precompiled JSP not taken in account by Weblogic 10.3.1

    Hi
    My JSPs are properly precompiled in my ear, and well taken in account by weblogic when I work with my local environment. But if I upload my ear on the Unix server, they're not taken in account anymore. Weblogic compiles them in real time, that causes a display time really long for each page.
    The precompiled JSP are present in the folder WEB-INF/classes/jsp_servlet/_jsp , inside the file app-web.war, itself included in the ear.
    Once the ear is deployed on the server, I find my precompiled JSP at 2 places :
    - <domain>/servers/<server>/tmp/_WL_user/<ear_name>/rdi76c/war/WEB-INF/lib/_wl_cls_gen.jar
    then in jsp_servlet/_jsp
    - <domain>/servers/<server>/tmp/_WL_user/<ear_name>/m8l8j8/app-web.war
    then in WEB-INF\classes\jsp_servlet\_jsp\
    At the execution time, Weblogic should be able to find the precompiled JSP at that 2 places. However, it recompiles the JSPs and places them here :
    - <domain>/servers/<server>/tmp/_WL_user/<ear_name>/rdi76c/jsp_servlet/_jsp
    I have already checked the dates. The dates written in the generated .java files match the system dates of the corresponding JSP files. It could have been an explanation, but it's not.
    Do you have any idea ?

    but encounter version mismatching error... It indicated that it only support 10.3.0... It's hard to tell based on your description, but I am going to guess that you are not selecting the right version of WLS runtime in the new runtime wizard. WLS 10.3.1 is also known as WLS 11gR1. Make sure that you look for it in Oracle rather than BEA category.
    - Konstantin

  • Precompiling JSPs Outside Weblogic Home Directory

    Using Weblogic Server 9.2. Was able to precompile JSPs in a war file with weblogic.appc at the command line with only the weblogic.jar inside the Weblogic installation directory in my classpath. I then translated this into an Ant task, and because the script may need to run on a box that does not have Weblogic installed, copied weblogic.jar to my build area and included that one in my classpath. It immediately began throwing NoClassDefFound exceptions. Discovered the "Class-Path" list of additional jars in the MANIFEST inside weblogic.jar, searched these jars and found all of the missing classes--except for the last one. The missing class is org/apache/bcelx/classfile/ClassParser, and the error I'm getting is "WARNING: unable to get an input stream for jar:file:D:\APPS\Java\jdk1.5.0_13\jre\lib\rt.jar!" followed by java.lang.NoClassDefFoundError. The error occurs in javelin.java.JavaClassFile.getParseTree() at line 178. There is a BCEL Apache project, but they have no mention of BCELX on their website. Anyone know where I can find this class, or source code for javelin.java.JavaClassFile?
    Edited by willhandley at 06/06/2008 10:25 AM

    I tried the wlappc target:
    <target name="_precompile-jsp">
         <taskdef name="wlappc" classname="weblogic.ant.taskdefs.j2ee.Appc" classpathref="class.path" />
         <echo message="Precompiling JSPs in ${appfile}"/>
              <wlappc source="${appfile}" debug="true" verbosejavac="true" verbose="true" runtimeflags="-J-ms1024m -J-mx2048m"/>
    </target>
    But I keep getting:
    [java] [wlappc] java.lang.OutOfMemoryError: Java heap space
    We've got quite a lot of jsps in our application. It seems the memory options are being ignored and it seems other people have experienced the same problem with the memory options being ignored when using wlappc and have switched to weblogic.appc.
    When I switch to weblogic.appc I don't get the out of memory issue, though of course I'm still getting the initial stack trace reported. Any other ideas?

  • Precompiling jsps Unexpected Signal : 11  JVM_IsInterface

              Hi,
              We have an weblogic 7.0 SP0 application running on solaris 7. As part of it startup
              in precompiles jsps - sometimes at different points weblogic crashes
              when we don't precompile the jsp's we never get this problem
              has any body seem it got a work around
              the message is
              Unexpected Signal : 11 occurred at PC=0xfe15b1c8
              Function name=JVM_IsInterface
              Library=/usr/j2sdk1_3_1_03/jre/lib/sparc/server/libjvm.so
              Current Java thread:
              Dynamic libraries:
              0x10000      /usr/j2sdk1_3_1_03/bin/../bin/sparc/native_threads/java
              0xff360000      /usr/lib/libthread.so.1
              0xff3a0000      /usr/lib/libdl.so.1
              0xff280000      /usr/lib/libc.so.1
              0xff270000      /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
              0xfe000000      /usr/j2sdk1_3_1_03/jre/lib/sparc/server/libjvm.so
              0xff210000      /usr/lib/libCrun.so.1
              0xff1f0000      /usr/lib/libsocket.so.1
              0xff100000      /usr/lib/libnsl.so.1
              0xff1c0000      /usr/lib/libm.so.1
              0xff240000      /usr/lib/libw.so.1
              0xff0e0000      /usr/lib/libmp.so.2
              0xff0a0000      /usr/j2sdk1_3_1_03/jre/lib/sparc/native_threads/libhpi.so
              0xff070000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libverify.so
              0xff030000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libjava.so
              0xfe7d0000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libzip.so
              0xfe650000      /usr/lib/nss_files.so.1
              0xfe540000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libnet.so
              0xfdee0000      /usr/lib/nss_nis.so.1
              0xfdec0000      /apps/wls70/weblogic/server/lib/solaris/libmuxer.so
              0xfdd50000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libioser12.so
              Local Time = Thu Sep 4 17:40:55 2003
              Elapsed Time = 288
              # HotSpot Virtual Machine Error : 11
              # Error ID : 4F530E43505002BD 01
              # Please report this error at
              # http://java.sun.com/cgi-bin/bugreport.cgi
              # Java VM: Java HotSpot(TM) Server VM (1.3.1_03-b03 mixed mode)
              Many thanks
              Malcolm Bridgeford
              

              See Sun's bug parade:
              http://developer.java.sun.com/developer/bugParade/bugs/4458653.html
              They fixed something in 1.3.1_04 that was causing errors similar to yours so you
              should probably try moving up to the _04 release.
              Also there are some know problems with older JVMs when JSPs get REALLY big through
              many custom tags, includes, etc. Breaks some internal 64K limit.. Might be related
              to that.
              -Greg
              Co-author of new advanced WebLogic book, "Mastering BEA WebLogic Server" http://www.amazon.com/exec/obidos/ASIN/047128128X
              "Malcolm Bridgeford" <[email protected]> wrote:
              >
              >Hi,
              >We have an weblogic 7.0 SP0 application running on solaris 7. As part
              >of it startup
              >in precompiles jsps - sometimes at different points weblogic crashes
              >
              >when we don't precompile the jsp's we never get this problem
              >
              >has any body seem it got a work around
              >
              >the message is
              >
              >Unexpected Signal : 11 occurred at PC=0xfe15b1c8
              >Function name=JVM_IsInterface
              >Library=/usr/j2sdk1_3_1_03/jre/lib/sparc/server/libjvm.so
              >
              >Current Java thread:
              >
              >Dynamic libraries:
              >0x10000      /usr/j2sdk1_3_1_03/bin/../bin/sparc/native_threads/java
              >0xff360000      /usr/lib/libthread.so.1
              >0xff3a0000      /usr/lib/libdl.so.1
              >0xff280000      /usr/lib/libc.so.1
              >0xff270000      /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
              >0xfe000000      /usr/j2sdk1_3_1_03/jre/lib/sparc/server/libjvm.so
              >0xff210000      /usr/lib/libCrun.so.1
              >0xff1f0000      /usr/lib/libsocket.so.1
              >0xff100000      /usr/lib/libnsl.so.1
              >0xff1c0000      /usr/lib/libm.so.1
              >0xff240000      /usr/lib/libw.so.1
              >0xff0e0000      /usr/lib/libmp.so.2
              >0xff0a0000      /usr/j2sdk1_3_1_03/jre/lib/sparc/native_threads/libhpi.so
              >0xff070000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libverify.so
              >0xff030000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libjava.so
              >0xfe7d0000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libzip.so
              >0xfe650000      /usr/lib/nss_files.so.1
              >0xfe540000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libnet.so
              >0xfdee0000      /usr/lib/nss_nis.so.1
              >0xfdec0000      /apps/wls70/weblogic/server/lib/solaris/libmuxer.so
              >0xfdd50000      /usr/j2sdk1_3_1_03/jre/lib/sparc/libioser12.so
              >
              >Local Time = Thu Sep 4 17:40:55 2003
              >Elapsed Time = 288
              >#
              ># HotSpot Virtual Machine Error : 11
              ># Error ID : 4F530E43505002BD 01
              ># Please report this error at
              ># http://java.sun.com/cgi-bin/bugreport.cgi
              >#
              ># Java VM: Java HotSpot(TM) Server VM (1.3.1_03-b03 mixed mode)
              >#
              >
              >Many thanks
              >Malcolm Bridgeford
              >
              >
              >
              

  • Precompiling JSPs changes directory name

    I am using the weblogic.appc compiler to precompile JSPs and I noticed that if my source folder name contains a hyphen, eg. my-test, after precompilation the class files are stored under \WEB-INF\classes\jsp_servlet\_my_45_test\ directory.
              The "-" in the name is substituted by its ASCII value. Is there a way to stop this from happening other than choosing a different name for the source folder?
              Thanks

    cranestar wrote:
    Oracle db versesion : 11g
    Apex version: 4.1.0.00.32
    I have created a file browse object on a page. After filling several text boxes and selecting a file the page writes a row into a table
    in the database.
    When a file is selected with the file browse the name looks like:
    C:\OracleApex\PDM-BOM comparison app\datafiles\B-15680-49_D_SAP.CSV
    However in the database the name appears as:
    F1531709975/B-15680-49_D_SAP.CSV
    What happened to the directory name? This causes problems because I need to use the directory and file name in a utl_file
    utility.<tt>F1531709975</tt> is produced to provide a unique file identifier in the <tt>apex_application_files</tt> view, and is the session state value of the file browse control that uploaded the file. The actual filename is available in the <tt>filename</tt> column.
    As has been noted in many previous threads on this topic: For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8+ and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\"&mdash;and this monstrosity has sadly had to be enshrined in the HTML5 spec...
    Changing IE's security config setting "Include local directory path when uploading files" enables the path to be exposed in IE, but unless you're working in an intranet environment where: IE is the only browser used; it's possible to make remote changes to this setting on every desktop; and this won't break/expose anything else, then trying to achieve this is pointless.
    For more information see:
    http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018980.html
    http://blogs.msdn.com/ie/archive/2009/03/20/rtm-platform-changes.aspx
    http://developers.whatwg.org/number-state.html#file-upload-state

  • Re: Precompiling JSP with admin/managed servers

    Thanks, but I'm not doing any copying.
              The admin/managed-server communication copies things to the managed server,
              which then always recompiles the pages when hit.
              -Greg
              Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              "Robert Coonrad" <[email protected]> wrote in message
              news:[email protected]...
              >
              > check out post 8366...i found that i was not preserving
              > the lastmodified date on my jsps and this was causing
              > unnecessary re-compilation.
              >
              > hope it helps...
              > bobc
              >
              > "Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote:
              > >I believe I have exhausted all permutations of EARing/notEARing,
              > >WARing/notWARing, placing precompiled jsp class files in WEB-INF/classes,
              > >placing them in a static location and setting workingDir to that
              location,
              > >combinations of the above.
              > >
              > >No matter what, the managed server re-compiles pages the first time they
              > >are
              > >hit. Non admin/managed-server I have no problems.
              > >
              > >Can anyone from BEA comment on this problem? Or give me a workaround
              > >for
              > >getting a cluster working with precompiled jsps?
              > >
              > >-Greg
              > >
              > >"Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote in message
              > >news:[email protected]...
              > >> Grrr... The JSP engine is extremely frustrating! I've spent many hours
              > >> fighting the "staleness" checker in WL. I've been through all of the
              > >> newsgroup messages pertaining to pre-compiling, etc., and I've gotten
              > >> pre-compilation working on single-server deployments, but admin/managed
              > >> server deployments have me beat.
              > >>
              > >> WL6.1, SP1, Solaris
              > >>
              > >> I've done the pageCheckSeconds=-1 and the workingDir is set to a fixed
              > >> place. The fixed place contains pre-compiled versions of all jsps
              > >made on
              > >> that machine using jspc not 20 minutes earlier using the JSP files
              > >in the
              > >> exploded EAR file used by the admin server as the model for managed
              > >> servers.. The managed servers are on the same machine.
              > >>
              > >> When the admin server gives an application to a managed server, the
              > >managed
              > >> server creates a temporary directory containing all of the webapp
              > >> components, etc. The file timestamps on these files is the set by
              > >the
              > >> copying process to the time of the managed server boot (why?!?!????!?),
              > >so
              > >> the staleness check always thinks they are new and could care less
              > >what
              > >> precompiled jsps I have in my workingDir, the WEB-INF/classes
              directory,
              > >or
              > >> anywhere else. The pageCheckSeconds=-1 seems to be completely ignored
              > >in
              > >> this scenario.
              > >>
              > >> If I tell the managed server to precompile everything on boot (about
              > >45
              > >> minutes for this app) it will create versions of the classes that match
              > >th
              > >e
              > >> new JSP file timestamps, but this does not even survive a reboot of
              > >the
              > >> managed server because it AGAIN creates a new temp version of
              everything
              > >on
              > >> the next reboot with new timestamps.
              > >>
              > >> If I wait for the managed server to boot and find the directory like
              > >> .../applications/.wlnotdelete_man1/wlap7336/webapp/... and physically
              > >copy
              > >> (via cp -pr to retain timestamps) all of the original webapp components
              > >on
              > >> top of the temp versions, the staleness checker is happy and the
              > >> pre-compiled versions work fine.
              > >>
              > >> There HAS to be a way to package pre-compiled versions of the JSPs
              > >in the
              > >> "model" application in the admin server and keep from having to
              precompile
              > >> the JSPs on every managed server every time managed server is booted..
              > >>
              > >> It would help if we had a way to bypass the staleness checking
              > >completely..
              > >> Or you guys should make the timestamps on the files copied by the
              > >> admin/managed deployment process match properly so the staleness
              checker
              > >> doesn't think the JSP is different.
              > >>
              > >> It would also help if the engineer who wrote this could explain the
              > >rules
              > >> being implemented by the staleness checker. So far all the messages
              > >in
              > >the
              > >> newsgroup have amounted to point solutions for problems without a good
              > >> understanding of what the engine is checking for and/or doing under
              > >the
              > >> covers. Looking at the generated .java files for the JSP pages helps,
              > >but
              > >> it is not good enough...
              > >>
              > >> Anyone out there have a working admin/managed server JSP application?
              > >> -Greg
              > >>
              > >> -----------------------------------------------------------
              > >> Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              > >> www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              > >>
              > >>
              > >>
              > >
              > >
              >
              

    The admin/managed-server communication copies things to the managed server, which then always recompiles the pages when hit.
              This is a known issue and is fixed. The timestamps of the compiled classes was not being preserved when extracted from the war file used to distribute to the managed servers. This will be available in WLS6.1 Service Pack 3 - and there is a temporary patch available for SP2. Please ask your friendly BEA support person for it (you can refer to CR058946)
              I'd give you the patch myself, but they like to keep track of these things...
              Regards,
              Alex
              "Girish" <[email protected]> wrote in message news:[email protected]...
              >
              > "Aditya Kiran Gavvala" <[email protected]> wrote:
              > >Greg,
              > >
              > >I have been following your posts, because our application deployment
              > >ran
              > >into exact same problem you ran into. I had spent a full two days
              > >researching into the problem. And I figured the solution. Hope this
              > >helps.
              > >
              > >Here are my discoveries:
              > >
              > >The following applies only to the following environment:
              > >OS: Linux (perhaps for Win/Unix/Solaris etc)
              > >WLS 6.0 SP2 ( no rolling patches): I found Rolling Patch2 (RP2) not useful
              > >for this problem.
              > >Clustered environment with Admin/Managed servers
              > >
              > >- When you compile JSP using weblogic.jspc compiler it puts the JSP file
              > >timestamp into the compiled class. You can see it in the generated java
              > >file
              > >(you need to supply -keepgenerated switch to jspc)
              > >
              > >- When a request is made to a JSP page after the application is deployed,
              > >it
              > >seems to be retrieving this timestamp from the compiled class file and
              > >comparing it with the JSP file timestamp. If they dont match a compile
              > >command gets run by the server. Thereby you see a compile happening at
              > >run
              > >time.
              > >
              > >- If you have exploded directory deployment, when you start the managed
              > >servers they create a ".war" file (under some temp dir) with all the
              > >JSP
              > >source files going into the file. You can notice this by looking into
              > >the
              > >server log file. Therefore all JSP source files get a brand new timestamp
              > >in
              > >the archive (a timestamp later than what was put class files by
              > >weblogic.jspc). So, the server at run time sees that the timestamp in
              > >the
              > >class file is older than the JSP source file and runs a recompile. So
              > >DONT
              > >DO EXPLODED directory deployment if your environment is as described
              > >in this
              > >post.
              > >
              > >- If you have ".war" file deployment, you will not have a problem. At
              > >the
              > >start up time managed server still creates "".war" file under a temp
              > >directory however it seems to be copying the content of the your ".war"
              > >file. So, the timestamps of JSP remain the same as they were before.
              > >SO NO
              > >RE-COMPILATION.
              > >
              > >- Another important thing to remember is to make sure you specify the
              > >workingDir in the weblogic.xml file. That is where the precompiled class
              > >files should reside. This should be any directory the server uses as
              > >scratch
              > >pad to compile classes or find (pre)compiled classes. This is not a
              > >directory inside your .war file is what I am trying to get at.
              > >
              > >Hope this helps,
              > >Aditya
              > >
              > >"Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote in message
              > >news:[email protected]...
              > >> Thanks, but I'm not doing any copying.
              > >>
              > >> The admin/managed-server communication copies things to the managed
              > >server,
              > >> which then always recompiles the pages when hit.
              > >>
              > >> -Greg
              > >>
              > >> -----------------------------------------------------------
              > >> Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              > >> www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              > >>
              > >> "Robert Coonrad" <[email protected]> wrote in message
              > >> news:[email protected]...
              > >> >
              > >> > check out post 8366...i found that i was not preserving
              > >> > the lastmodified date on my jsps and this was causing
              > >> > unnecessary re-compilation.
              > >> >
              > >> > hope it helps...
              > >> > bobc
              > >> >
              > >> > "Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote:
              > >> > >I believe I have exhausted all permutations of EARing/notEARing,
              > >> > >WARing/notWARing, placing precompiled jsp class files in
              > >WEB-INF/classes,
              > >> > >placing them in a static location and setting workingDir to that
              > >> location,
              > >> > >combinations of the above.
              > >> > >
              > >> > >No matter what, the managed server re-compiles pages the first time
              > >they
              > >> > >are
              > >> > >hit. Non admin/managed-server I have no problems.
              > >> > >
              > >> > >Can anyone from BEA comment on this problem? Or give me a workaround
              > >> > >for
              > >> > >getting a cluster working with precompiled jsps?
              > >> > >
              > >> > >-Greg
              > >> > >
              > >> > >"Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote in message
              > >> > >news:[email protected]...
              > >> > >> Grrr... The JSP engine is extremely frustrating! I've spent many
              > >hours
              > >> > >> fighting the "staleness" checker in WL. I've been through all
              > >of the
              > >> > >> newsgroup messages pertaining to pre-compiling, etc., and I've
              > >gotten
              > >> > >> pre-compilation working on single-server deployments, but
              > >admin/managed
              > >> > >> server deployments have me beat.
              > >> > >>
              > >> > >> WL6.1, SP1, Solaris
              > >> > >>
              > >> > >> I've done the pageCheckSeconds=-1 and the workingDir is set to
              > >a
              > >fixed
              > >> > >> place. The fixed place contains pre-compiled versions of all
              > >jsps
              > >> > >made on
              > >> > >> that machine using jspc not 20 minutes earlier using the JSP files
              > >> > >in the
              > >> > >> exploded EAR file used by the admin server as the model for managed
              > >> > >> servers.. The managed servers are on the same machine.
              > >> > >>
              > >> > >> When the admin server gives an application to a managed server,
              > >the
              > >> > >managed
              > >> > >> server creates a temporary directory containing all of the webapp
              > >> > >> components, etc. The file timestamps on these files is the set
              > >by
              > >> > >the
              > >> > >> copying process to the time of the managed server boot
              > >(why?!?!????!?),
              > >> > >so
              > >> > >> the staleness check always thinks they are new and could care
              > >less
              > >> > >what
              > >> > >> precompiled jsps I have in my workingDir, the WEB-INF/classes
              > >> directory,
              > >> > >or
              > >> > >> anywhere else. The pageCheckSeconds=-1 seems to be completely
              > >ignored
              > >> > >in
              > >> > >> this scenario.
              > >> > >>
              > >> > >> If I tell the managed server to precompile everything on boot
              > >(about
              > >> > >45
              > >> > >> minutes for this app) it will create versions of the classes that
              > >match
              > >> > >th
              > >> > >e
              > >> > >> new JSP file timestamps, but this does not even survive a reboot
              > >of
              > >> > >the
              > >> > >> managed server because it AGAIN creates a new temp version of
              > >> everything
              > >> > >on
              > >> > >> the next reboot with new timestamps.
              > >> > >>
              > >> > >> If I wait for the managed server to boot and find the directory
              > >like
              > >> > >> .../applications/.wlnotdelete_man1/wlap7336/webapp/... and physically
              > >> > >copy
              > >> > >> (via cp -pr to retain timestamps) all of the original webapp
              > >components
              > >> > >on
              > >> > >> top of the temp versions, the staleness checker is happy and the
              > >> > >> pre-compiled versions work fine.
              > >> > >>
              > >> > >> There HAS to be a way to package pre-compiled versions of the
              > >JSPs
              > >> > >in the
              > >> > >> "model" application in the admin server and keep from having to
              > >> precompile
              > >> > >> the JSPs on every managed server every time managed server is
              > >booted..
              > >> > >>
              > >> > >> It would help if we had a way to bypass the staleness checking
              > >> > >completely..
              > >> > >> Or you guys should make the timestamps on the files copied by
              > >the
              > >> > >> admin/managed deployment process match properly so the staleness
              > >> checker
              > >> > >> doesn't think the JSP is different.
              > >> > >>
              > >> > >> It would also help if the engineer who wrote this could explain
              > >the
              > >> > >rules
              > >> > >> being implemented by the staleness checker. So far all the messages
              > >> > >in
              > >> > >the
              > >> > >> newsgroup have amounted to point solutions for problems without
              > >a
              > >good
              > >> > >> understanding of what the engine is checking for and/or doing
              > >under
              > >> > >the
              > >> > >> covers. Looking at the generated .java files for the JSP pages
              > >helps,
              > >> > >but
              > >> > >> it is not good enough...
              > >> > >>
              > >> > >> Anyone out there have a working admin/managed server JSP application?
              > >> > >> -Greg
              > >> > >>
              > >> > >> -----------------------------------------------------------
              > >> > >> Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              > >> > >> www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              > >> > >>
              > >> > >>
              > >> > >>
              > >> > >
              > >> > >
              > >> >
              > >>
              > >>
              > >
              > >
              >
              [att1.html]
              

  • Precompiling JSP with admin/managed servers

    Grrr... The JSP engine is extremely frustrating! I've spent many hours
              fighting the "staleness" checker in WL. I've been through all of the
              newsgroup messages pertaining to pre-compiling, etc., and I've gotten
              pre-compilation working on single-server deployments, but admin/managed
              server deployments have me beat.
              WL6.1, SP1, Solaris
              I've done the pageCheckSeconds=-1 and the workingDir is set to a fixed
              place. The fixed place contains pre-compiled versions of all jsps made on
              that machine using jspc not 20 minutes earlier using the JSP files in the
              exploded EAR file used by the admin server as the model for managed
              servers.. The managed servers are on the same machine.
              When the admin server gives an application to a managed server, the managed
              server creates a temporary directory containing all of the webapp
              components, etc. The file timestamps on these files is the set by the
              copying process to the time of the managed server boot (why?!?!????!?), so
              the staleness check always thinks they are new and could care less what
              precompiled jsps I have in my workingDir, the WEB-INF/classes directory, or
              anywhere else. The pageCheckSeconds=-1 seems to be completely ignored in
              this scenario.
              If I tell the managed server to precompile everything on boot (about 45
              minutes for this app) it will create versions of the classes that match the
              new JSP file timestamps, but this does not even survive a reboot of the
              managed server because it AGAIN creates a new temp version of everything on
              the next reboot with new timestamps.
              If I wait for the managed server to boot and find the directory like
              .../applications/.wlnotdelete_man1/wlap7336/webapp/... and physically copy
              (via cp -pr to retain timestamps) all of the original webapp components on
              top of the temp versions, the staleness checker is happy and the
              pre-compiled versions work fine.
              There HAS to be a way to package pre-compiled versions of the JSPs in the
              "model" application in the admin server and keep from having to precompile
              the JSPs on every managed server every time managed server is booted..
              It would help if we had a way to bypass the staleness checking completely..
              Or you guys should make the timestamps on the files copied by the
              admin/managed deployment process match properly so the staleness checker
              doesn't think the JSP is different.
              It would also help if the engineer who wrote this could explain the rules
              being implemented by the staleness checker. So far all the messages in the
              newsgroup have amounted to point solutions for problems without a good
              understanding of what the engine is checking for and/or doing under the
              covers. Looking at the generated .java files for the JSP pages helps, but
              it is not good enough...
              Anyone out there have a working admin/managed server JSP application?
              -Greg
              Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              

              check out post 8366...i found that i was not preserving
              the lastmodified date on my jsps and this was causing
              unnecessary re-compilation.
              hope it helps...
              bobc
              "Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote:
              >I believe I have exhausted all permutations of EARing/notEARing,
              >WARing/notWARing, placing precompiled jsp class files in WEB-INF/classes,
              >placing them in a static location and setting workingDir to that location,
              >combinations of the above.
              >
              >No matter what, the managed server re-compiles pages the first time they
              >are
              >hit. Non admin/managed-server I have no problems.
              >
              >Can anyone from BEA comment on this problem? Or give me a workaround
              >for
              >getting a cluster working with precompiled jsps?
              >
              >-Greg
              >
              >"Greg Nyberg" <greg.nyberg.at.objectpartners.com> wrote in message
              >news:[email protected]...
              >> Grrr... The JSP engine is extremely frustrating! I've spent many hours
              >> fighting the "staleness" checker in WL. I've been through all of the
              >> newsgroup messages pertaining to pre-compiling, etc., and I've gotten
              >> pre-compilation working on single-server deployments, but admin/managed
              >> server deployments have me beat.
              >>
              >> WL6.1, SP1, Solaris
              >>
              >> I've done the pageCheckSeconds=-1 and the workingDir is set to a fixed
              >> place. The fixed place contains pre-compiled versions of all jsps
              >made on
              >> that machine using jspc not 20 minutes earlier using the JSP files
              >in the
              >> exploded EAR file used by the admin server as the model for managed
              >> servers.. The managed servers are on the same machine.
              >>
              >> When the admin server gives an application to a managed server, the
              >managed
              >> server creates a temporary directory containing all of the webapp
              >> components, etc. The file timestamps on these files is the set by
              >the
              >> copying process to the time of the managed server boot (why?!?!????!?),
              >so
              >> the staleness check always thinks they are new and could care less
              >what
              >> precompiled jsps I have in my workingDir, the WEB-INF/classes directory,
              >or
              >> anywhere else. The pageCheckSeconds=-1 seems to be completely ignored
              >in
              >> this scenario.
              >>
              >> If I tell the managed server to precompile everything on boot (about
              >45
              >> minutes for this app) it will create versions of the classes that match
              >th
              >e
              >> new JSP file timestamps, but this does not even survive a reboot of
              >the
              >> managed server because it AGAIN creates a new temp version of everything
              >on
              >> the next reboot with new timestamps.
              >>
              >> If I wait for the managed server to boot and find the directory like
              >> .../applications/.wlnotdelete_man1/wlap7336/webapp/... and physically
              >copy
              >> (via cp -pr to retain timestamps) all of the original webapp components
              >on
              >> top of the temp versions, the staleness checker is happy and the
              >> pre-compiled versions work fine.
              >>
              >> There HAS to be a way to package pre-compiled versions of the JSPs
              >in the
              >> "model" application in the admin server and keep from having to precompile
              >> the JSPs on every managed server every time managed server is booted..
              >>
              >> It would help if we had a way to bypass the staleness checking
              >completely..
              >> Or you guys should make the timestamps on the files copied by the
              >> admin/managed deployment process match properly so the staleness checker
              >> doesn't think the JSP is different.
              >>
              >> It would also help if the engineer who wrote this could explain the
              >rules
              >> being implemented by the staleness checker. So far all the messages
              >in
              >the
              >> newsgroup have amounted to point solutions for problems without a good
              >> understanding of what the engine is checking for and/or doing under
              >the
              >> covers. Looking at the generated .java files for the JSP pages helps,
              >but
              >> it is not good enough...
              >>
              >> Anyone out there have a working admin/managed server JSP application?
              >> -Greg
              >>
              >> -----------------------------------------------------------
              >> Check out my WebLogic 6.1 Workbook for O'Reilly EJB Third Edition
              >> www.oreilly.com/catalog/entjbeans3 or www.titan-books.com
              >>
              >>
              >>
              >
              >
              

  • How to set working-dir for precompiled jsp pages to some where under tmp

    If my weblogic application gets exploded into this tmp directory:
    D:\bea_domains\my_wl_domain\servers\SERVER001\tmp\_WL_user\mywebapp\wxyzzz\war
    where "wxyzzz" is a random directory name generated by weblogic 9.2, how would I set my working-dir in weblogic.xml to store the precompiled jsp classes under:
    D:\bea_domains\my_wl_domain\servers\SERVER001\tmp\_WL_user\mywebapp\wxyzzz\war\WEB-INF\classes\jsp_servlet\_jsp directory?
    Is there an "expression" or "variable" that will hold the value of the tmp directory? Thanks.

    If my weblogic application gets exploded into this tmp directory:
    D:\bea_domains\my_wl_domain\servers\SERVER001\tmp\_WL_user\mywebapp\wxyzzz\war
    where "wxyzzz" is a random directory name generated by weblogic 9.2, how would I set my working-dir in weblogic.xml to store the precompiled jsp classes under:
    D:\bea_domains\my_wl_domain\servers\SERVER001\tmp\_WL_user\mywebapp\wxyzzz\war\WEB-INF\classes\jsp_servlet\_jsp directory?
    Is there an "expression" or "variable" that will hold the value of the tmp directory? Thanks.

  • Reloading precompiled JSP

    Hi,
    We are trying to do this:
    - precompile foo.jsp to foo.class offline;
    - copy foo.class and foo.jsp into a machine weblogic is running,
    maintain their timestamp when they are compiled and generated;
    - when accessing foo.jsp, we hope weblogic will load the precompiled
    foo.class, instead of recompile the foo.jsp again.
    This works well if foo.jsp has not been access (not loaded into
    weblogic yet). BUT, if foo.jsp is accessed before (loaded into
    weblogic), the new foo.jsp is always recompiled.
    We can hot deploy the compiled foo.class using servlet hot deploy,
    but we do not want to use the console. (Is there a command line thing
    to do servlet hot deploy)?
    Is there any other way to do this? The goal -- precompile .jsp,
    server reload the changed .class, never compile .jsp on server.
    We are using WebLogic 5.1.0 with service pack3.
    Any help appreciated.
    Thanks,
    -- Jin

    This is a good question. I will ask the developers.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Jin Hong <[email protected]> wrote in message news:[email protected]..
    >
    Hi,
    We are trying to do this:
    - precompile foo.jsp to foo.class offline;
    - copy foo.class and foo.jsp into a machine weblogic is running,
    maintain their timestamp when they are compiled and generated;
    - when accessing foo.jsp, we hope weblogic will load the precompiled
    foo.class, instead of recompile the foo.jsp again.
    This works well if foo.jsp has not been access (not loaded into
    weblogic yet). BUT, if foo.jsp is accessed before (loaded into
    weblogic), the new foo.jsp is always recompiled.
    We can hot deploy the compiled foo.class using servlet hot deploy,
    but we do not want to use the console. (Is there a command line thing
    to do servlet hot deploy)?
    Is there any other way to do this? The goal -- precompile .jsp,
    server reload the changed .class, never compile .jsp on server.
    We are using WebLogic 5.1.0 with service pack3.
    Any help appreciated.
    Thanks,
    -- Jin

  • Precompiling JSPs Programatically

    Does anyone know how we can precompile JSP programatically?
              We are writing a batched java application that will create a series of JSP
              files on a nightly basis. We would like to compile these files when they
              are created to save some time when users hit these scripts for the first
              time.
              Any help would be excellent. Thanks in advance,
              Marcus
              [email protected]
              

    Hi,
              the documentation
              (http://www.weblogic.com/docs51/classdocs/API_jsp.html#compiler) should
              tell you how. It's pretty easy. Personnally I compile the generated java
              with the jikes compiler.
              I'm attaching a UNIX sh script that does this. You won't be able to run
              it because it depends on other scripts and a special setup but you will
              get idea :)
              Mathieu
              Marcus Leon wrote:
              >
              > Does anyone know how we can precompile JSP programatically?
              >
              > We are writing a batched java application that will create a series of JSP
              > files on a nightly basis. We would like to compile these files when they
              > are created to save some time when users hit these scripts for the first
              > time.
              >
              > Any help would be excellent. Thanks in advance,
              >
              > Marcus
              > [email protected]
              [precompileWebApp.sh]
              

  • Precompile jsp

    Hi,
              do we need to specify any entry for precompiled jsp
              Thanks
              

    To compile the JSPs during deployment, specify "precompile" as true in
              weblogic.xml
              To compile the JSPs during a build and deploy them without compiling them
              again, use the jspc tool with the -webapp option and put the classes in
              WEB-INF/classes
              HTH
              Alex
              On 25 Apr 2003 09:54:14 -0800, Mahesh <[email protected]> wrote:
              >Hi,
              >
              >do we need to specify any entry for precompiled jsp in web.xml
              >
              >Thanks
              

Maybe you are looking for

  • Opening Balance in FBL3N

    Hello Friends, I want to see only closing balance of last year transactions and transaction figures of this year  if i run report for this year. e.g.GL.NO.11000010 has balance in the year 2009 and 2010. if i execute the report for 2010, report should

  • [Forum FAQ] Reduce the size of System Volume Information folder

    Symptom There is a folder called System Volume Information in the root of each drive. (Figure 1) Sometimes, you may find the size of System Volume Information folder is too large. However, it is not recommended to delete the files in it casually sinc

  • To get list of suspended responses from database

    Hi All, we have O2A PIP installed with below versions: Oracle AIA     11.1.1.5 Oracle WebLogic    10.3.5 SOA Suite    11.1.1.5 O2C PIP        11.1.1.1 In Production some of the orders are failing because of Siebel internal error and hence those respo

  • How to test Adobe Document Service credentials

    Hi, I have installed a sneak preview version of Java stack 7.0. With that I have downloaded the latest credentials from the sdn and followed these steps. Copied the .pfx file to <INST_DRIVE>:\usr\sap\J2E\SYS\global\AdobeDocumentServices\TrustManagerS

  • Retina Macbook Pro Graphics Jittery and worse with graphic switching turned off

    I recently updated my computer I've been running Mountain Lion since it was available. But recently I performed the apple updates (which I don't think had anything to do with graphics) and suddenly everything is jittery, choppy and freaking out. I co