You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by M....@DNB.NL on 2011/01/19 17:31:43 UTC

problem with dynamic code in jsp


Hello

We are running tomcat 6.0.29 with tridion broker

We have a jsp with code inside that dynamically fetches data from a
database.
When we put a changed jsp in place it gets compiled and shows the fetched
data from the database.
When we change the data in the database and refresh the page, the changed
data is not displayed.
Only a republish of the jsp or a restart of tomcat will display the changed
data from the database.

Could this be a caching problem with tomcat?
if so; how do we prevent this caching from happening?
if not, what could be the source of the problem then?



greetz, Milko


Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

Re: problem with dynamic code in jsp

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

Milko,

On 1/19/2011 11:31 AM, M.H.G.Emmerig@DNB.NL wrote:
> We have a jsp with code inside that dynamically fetches data from a
> database.

Ok.

> When we put a changed jsp in place it gets compiled and shows the fetched
> data from the database.

Great.

> When we change the data in the database and refresh the page, the changed
> data is not displayed.

How do you fetch the data from the database? If you execute the query
each time, you ought to get fresh data each time the page is invoked. If
you cache the data somehow, then maybe you need to flush your cache.

> Only a republish of the jsp or a restart of tomcat will display the changed
> data from the database.

Sounds like a serious flaw in the code.

> Could this be a caching problem with tomcat?

Tomcat does not cache anything like this. The only caching Tomcat
performs is for static files.

> if so; how do we prevent this caching from happening?

Look at your code.

> if not, what could be the source of the problem then?

Your code.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03FasACgkQ9CaO5/Lv0PBcVQCfSlCD3REJVCxM9/n821ZPqeBs
sHsAniHUYKGhRk1kXm5mChXt7m5eCSJ5
=YJXM
-----END PGP SIGNATURE-----

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