User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 456,597 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,453 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1877 | Replies: 17
Reply
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Is this standard JSP behavior?

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation: jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough 
Rep Power: 32
Solved Threads: 305
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Is this standard JSP behavior?

  #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)
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Re: Is this standard JSP behavior?

  #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  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

  #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  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,630
Reputation: peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice peter_budo is just really nice 
Rep Power: 12
Solved Threads: 311
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: Is this standard JSP behavior?

  #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, JAVAWUG (Java Web User Group), Coding the Architecture
Reply With Quote  
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Re: Is this standard JSP behavior?

  #6  
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  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

  #7  
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  
Join Date: Sep 2007
Posts: 9
Reputation: bdichiara is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bdichiara bdichiara is offline Offline
Newbie Poster

Re: Is this standard JSP behavior?

  #8  
Sep 11th, 2007
Ok, I don't know what happened, but somehow, this issue resolved itself. What I did was instead of upload the file as index.jsp, i uploaded it as index2.jsp. i've made modifications to that file and re-uploaded and it all seems to work fine. I don't know what was going on, but I'm glad it's working now. Thanks for all the help.
Reply With Quote  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

  #9  
Sep 12th, 2007
Its good that issue got resolved, if u want please try one thing, which might help u in learning JSP.

Get the generated java files for index.jsp and index2.jsp, and have a look at them, am pretty sure file index.java will not be containing the changes you did, for the reason, that new jsp file was never used, and the changes never got reflected in generated classes. Hence, you never saw modifications in effect. Now that you have created a new JSP file, a new class file with your changes was generated and modifications were on.

This might have solved the problem (which is awesome), but definitely doesn't help in learning process.
Reply With Quote  
Join Date: Jul 2007
Posts: 31
Reputation: ksaxena is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
ksaxena ksaxena is offline Offline
Light Poster

Re: Is this standard JSP behavior?

  #10  
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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 6:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC