• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

caching

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with WAS 3.5. I have a problem in JSP's. Most of the time I get old versions of jsp loading. I have to restart the server to curb this menace. I have tried deleting class files in the temp folder ..but still no effect. Can anyone help me out in diabling cache atleast during the development stage.
Thanks in advance
Shiva
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shiva, we face the problem too... as a short-term measure, instead of restarting the whole server, just restarting the WAS service did the trick also for me (besides cleaning out the TEMP, naturally...). If you get some sort of Internal Error, just close any Java processes you see in the Task Manager. Retry shutting down the service - it should work. Cheers,
pd
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a simple date.jsp file

It works fine
Now i edited the date.jsp file like this

The new page gave me an exception
Message: Server caught unhandled exception from servlet [JSP 1.1 Processor]: Unable to compile class for JSP "/rahul1.jsp" C:\WebSphere\AppServer\temp\default_host\thisworks\_rahul1_jsp_2.java:18: Class gg not found in import. import gg; ^ 1 error
So things work fine on my system. Got to check out if there are any settings in this regard.
[This message has been edited by Rahul Mahindrakar (edited June 11, 2001).]
 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See I tell you something...whenever you compile a jsp in webshpere what it does is it puts the html part into the a data file and the class files are separate. So when you compile them the html and script data are taken from the existing ones and are not modified. So what you did is just a small code. When you write big codes using html and scripts, you often confront the problem of retrival of data from cache.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could you send over some .jsp file that has these problem of cache
 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No jsp of mine can be accessed individually. Everything has got a session. Its of no use sending my jsp's. Try it on ur own using a lot a lot of html data and javascripts ....probably it may be useful in future tracking these errors
shiva
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JSP documentation for was contains this documentation. Note this is applicable only from 3.5.2.
JSP reloading
You can configure how often each web application on the WebSphere Application Server will
look for revised JSP files that need to be recompiled. By default, the Application Server will
check for the presence of a class file every time a JSP is called, and compile the class file if one
doesn't already exist. For performance purposes, you may wish to disable this check entirely or
only after the JSP is called for the first time. Additionally, you may wish configure the amount
of time between checks. Two web application attributes are used to specify how you want this
done for each web application:
checkjspfiles
This attribute has three possible values:
"true" (or "always") - this will cause the Application Server to check for the
presence of a class file each time the JSP is called or each X number of
milliseconds specified in the reloadinterval below.
m
"firsttime" - the Application Server will check for the presence of the class file
only once: when it is called for the first time.
m
"false" (or "never") - the Application Server will never check for the class file (you
must ensure that a class file already exists for the JSP to work properly).
m
1.reloadinterval
The number of milliseconds between each check. This variable only works when you
have selected "true" (or "always") as the value for checkjspfiles above.
I did not find the checkjspfiles property. i hope i will find it somewhere.

[This message has been edited by Rahul Mahindrakar (edited June 11, 2001).]
 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your useful info. I am right working on WAS 3.5 only I shalldownload the patch and try out what you said. If you find the attribute do mail me.
Thanks
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shiva,
for servlets, in the Advanced tab there is something called "Auto reload". If i set it to false then when the HelloWorldServlet string is changed to Hello World Rahul and recompiled then the new string is not shown and the old string "HelloWorld" continues to be seen.
The same feature i would like to see in an JSP. Basically once a jsp is compiled i would not like to see it compiled again if changes are being undertaken. In the WebApplication "advanced tab" i have added the attribute "checkjspfiles" to "firsttime" as specified in the documentation above. When i make changes to the JSP file however the changes are being reflected when invoked. I do not know why and how.
Lets see i will work on this later on.
 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can u send me the url for jsp tutorial you saw ?
 
Rahul Mahindrakar
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out Infocenter JSP section.
 
reply
    Bookmark Topic Watch Topic
  • New Topic