JSP caching

Hi,
          is it possible to enable JSP caching on the server side?
          with this I mean, let's say that an user make a jsp request to the server,
          the server invoke the requested jsp/servlet by the user, the JSP/servlet
          then connect to a database (via EJB) and get the requested data.
          Finally the server send then the response back to the client. (everybody
          happy :-) )
          The second time, the same user make another JSP request to server
          containing the same "get" or "post" data as in the first time in the http
          request.
          Ok here is when my question comes: does the application server notice this
          similarity in the http request header? or does the server just make another
          request to the
          JSP/servlet?
          Thank you,
          Rob
          

There is a new caching feature in the next SP.
          No, servers don't assume that an identical request gets an identical
          response, although more and more app servers are building in caching
          support. Silverstream for example has pretty good caching support, and WL
          should soon.
          Cameron Purdy
          [email protected]
          http://www.tangosol.com
          WebLogic Consulting Available
          "Rob" <[email protected]> wrote in message
          news:[email protected]..
          > Hi,
          >
          > is it possible to enable JSP caching on the server side?
          >
          > with this I mean, let's say that an user make a jsp request to the server,
          > the server invoke the requested jsp/servlet by the user, the JSP/servlet
          > then connect to a database (via EJB) and get the requested data.
          > Finally the server send then the response back to the client. (everybody
          > happy :-) )
          >
          > The second time, the same user make another JSP request to server
          > containing the same "get" or "post" data as in the first time in the http
          > request.
          > Ok here is when my question comes: does the application server notice this
          > similarity in the http request header? or does the server just make
          another
          > request to the
          > JSP/servlet?
          >
          > Thank you,
          >
          > Rob
          >
          >
          >
          

