•
•
•
•
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
![]() |
| |
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 305
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
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?
Why when I delete the file I get a 404? Should it require a restart before that as well?
•
•
Join Date: Jul 2007
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 4
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:
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:
- Tomcat - C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\shop\org\apache\jsp\JSP
- JBoss - D:\jboss-4.0.4.GA\server\default\work\jboss.web\localhost\shop\org\apache\jsp
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,630
Reputation:
Rep Power: 12
Solved Threads: 311
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
Publilius Syrus
(~100 BC)
LJC - London Java Community, JAVAWUG (Java Web User Group), Coding the Architecture
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
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.
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.
•
•
Join Date: Jul 2007
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 4
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.
•
•
Join Date: Sep 2007
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 0
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.
•
•
Join Date: Jul 2007
Posts: 31
Reputation:
Rep Power: 2
Solved Threads: 4
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.
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.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Contract: Java, JSP, J2EE, XML & Fuego - USA (anywhere) (Web Development Job Offers)
- Help for learnign JSP (JSP)
- about jsp files (JSP)
- variable Initialisation in JSP (JSP)
- File parsing and then parsing the string (C)
- Question about Standard C Library. (C)
- problem ragarding printing a jsp page (JSP)
- Date type problem JSP, mySQL (Java)
Other Threads in the JSP Forum
- Previous Thread: Last issue was resolved... but hey, I've got another
- Next Thread: Pls...guide Me.



Hybrid Mode