Is this standard JSP behavior?

Reply

Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Is this standard JSP behavior?

 
0
  #1
Sep 10th, 2007
I am new to JSP and struggling with this issue. I created a Hello World page and worked fine. After I made some changes, I uploaded the new version of my index file several times. I have even deleted my index.jsp file from the server, along with the WEB-INF and META-INF folders. I've done this several times, even at shell level, yet when I visit the .JSP file in my browser, it's the same file. It will not update. In NetBeans IDE, I have built and ran my project and it works correctly, displaying the correct file. I've even opened the file in a simple editor first before uploading to make sure the build file was the new updated file and it is. So why after I upload it, does the same page exist? How is that possible?

I've cleared my browser cache, deleted history, everything I know to do. This is not behaving like any other programming language I've used before.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,273
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Is this standard JSP behavior?

 
0
  #2
Sep 10th, 2007
You need to restart the webserver i think (i had a similar problem but using IIS and ASP.NET and this solved it)
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Re: Is this standard JSP behavior?

 
0
  #3
Sep 10th, 2007
Correct me if I'm wrong, but doesn't that seem like a pretty serious action to do when uploading a new version of a file. I can stop and restart services for the server, but that does not fix the issue. Restarting the server is pretty much out of the question. Although I'm still developing, the main server is the same as the development. It would cause too many problems having to restart everytime I upload an updated file. Is there anything else that can be done?

Why when I delete the file I get a 404? Should it require a restart before that as well?
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

 
0
  #4
Sep 11th, 2007
In work folder of your application/web server installation search for the Java and Class files generated earlier for your old JSP, try removing them. Put the modified JSP file in place, clean up your browser cache once again and try accessing the page.
Let me know if it helped.

Just For your reference, generated classes are generally kept at following places in two of the servers I have used:
  1. Tomcat - C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\shop\org\apache\jsp\JSP
  2. JBoss - D:\jboss-4.0.4.GA\server\default\work\jboss.web\localhost\shop\org\apache\jsp
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,272
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 493
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Is this standard JSP behavior?

 
0
  #5
Sep 11th, 2007
Originally Posted by ksaxena View Post
Tomcat - C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\shop\org\apache\jsp\JSP
You should never mess up with Catalina directory on life server or you may pay dearly. Same apply to your local pc instalation...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

 
0
  #6
Sep 11th, 2007
Well I thought its not going to effect server settings. Would removing JSP generated classes, which again will get generated upon page access be so dangerous?
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Re: Is this standard JSP behavior?

 
0
  #7
Sep 11th, 2007
The only files I've uploaded to the server are the WEB-INF folder, META-INF folder, and index.jsp.
Inside the WEB-INF folder is:
/classes/ (empty)
/lib/
/lib/jstl.jar
/lib/standard.jar
web.xml

Inside the META-INF folder is:
context.xml
MANIFEST.MF

I have tried deleting all of these from the server and uploading them back. This doesn't seem to affect it, it still loads the old page.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

 
0
  #8
Sep 11th, 2007
Can you just rename old class and java files, for security sake, and try what I suggested in previous post. Am still pretty sure that even deleting those won't hurt your setup, but since Peter has raised a concern lets keep it in mind, and instead of deleting lets rename them, so that we can revert it back if something goes wrong.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,272
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 493
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Is this standard JSP behavior?

 
0
  #9
Sep 11th, 2007
I never run online Tomcat server just local installed plus the project on university server, but my teacher told me always to stop server throught Tomcat manager, do any changes you need, then Start server and do Reload. However this was only school project, I have no idea what you running and don't know what will happens if you try to do so...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

 
0
  #10
Sep 11th, 2007
The changes I suggested are not at all related to any server configuration changes. Since the java/class files get generated upon page access, if not found in work fold I don't think deleting them would be such a big deal.

Now, for restarting servers, I have 'n' number of experiences with some major companies in this world, that they generally don't allow server restarts without a planned maintenance. And for things like minor changes in JSP, I don't think restart is a good idea, though it will surely solve the issue, but I think the work around I suggested will probably resolve the matter.

So, now am just asking to follow the thumb rule of maintaining any live project on client's server - Don't delete anything, keep a backup, if something weird is witnessed, revert back your changes.

What say??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 2652 | Replies: 17
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC