set global response headers on all jsps in tomcat?

L

Larry S

hey - i want to basically set the pragma/no-cache response headers to
all my jsps in my tomcat application. i'm having issues with a proxy
server caching pages here at work, and i can only imagine it happens
else where.

where in the tomcat application to i set this up? i'm having issues
finding it in documentation and on the newsgroups.

thanks!
 
O

Oscar kind

Larry S said:
hey - i want to basically set the pragma/no-cache response headers to
all my jsps in my tomcat application. i'm having issues with a proxy
server caching pages here at work, and i can only imagine it happens
else where.

where in the tomcat application to i set this up? i'm having issues
finding it in documentation and on the newsgroups.

Either at the top of every page, or (if you're using version 2.3 or newer
of the servet specs) using a filter.

Personally, I'd use the filter approach. You can determine in your web.xml
which URL's use the filter, and thus shouldn't be cached.

Note however, that Tomcat itself may already set some headers to that
effect. Unfortunately, I don't remember which headers; but I do seem to
remember that it doesn't set all.


Oscar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top