Hi, 
Please see my inline comments.

Thank you,
Regards,
Vasanth Sekar


-----Original Message-----
From: Pid * [mailto:p...@pidster.com] 
Sent: Thursday, November 22, 2012 1:28 AM
To: Tomcat Users List
Subject: Re: Tomcat 6.0.18 Caching Question

On 22 Nov 2012, at 07:15, "Sekar, Vasanth" <vasanth.se...@supervalu.com> wrote:

> Hello-
> I am working on a project where we are migrating a web app from JRUN 4.0
> to Tomcat 6.0 and facing some sort of caching problem with one of the
> functionality.

>>You refer to Tomcat 6.0.18 in the subject, why would you 'upgrade' to
>>a really old version of Tomcat when 6.0.36 is available with very many
>>important fixes?

That's the standard version that we have inside our environment for Prod move 
at this point.
Tomcat 7.0.8 build is underway but not in our Prod environment yet. So, for now
I have to use the current standard version and hence using this particular 
version 6.0.18.

> The same jsp:include code works fine in JRUN server but
> in Tomcat for the page to work properly I have to clear the cache under
> work/catalina before accessing the page every time.
>
> I thought initially it was some browser cache but that doesn't seem to
> be the case. Clearing the browser cache did not help and only emptying
> the contents in work/catalina seems to do the trick. I understand that
> there is a way to prevent this caching under work/catalina but trying to
> figure out if there is a way where I can explicitly tell Tomcat to
> recompile this particular jsp file upon each request. I looked at JRUN
> to see if it was caching that particular JSP page and even it does it as
> well.
>
> Issue details:
> We are having a list that populates the data from database. For example:
> page number field with values 0,1,2,3,4 ....

>>Ok so far.

> On first time, it does show the proper page selected value - say 4.

>>Not enough information to understand what this means. Can you post
>>code or explain in more detail please?

Sorry, about that. Here is the detailed explanation. 
<html:options collection="pages" property="pageNumber" styleClass="textbody"/>

So, during first time access - html view source
<option value="0" class="textbody">0</option>
<option value="1" selected="selected" class="textbody">1</option>
<option value="2" class="textbody">2</option>
<option value="3" class="textbody">3</option>
<option value="4" class="textbody">4</option>
<option value="5" class="textbody">5</option>

If you notice there is a selected on option value="1" and default option on 
page load will be selected to option value 1

> The
> next time when we try to access it the selected value does not show up
> correctly and it just defaults the first record in the drop down - 0.
>
> I did view source of the html and see the select tag not present upon
> future requests.

>>So the entire SELECT form element is missing?

The selected "selected" is missing upon future requests. This is how it will be 
and since selected is not there it would default to first record 0.
<option value="0" class="textbody">0</option>
<option value="1" class="textbody">1</option>
<option value="2" class="textbody">2</option>
<option value="3" class="textbody">3</option>
<option value="4" class="textbody">4</option>
<option value="5" class="textbody">5</option>

> When I empty the content in nwork/catalina (no tomcat
> restart) then it recompiles the file and would show up the proper value.

>>Still pretty vague as to what you are doing...

I cannot get it show proper selected value on screen until I go to
work\Catalina\localhost\ and delete the previous xyz_jsp.java compiled version. 
I go here and delete this cached file. Then access the same screen again 
This time it would show up like before. Selected option on option value =1 and 
will default correctly.

Please let me know if you need further inputs or if am still unclear in trying 
to explain the whole problem. 

p


> The same code works fine in JRUN and am trying to figure out how to get
> this working in Tomcat without having to clear Tomcat cache.
>
> If anyone has some thoughts to debug this situation further, please shed
> some light.
>
> Thank you,
> Regards,
> Vasanth Sekar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Reply via email to