You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Sekar, Vasanth" <Va...@supervalu.com> on 2012/11/22 08:14:55 UTC

Tomcat 6.0.18 Caching Question

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. 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 ....
On first time, it does show the proper page selected value - say 4. 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. When I empty the content in work/catalina (no tomcat
restart) then it recompiles the file and would show up the proper value.
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat 6.0.18 Caching Question

Posted by Mark Thomas <ma...@apache.org>.

"Caldarale, Charles R" <Ch...@unisys.com> wrote:

>> From: a b [mailto:jruohone@gmail.com] On Behalf Of Jukka Ruohonen
>> Subject: Re: Tomcat 6.0.18 Caching Question
>
>> I am not too keen to see every other question on this list
>> being turned into a question about upgrading.
>
>There are two significant reasons for sites to stay up to date on
>server software such as Tomcat:
>
>1) Critical security issues are published once the fix is available in
>a released version.  By refusing to upgrade, and making public the fact
>that your site is running an ancient version, one is sending out an
>invitation to hackers.  That's the irresponsibility part.
>
>2) Tomcat support on this mailing list is done by unpaid volunteers.  I
>doubt that any of us have an interest in turning the clock back four
>years to experiment with a superseded version where the problem
>(especially ill-described ones, such as this) might well have been
>fixed somewhere along the way.  It would greatly benefit the OP if he
>at least tried to reproduce the problem on a current version.  If the
>problem is resolved, he would have considerable leverage to get
>management to approve a true upgrade; if the problem persists, then we
>now have something more pertinent to go on.

+1.

Mark

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


RE: Tomcat 6.0.18 Caching Question

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: a b [mailto:jruohone@gmail.com] On Behalf Of Jukka Ruohonen
> Subject: Re: Tomcat 6.0.18 Caching Question

> I am not too keen to see every other question on this list
> being turned into a question about upgrading.

There are two significant reasons for sites to stay up to date on server software such as Tomcat:

1) Critical security issues are published once the fix is available in a released version.  By refusing to upgrade, and making public the fact that your site is running an ancient version, one is sending out an invitation to hackers.  That's the irresponsibility part.

2) Tomcat support on this mailing list is done by unpaid volunteers.  I doubt that any of us have an interest in turning the clock back four years to experiment with a superseded version where the problem (especially ill-described ones, such as this) might well have been fixed somewhere along the way.  It would greatly benefit the OP if he at least tried to reproduce the problem on a current version.  If the problem is resolved, he would have considerable leverage to get management to approve a true upgrade; if the problem persists, then we now have something more pertinent to go on.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Tomcat 6.0.18 Caching Question

Posted by Jukka Ruohonen <jr...@iki.fi>.
On Thu, Nov 22, 2012 at 04:49:42PM +0000, Pid wrote:
> > Have you read the security vulnerability pages?
> 
> Maybe he's emailing us from the year 2008.

Maybe. That said, I am not too keen to see every other question on this list
being turned into a question about upgrading. Most of the questions are
valid regardless of the used version. Signal to noise, and all that.

- Jukka.

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


Re: [OT] Tomcat 6.0.18 Caching Question

Posted by André Warnier <aw...@ice-sa.com>.
Sekar, Vasanth wrote:
> I very well understand the point everyone are trying to make here . But, unfortunately I have to go with the approved version with in our environment. I believe there were also talks about 7.0.26 but it will be quite some time before they pilot everything and approve the version for Prod usage :(. I don't have any authority to change how things work but will for sure bring that concern up to the architect team when I meet with them next time.
> 

It is at times like this that one pauses to reflect on the rise and subsequent decline and 
fall of great human civilisations. Built by giants and warriors, perfected by artists and 
architects, inevitably ending up whittled down by winds and weeds and bureaucrats.

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


RE: Tomcat 6.0.18 Caching Question

Posted by "Sekar, Vasanth" <Va...@supervalu.com>.
I very well understand the point everyone are trying to make here . But, unfortunately I have to go with the approved version with in our environment. I believe there were also talks about 7.0.26 but it will be quite some time before they pilot everything and approve the version for Prod usage :(. I don't have any authority to change how things work but will for sure bring that concern up to the architect team when I meet with them next time.

That being said, any thoughts on the original problem though :)

Thank you,
Regards,
Vasanth Sekar


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

On 22/11/2012 16:29, Mark Thomas wrote:
> On 22/11/2012 15:39, Sekar, Vasanth wrote:
>> 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.

If the Tomcat 7.x build is still underway, why don't pop over to whoever's desk it is that's doing the work and point out that 7.0.33, (that's *thirty-three* on the end there), is 25 releases after the out of date one that they're planning to install... ?