Similar Messages

  • JSP Caching in Tomcat

    Hello, I'm using Tomcat 5.0 and I'm having problems with JSP caching.
    My webapp is hosted in a remote server on which I telnet into to do my development work. At first, everything was fine, i.e. I didn't face any JSP caching problem.
    However, when another developer decided to telnet into the same server to do his development work on the same webapp, we started to experience JSP caching problem.
    We had to delete the content of the "work" folder and restart the server for any changes to take effect.
    Does anyone know how to sort out this problem?

    OK, I've found out the way to resolve this.
    Basically, each developer will need to "touch" all his JSPs to make sure their JSPs get compiled.

  • Info on JSP caching in WebLogic 5.1

              Hi,
              I found your name in the Weblogic newsgroup and hence decided to post this
              question to you. Hope you do'nt mind my asking it.
              I would like to know something about caching of Java Server Pages in WebLogic
              5.1. How effective is it for developing and deploying applications on WebLogic
              Server ? Has caching in WebLogic been tried out extensively in deploying applications
              before ? How successful have they been ?
              In particular, I would like to know if any deadlock occurrs in Java Server
              Page caching in WebLogic.
              Also can I force a cache to refresh within the timeout period (i.e., before
              the elapse of the timeout for the particular cache) ?
              Also, how is the async attribute used in <wl:cache> tag ? Is there any performance
              bottleneck occurring due to its usage ?
              I would love to have answers to all my questions. However even if I get some
              answers it will be highly appreciated.
              Regards,
              Sumantu
              

    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 ?
              

  • Servlet / JSP caching problem!!

    I have a servlet that is running a process which creates an image. The servlet also is creating two jsp pages, one with a frameset for the header and body, and the other being the body. The body is supposed to dynamically use the new image, but it is cached and shows the old image until I manually hit the refresh button. In the servlet, I delete all the files / images before the process is run. When I had the image inside its own frame, I got it to work, but the client doesn't want it that way. I don't understand why it does not work now?

    I saw some topics about this problem in Servlets Forums in this site, try to find there.
    Forum Home > Servlet and JSP Technology.
    Good Luck,
    Jusbe

  • JSP caching on Apache

    Hi,
    We are getting inconsistent caching of our JSP's on APACHE.
    Here is a sample response header.
    HTTP/1.1 200 OK
    Date: Fri, 04 Mar 2005 11:57:16 GMT
    Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)
    Content-Type: text/html; charset=utf-8
    Cache-Control: max-age=7200, must-revalidate
    Last-Modified: Fri, 04 Mar 2005 11:53:45 GMT
    Expires: Fri, 04 Mar 2005 13:53:45 GMT
    Content-Length: 22396
    Age: 1073
    I would expect the JSP to expire after two hours but Apache seems to randomly expire the page after 2-50 minutes.
    Here are our APache cache settings :-
    CacheRoot               /cache               
    CacheSize               15000000
    CacheGcInterval               4
    CacheMaxExpire          24
    CacheLastModifiedFactor     1
    CacheDefaultExpire          24
    CacheDirLevels               not set
    CacheDirLength               not set
    CacheNegotiatedDocs          on
    NoCache               not set
    Any help/suggestions much appreciated.

    Make sure you only have one instance of PageContext in your classpath.
    Check all the jars in your classpath. I know that orion.jar has an instance of PageContext that you should remove.

  • OC4J jsp caching issues.

    Hi All,
    We have deployed a set of jsp reports using Oracle reports 10g (9.0.4.0.0) and are noticing that the reports server appears to have cached prior versions of the reports on the server. We have attempted to restart the OC4J instance several times, and have found that if we remove delete the report files from the deployment directory, we get a 404 error. Copying the new files back causes the old versions to still load. If we modify the files in that directory in some way, and then save them, that appears to force the reports server to load the new files, but we are hoping that there is a way to not have to do this every time we want to deploy new copies of these files.
    Any suggestions for what might cause this?
    Thanks,
    Allan

    It is standalone OC4J at the moment as in UAT. I notice memory usage going up and has to be restarted every 4 hours. I used a memory profiler from JDeveloper. From there I saw the memory go up and up without doing anything with our applications. There are a lot of String objects in memory that keep going up coming from similar methods to what I described above.

  • Creating and updating table in JSP Through ADD and SAVE button

    how do I create a table in JSP which has certain number of columns and rows. I have a button called "ADD", which when clicked should add the data I entered. How do I update and save the same?, if there are buttons called "SAVE" and "DELETE".

    Do u want to add it to the database or just in the JSP Cache???
    I think if you want to add to DB, take the subject offline.
    My Mail id is [email protected]

  • Oracle.jsp.parse.JspParseException

    After making minor changes to my jsp's, i deployed the war and now the jsp's cant find the tld's, even though they exist.
    I get the following error:
    500 Internal Server Error
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/tld/c" prefix="c"%>
    Error: java.io.IOException: Referenced TLD does not exist or is invalid
    Any say...please:-|?

    Does making change in the global-web-application.xml help (jsp-cache-tlds="false")?I do not see any relevance of gloabl-web-application.xml here.
    They exist in WEB-INF/tld folder.
    OracleJSP: oracle.jsp.parse.JspParseException: Line # 3, <%@ taglib
    uri="/tld/extremecomponents" prefix="ec" %>
    Error: java.io.IOException: Referenced TLD does not exist or is invalidIf it is in WEB-INF/tld, then you can write
      <%@ taglib uri="/WEB-INF/tld/extremecomponents.tld" prefix="ec" %>
    The "/WEB-INF" is missing in your version.
    Of course, there are other ways to provide the uri attribute. However, the above is most direct way. As a sanity test, let us get it working first by the above way.

  • Jsp not refresh on prodution

    when i redepoly an application by updating it, its jsps are not refreshed. but on dev env ,it's ok. the pro env has two machine,take them as A & B.A is the admin machine ,and the app is not the machine B. I update the app from A ,but its jsps never updated,i have to delete the app from A,and then redepolyit,then it's ok. can someone tell me why ,or how can i update jsps without delete and redepoly?
    I delele the jsp cache, and it seems work now...
    Edited by: San on 2012-1-15 下午6:52

    Hi,
    In prod page-check-seconds value would be -1 .
    check your weblogic.xml file.
    Sets the interval, in seconds, at which WebLogic Server checks to see if JSP files have changed and need recompiling. Dependencies are also checked and recursively reloaded if changed.
    The value -1 means never check the pages. This is the default value in a production environment.
    The value 0 means always check the pages.
    The value 1 means check the pages every second. This is the default value in a development environment.
    In a production environment where changes to a JSP are rare, consider changing the value of pageCheckSeconds to 60 or greater, according to your tuning requirements.
    so according to it.
    Regards,
    Kal

  • Caching binary content (raw files) in Weblogic -- in-built support ?

    There are some raw binary files on disk (PDFs , images etc).
    There is a servlet which receives requests for files, does some authorization
    checks -- then reads file & delivers binary content to HTTP response.
    To avoid file read for each request, we need to cache the binary content in Weblogic.
    The important design aspects for this caching wud be : (i) some files can be quite
    large (ii) frequency of request can vary greatly between different files (ii)
    the files are not modified on disk frequently -- hence the cache can be refreshed
    after longer intervals
    Does Weblogic provide any built-in caching mechanism for such operations ?
    Thanks,
    Subodh

    To avoid file read for each request, we need to cache the binary contentin Weblogic.
    Does Weblogic provide any built-in caching mechanism for such operations ?There are some JSP cache tags.
    http://edocs.bea.com/wls/docs70/jsp/customtags.html#56944
    There are various caching packages, both commercial and open source. For
    what you're describing, I think you'd have no problem using OSCache, which
    is open source.
    http://www.opensymphony.com/oscache/
    If you need clustered cacheing use Coherence.
    http://www.tangosol.com/coherence.jsp
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Subodh" <[email protected]> wrote in message
    news:3fd4236c$[email protected]..
    >

  • OC4J11 deployment problem - TLD Caching issue

    Hello,
    I'm having problem deploying a JSF 1.2 web app. This web app uses third-party tags which are packaged under "WEB-INF/lib". When deploy this web app (as an EAR file), I'm getting these errors -- which seemed to relate to TLD CACHING:
    2007-12-17 20:09:23.875 NOTIFICATION Binding PETMailWeb web-module for application PETMailWeb to site default-web-site under context root PETMailWeb
    2007-12-17 20:09:27.734 WARNING J2EE HTTP-00009 Error while building tldcache for application: PETMailWeb
    2007-12-17 20:09:30.593 NOTIFICATION Application Deployer for PETMailWeb FAILED.
    2007-12-17 20:09:30.593 NOTIFICATION Application UnDeployer for PETMailWeb START
    S.
    I looked in the Oracle® Containers for J2EE Support for JavaServer Pages Developer's Guide 10g Release 3 (10.1.3) document (http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b14430.pdf) and it recommended that parameter "jsp-cache-tlds" in global-web-application.xml is "Set to on to search all directories within the Web application for TLD files. Any found will be added to the list of TLD files inherited from the global Web application".
    So I made the changes, restarted my OC4J11 instance and deployed my JSP app again. Still getting the same error.
    Has anybody encountered this same issue ?

    Caching is turned on by default. If you want to modify your roles and have them take effect immediately then you should turn caching off. This is mentioned in the docs:
    http://download-uk.oracle.com/docs/cd/B25221_04/web.1013/b14429/configldap.htm#BEHBGDFE

  • Remte JSP debugging for standalong OC4J 10.3.x not working

    Follow the next steps:
    1. Copying the ojc.jar, jdev-rt.jar and jdev-remote.jar to the OC4J_HOME/lib
    directory
    2. Add the next lines to the application.xml file
    < !-- Remote Debug settings -->
    < library path="../../../lib/jdev-rt.jar" />
    < library path="../../../lib/ojc.jar" />
    < library path="../../../lib/ojmisc.jar" />
    3. Change the global-web-application.xml in a text editor.
    From the following section:
    < orion-web-app
    jsp-cache-directory="./persistence"
    servlet-webdir="/servlet"
    development="false"
    >
    Change development="false" to development="true" to enable servlet
    debugging.
    4. In the global-web-application.xml file, modify the jsp servlet tags to be:
    < servlet>
    < servlet-name>jsp< /servlet-name>
    < servlet-class>oracle.jsp.runtimev2.JspServlet< /servlet-class>
    < init-param>
    < param-name>debug_mode< /param-name>
    < param-value>true< /param-value>
    < /init-param>
    < init-param>
    < param-name>developer_mode< /param-name>
    < param-value>true< /param-value>
    < /init-param>
    < init-param>
    < param-name>encode_to_java< /param-name>
    < param-value>true< /param-value>
    < /init-param>
    < init-param>
    < param-name>emit_debuginfo< /param-name>
    < param-value>true< /param-value>
    < /init-param>
    < init-param>
    < param-name>jspjavacompiler< /param-name>
    < param-value>oracle.jdevimpl.jsp.JspOjcCompiler< /param-value>
    < /init-param>
    < load-on-startup>0< /load-on-startup>
    < /servlet>
    5. Start the oc4j using the next command:
    java -hotspot -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar
    6. Deploy the application
    7. Select the Remote Debugging and Profiling option in the Run Configuration
    for the project with the jsp to debug.
    8. In the Debugger/Remote section of the run Configuration set the host, port
    and timeout to the correct ones (name of the computer where you are running
    the application).
    When trying to run the jsp you are going to get the error:
    STACK ERROR:
    07/12/28 11:56:56
    ....\j2ee\home\application-deployments\MyJ2eeApp\MyJ2eeApp\persistence\_pages\_MyPage
    error #552: illegal forward reference
    07/12/28 11:56:56 /*@lineinfo:filename=/MyPage.jsp*/
    07/12/28 11:56:56
    2007-12-28 11:56:57.703 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP
    Page : oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: _MyPage
    Dependent class: oracle.jsp.runtimev2.JspPageInfo
    Loader: oc4j:10.1.3
    Code-Source: ..../j2ee/home/lib/ojsp.jar
    Configuration: < code-source> in META-INF/boot.xml in ....\j2ee\home\oc4j.jar
    This load was initiated at MyJ2eeAppInfo.web.MyJ2eeAppInfo.jsp26687282:0.0.0 using the loadClass() method.
    The missing class is not available from any code-source or loader in the system.
    at oracle.classloader.PolicyClassLoader.handleClassNotFound
    (PolicyClassLoader.java:2068) [/C:/sw/oracle/oc4j101330/j2ee/home/lib/pcl.jar
    (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]
    Reproduced the problem with the next products:
    JDev OC4J Reproduced?
    10.1.3.3.0 10.1.3.2.0 YES
    10.1.3.3.0 10.1.3.3.0 YES
    10.1.3.2.0 10.1.3.2.0 YES
    When i try not use the following tags section
    < init-param>
    < param-name>emit_debuginfo< /param-name>
    < param-value>true< /param-value>
    < /init-param>
    everything is working, but ojc not generate debug information for compiled JSP page and debugger doesn't stop at break points.
    When i try use thise tags section, i got the next instructions for compiler in MyPage.java (it is generated from MyPage.jsp):
    /*@lineinfo:filename=/MyPage.jsp*/
    /*@lineinfo:generated-code*/
    and compiler is generating next message in console:
    error #552: illegal forward reference
    07/12/28 11:56:56 /*@lineinfo:filename=/MyPage.jsp*/
    and doesn't want to compile MyPage.java.
    I need help with this problem! And i don't have any ideas how to solve it. People, help me, please!

    Dear dvohra, have you ever try yourself the method, which you suggest?
    It is not working!
    If i try to configure OC4j like in blog, IDE doesn't stop in JSP's break points.
    So, I need in 100% working solution for remote debugging on oc4j 10.3.x. The main reason of using remote debug for me is that i have to develop portlets, and i have to invoke my portlets from portal. It is posible only when i deploy my portlet on stand alone oc4j!
    I really need remote debug! And i'll be very thankful someone for 100% working solution!

  • Caching & thread in ejb

    Hi,
    In order to gain better performance in our current application
    we need to cache some data in both web and ejb tier. Data that
    we need to store is not client specific (global data) and rarely
    changes. In web tier we cache this kind of data in
    ServletContext. We are trying to find a way to store data in ejb
    tier. In our design we use only Stateless Session Beans in which
    we have JDBC calls to access DB. In particular case we need to
    get some data from DB that is specific to current date. So,
    ideally we would like to fetch that data when ejb server starts,
    store it and refresh it at midnight. So, if this was not an ejb
    application we would probably use Singleton to store this data
    and have some thread that will wake up at 0:00 to refresh
    state of the singleton object.
    I would really appreciate any suggestion.
    Regards,
    Ilija

    Making it ReadOnly will ensure that ejbLoad is not called. Also,
    if you use 6.1, generated home implements weblogic.ejb.Caching[Local]Home,
    which makes invalidations (local and in cluster) easier.
    Ilija <[email protected]> wrote:
    Thanks. I have few more questions regarding caching. I am not
    sure if what I am doing is completely correct.I have entity ejb
    with bean managed persistence that caches data. Data is
    retrieved from multiple tables and there is no real bean dentity
    in DB.
    ejbFindByPrimaryKey does not go to DB, it simply returns passes String value(primary
    key).
    ejbLoad() loads everything from DB and initialize instance of
    the bean.
    ejbRemove() does not do anything.
    ejbStore() does not do anything.
    ejbActivate() does not do anything
    ejbPasivate does not do anything
    invalidate() throws RemoteException
    baean is deployed with NotSupported transaction attribute.
    Everything seems to be working OK. I am wandering if there is any
    benefits of making this bean as a read only since ejbStore does
    not do anything in my case.
    Dimitri Rakitine <[email protected]> wrote:
    That's what I did - I wrote my own implementation of JMX timer.
    Anyway, this deprecation of time services is a little confusing. I saw
    2 replacement recommendations in WebLogic docs (both unacceptable) -
    use
    java.util.Timer, or purchase Flux.
    On the other hand, time services work just fine in 6.1.
    Ilija <[email protected]> wrote:
    Thanks Dimitri. I see that weblogic deprecated api for trigger andI am curios
    if it would be correct to have my own scheduler in web tier that willinvalidate
    this ejb.
    Dimitri Rakitine <[email protected]> wrote:
    Schedule a trigger which will invalidate RO bean(s) at midnight ?
    Ilija <[email protected]> wrote:
    Thank you for your suggestions Rob. I guess read only entity beansare very close
    to what we need. The only issue I can see is the fact that we haveto update state
    of this bean at midnight. Since we are not supposed to create threadin ejb container
    what do you suggest as a way to do that?
    Regards,
    Ilija
    Rob Woollen <[email protected]> wrote:
    Ilija wrote:
    Hi,
    In order to gain better performance in our current application
    we need to cache some data in both web and ejb tier. Data that
    we need to store is not client specific (global data) and rarely
    changes. In web tier we cache this kind of data in
    ServletContext.I would suggest that you use the JSP Cache tags and Cache filters
    in
    WLS for caching in the web tier. They will allow you to cache pages
    or
    page fragments.
    We are trying to find a way to store data in ejb
    tier. In our design we use only Stateless Session Beans in which
    we have JDBC calls to access DB. In particular case we need to
    get some data from DB that is specific to current date. So,
    ideally we would like to fetch that data when ejb server starts,
    store it and refresh it at midnight. So, if this was not an ejb
    application we would probably use Singleton to store this data
    and have some thread that will wake up at 0:00 to refresh
    state of the singleton object.
    Take a look at Read-Only entity beans.
    -- Rob
    I would really appreciate any suggestion.
    Regards,
    Ilija
    Dimitri--
    Dimitri
    Dimitri

  • Il8n with JSPs

    The examples I've seen check the language in the session and load the entire
    set of translated strings into the session object. This doesn't seem like a
    very scalable way to proceed. Can any one point me to an article with a
    better design or append some code snippets that show how you've done this
    better?
    TIA, Mark

    Hi,
    Are you using Appserver 8.1 PE version?
    Can you provide those 2 JSPs sothat I can try out the same and check it out?
    BTW, in which browser did you try this stuff?
    Seems to be some JSP cache problem for me..
    Can be investigated it, if you provide those 2 JSPs...
    Thanks,
    -Balaji.

  • How Open And Print Proc C Genrated Text File Based Report ON Browser

    Dear Sir
    I have my old 6i forms from which i runs some Pro*c programmers with the help of HOST() command ,and then that generates a normal text file as a resultant report like file name "kha10"
    which i can easily open with any text client ,,,
    now what i want is that, to open this file on browser like web Report on my forms 10g like report builder 10g
    can anyone help me as it will be a gr8 help otherwise i would have to develop approx 100 reports.....
    any solution or any technique plzz help me

    bro my work is almost done apart from this virtual directory , how to make a virtual directory so that is dosent comes under
    http://........../form/
    i mean where to put my
    <virtual-directory virtual-path="/procrepo" real-path="c:\" />
    as my original file looks like bellow
    <?xml version="1.0"?>
    <!DOCTYPE orion-web-app PUBLIC "-//ORACLE//DTD OC4J Web Application 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd">
    <orion-web-app
         deployment-version="10.1.2.0.2"
         jsp-cache-directory="./persistence"
         temporary-directory="./temp"
         servlet-webdir="/servlet/"
    >
    <context-param-mapping name="configFileName">D:\DevSuiteHome_1/forms/server/formsweb.cfg</context-param-mapping>
         <virtual-directory virtual-path="/html" real-path="D:\DevSuiteHome_1/tools/web/html" />
         <virtual-directory virtual-path="/java" real-path="D:\DevSuiteHome_1/forms/java" />
         <virtual-directory virtual-path="/webutil" real-path="D:\DevSuiteHome_1/forms/webutil" />
         <virtual-directory virtual-path="/jinitiator" real-path="D:\DevSuiteHome_1/jinit" />
         <session-tracking cookies="disabled" />
    <!-- Uncomment this element to control web application class loader behavior.
    <web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
    -->
    <security-role-mapping name="administrators">
    </security-role-mapping>
    </orion-web-app>
    plzzzzzzzzzzz help

Maybe you are looking for