944,026 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 3035
  • JSP RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 10th, 2007
0

Is this standard JSP behavior?

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bdichiara is offline Offline
9 posts
since Sep 2007
Sep 10th, 2007
0

Re: Is this standard JSP behavior?

You need to restart the webserver i think (i had a similar problem but using IIS and ASP.NET and this solved it)
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,525 posts
since Apr 2005
Sep 10th, 2007
0

Re: Is this standard JSP behavior?

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bdichiara is offline Offline
9 posts
since Sep 2007
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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
Reputation Points: 10
Solved Threads: 4
Light Poster
ksaxena is offline Offline
31 posts
since Jul 2007
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

Click to Expand / Collapse  Quote originally posted by ksaxena ...
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...
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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?
Reputation Points: 10
Solved Threads: 4
Light Poster
ksaxena is offline Offline
31 posts
since Jul 2007
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bdichiara is offline Offline
9 posts
since Sep 2007
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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.
Reputation Points: 10
Solved Threads: 4
Light Poster
ksaxena is offline Offline
31 posts
since Jul 2007
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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...
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004
Sep 11th, 2007
0

Re: Is this standard JSP behavior?

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??
Reputation Points: 10
Solved Threads: 4
Light Poster
ksaxena is offline Offline
31 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: Last issue was resolved... but hey, I've got another
Next Thread in JSP Forum Timeline: Pls...guide Me.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC