my dog learned polymorphism
The moose likes JSP and the fly likes JSP Page Not Refreshing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Page Not Refreshing" Watch "JSP Page Not Refreshing" New topic

JSP Page Not Refreshing

Jithesh Kozhipurath
Ranch Hand

Joined: Aug 27, 2003
Posts: 76
hai friends,
I created one jsp file and stored in the tomcat root directory. but when i change something there in program it doesnt affect the browser content. is that because it compiles only for the first time. is there any way to compile it again

Jithesh K
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the JSP forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]

Joined: Aug 26, 2003
Posts: 14
just try to save it. That should really solve the prblm..What i generally do is first remove every thing in the jsp....and write some blah blah..and then save it and run it.....and u will see all that blah blah...... now come back to the jsp code and undo and get back u r code and save it.. it surely works, if its not send it to me.
i am also a beginner but i have faced the same prblm try doing this
[ September 18, 2003: Message edited by: Balu KBSM ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Some appservers (including some early versions of Tomcat) fail to notice changed JSPs until the server is restarted.
If the JSP is one that is used as a static include in another JSP (using <%@ include %> no server will see the change unless the JSP it is included in is also changed.
You can force that by changing the timestamp on the including JSP (touch command on Unix).

Jithesh Kozhipurath
Ranch Hand

Joined: Aug 27, 2003
Posts: 76
I tried it but still not coming. I think i should go to the specifed folder and compile it
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Balu: please try to reduce the contractions in your posts. Otherwise they may be difficult to understand and not much use.
If you have A.jsp that includes B.jsp, when you alter B.jsp it doesn't (usually) result in A.jsp getting compiled. You have to 'touch' A.jsp as well. Usually it is enough just to change the file timestamp by opening A.jsp, adding a space, deleting the space, and saving the file.
[ September 18, 2003: Message edited by: David O'Meara ]
sonu arya

Joined: Sep 16, 2003
Posts: 2
I would add one suggestion:
Try to change the settings of the browser of client PC. In IE go to "Tools -> Internet Options -> On the general tab click the 'Settings' button and then select the radio button 'Every visit to page'".
Hope this helps !!
subject: JSP Page Not Refreshing
It's not a secret anymore!