> 6.0.18 and 7.0.8?
> 
> Have you read the security vulnerability pages?

Maybe he's emailing us from the year 2008.


p


-- 

[key:62590808]


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


Re: Tomcat 6.0.18 Caching Question

Posted by Pid <pi...@pidster.com>.
On 22/11/2012 16:29, Mark Thomas wrote:
> On 22/11/2012 15:39, Sekar, Vasanth wrote:
>> 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.

If the Tomcat 7.x build is still underway, why don't pop over to
whoever's desk it is that's doing the work and point out that 7.0.33,
(that's *thirty-three* on the end there), is 25 releases after the out
of date one that they're planning to install... ?


> 6.0.18 and 7.0.8?
> 
> Have you read the security vulnerability pages?

Maybe he's emailing us from the year 2008.


p


-- 

[key:62590808]


Re: Tomcat 6.0.18 Caching Question

Posted by Mark Thomas <ma...@apache.org>.
On 22/11/2012 15:39, Sekar, Vasanth wrote:
> 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.

6.0.18 and 7.0.8?

Have you read the security vulnerability pages?

Mark


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


Re: Tomcat 6.0.18 Caching Question

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vasanth,

I'm finally getting around to reading all the messages in this thread.
I have a few questions:

On 11/22/12 10:39 AM, Sekar, Vasanth wrote:
> Sorry, about that. Here is the detailed explanation. <html:options
> collection="pages" property="pageNumber" styleClass="textbody"/>

So you are using Apache Struts. Good to know. Maybe next time tell us
that's what's happening.

What's in the "pages" collection? From what scope does that get loaded
(page, request, session, or application)?

If you are using <html:options>, it's going to be related to a "form
bean". Does the form bean know which item should be pre-selected? How?
IIRC, Struts takes the form's "pageNumber" value and if it matches any
item in the "pages" collection, it sets that one to "selected".

> 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 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>

Sounds like the form bean's "pageNumber" value is probably null.
Perhaps the form bean has been lost? Or reset? Is this a single user
navigating to the page (and getting selected=1) then hitting RELOAD
and getting no pre-selected item?

This question almost certainly has nothing to do with Tomcat, and
everything to do with your own webapp/JSP and Struts.

We still may be able to help, but you are going to need to provide
more information.

As for your your ops team, you should tell them to abandon their 7.0.8
testing and piloting: it's a complete and utter waste of their time.
Tell them to start over with 7.0.33 or just give up on ever approving
another version of Tomcat again because they can't get it done in a
reasonable time.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC36dQACgkQ9CaO5/Lv0PAafACferZTwpDozR1pkPphcNmlbHnA
y6MAoJBZACLjppp467NpO4uuNKMp7cjm
=7JA/
-----END PGP SIGNATURE-----

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


RE: Tomcat 6.0.18 Caching Question

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Sekar, Vasanth [mailto:Vasanth.Sekar@supervalu.com] 
> Subject: RE: Tomcat 6.0.18 Caching Question

> That's the standard version that we have inside our environment for 
> Prod move at this point.

Your upgrade strategy is very seriously flawed.

> Tomcat 7.0.8 build is underway but not in our Prod environment yet.

So you're going to "upgrade" from a four-year-old version to one that's nearly two years old?  That is simply irresponsible.

 - Chuck 


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


RE: Tomcat 6.0.18 Caching Question

Posted by "Sekar, Vasanth" <Va...@supervalu.com>.
Hi, 
Please see my inline comments.

Thank you,
Regards,
Vasanth Sekar


-----Original Message-----
From: Pid * [mailto:pid@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" <Va...@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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



Re: Tomcat 6.0.18 Caching Question

Posted by Pid * <pi...@pidster.com>.
On 22 Nov 2012, at 07:15, "Sekar, Vasanth" <Va...@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?


> 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?


> 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?


> 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...


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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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