473,473 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Servlet Problem: Always Load old java servlet class

Dear all,

I have a servlet problem.

When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.

I want to know how I can make sure I always see the most update
servlet program.

Please help.

Thank you very much.
Alan
Jul 17 '05 #1
6 3156

"alan" <ch***********@i-cable.com> wrote in message
news:7b*************************@posting.google.co m...
Dear all,

I have a servlet problem.

When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.

I want to know how I can make sure I always see the most update
servlet program.

Please help.

Thank you very much.
Alan


You should set some HTTP headers in the response to inform browser/proxies
they should not cache your output. Headers I would suggest:

Pragma: no-cache
Cache-Control: no-store
Expires: 0

These will probably solve your problem.

Regards,

Silvio Bierman
Jul 17 '05 #2
> You should set some HTTP headers in the response to inform browser/proxies
they should not cache your output. Headers I would suggest:

Pragma: no-cache
Cache-Control: no-store
Expires: 0


Also, if you are using MSIE then try:
tools->internet options -> General -> settings
and check 'Every visit to page'.

Regards - Jesper
Jul 17 '05 #3
> When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.


Every time you modify a servlet you'd better restart the Servlet Container
(Tomcat or others...).
Hope this is the final fix!

Luca Paganelli
Jul 17 '05 #4
Hi Alan,

This can be really infuriating, when viewing from IE try holding down shift
and F5 to refresh.

Hope this helps
"alan" <ch***********@i-cable.com> wrote in message
news:7b*************************@posting.google.co m...
Dear all,

I have a servlet problem.

When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.

I want to know how I can make sure I always see the most update
servlet program.

Please help.

Thank you very much.
Alan

Jul 17 '05 #5
Luca is right, your hosting company is probably running Tomcat, and if it's
an older version (<4.1) you will have to restart the servlet container
every time you make a change to a class or a jar file. I had the same
situation with a hosting company and finally decided to lease my own server
instead of calling them up 10x a week to restart the servlet container.

Good luck

"Luca Paganelli" <lu*******@TOGLILOlibero.it> wrote in message
news:WE*******************@tornado.fastwebnet.it.. .
When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.


Every time you modify a servlet you'd better restart the Servlet Container
(Tomcat or others...).
Hope this is the final fix!

Luca Paganelli

Jul 17 '05 #6
Dear all,

Thank you for your kindly help.

I tried set the head as non-cached. But it doesn't work.
I don't know what I am wrong.
I just want to refresh my java servlet program when it is modified and
uploaded to web server (say "Tomcat").
It is not allowed me to reload the webserver, so I need this function
to force client browser to get the latest java servlet program.

Can anybody provide me some simple examples (such as "hello world"
example)?

Thank you very much.
Best regards,
Alan
"JimTheJellyfish" <j_*******@hotmail.com> wrote in message news:<3f***********************@lovejoy.zen.co.uk> ...
Hi Alan,

This can be really infuriating, when viewing from IE try holding down shift
and F5 to refresh.

Hope this helps
"alan" <ch***********@i-cable.com> wrote in message
news:7b*************************@posting.google.co m...
Dear all,

I have a servlet problem.

When I modified my java servlet program and then uploaded it to my web
hosting server, then I start my web browser(I.E) to see the result.
But it loaded the previous java servlet class program. After several
days, these new classes file can be refreshed on browser.

I want to know how I can make sure I always see the most update
servlet program.

Please help.

Thank you very much.
Alan

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ric | last post by:
thx for the help. im having problems with java and jsp. i think im not settup up the enviornmental variables right in w2k advanced tab. im using a wrox book, but the wrox book references a servlet...
3
by: TheLetti | last post by:
Hy! I've just downloaded the latest Java 2 SDK (j2sdk1.4.2_01). For my surprise in this version the servlet-classes are not integrated (e.g. the class javax.servlet). So I found all the...
1
by: Hai Tran | last post by:
Any help is appreciated. Installed Tomcat 4.1 and Mysql on a WinXP. I've manage to get Tomcat up and was able to view my first application ( myhome ) simple home page. Tomcat was installed under...
6
by: Sushmita | last post by:
hi all, I have wrriten code for a small web application. From my JSP page i am not able to call the servlet.. its throwing an exception. "javax.servlet.ServletException: Wrapper cannot find...
2
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in...
1
by: shiyamala | last post by:
Hi i am shiyam, i am having some problem in java, i am basic java programmer. i have to write one program is writing the data into textfile name "newfile.txt" from one servlet and read it from...
1
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to...
2
by: ManidipSengupta | last post by:
Hi, a few (3) questions for the Java experts, and let me know if this is the right forum. It deals with 100% java code (reason for posting here) but manages a Web browser with Javascript. Thanks in...
9
by: mjahabarsadiq | last post by:
Hi I have created a servlet that is to be started at the server startup. And I got it. In that I have created a object of another class and set it as a session attribute. What I am trying is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.