aspose file tools*
The moose likes JSP and the fly likes changes in included jsp does not get displyed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "changes in included jsp does not get displyed." Watch "changes in included jsp does not get displyed." New topic
Author

changes in included jsp does not get displyed.

Pratibha Malhotra
Ranch Hand

Joined: Dec 21, 2003
Posts: 199
Hi
Changes in my included jsp does not get displyed unless and until I make some changes in including jsp.
Do we have amy mechanism or piece of logic that will take my new including jsp when user had made any changes to it.
Kindly Help


~ Pratibha Malhotra<br /> <br />Sun Certified Java Programmer<br />SCEA 1.4 (In Progress)<br />~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />"Many of life's failures are people who did not realize how close they were to success when they gave up!!"
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
There are 2 methods to include a page in your jsp
1 - Using @include directive
<%@include page="/somepage.jsp"%>
This is basically a compile time inclusion
2- Using jsp include tag
<jsp:include page="/somepage.jsp"/>
This is run time inclusion
I think u are using the 1st one thats why you are facing problem
try to include using 2nd method. It will solve your problem.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Using the JSP include action over the directive just to cause the servlet container to reload is ludicrous. One should be used over the other because of the difference in their dynamic vs. static functionality.
The fact that the servlet container (I'm betting it's Tomcat 4 or earlier) does not detect changes in files included via directive is a known limitation that is easily worked around with the simple use of the 'touch' command. Tomcat 5 (I believe) has fixed this problem.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pratibha Malhotra
Ranch Hand

Joined: Dec 21, 2003
Posts: 199
Hi
The fact that the servlet container (I'm betting it's Tomcat 4 or earlier) does not detect changes in files included via directive is a known limitation that is easily worked around with the simple use of the 'touch' command. Tomcat 5 (I believe) has fixed this problem.

I am using websphere 4.0
By the way What is touch command . Kindly Elaborate
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
touch is a unix (there are versions for Windows/DOS and other OSs as well) command that resets the timestamp on a file to the current date/time at the moment the command was executed.
Using that on the file that embeds your file will cause the JSP compiler to think it's changed and recompile it.
Another method would be to remove the java and class files for the embedding JSP from whereever the application server stores them (hoping for you it's set to store them on disk and not in RAM only or you may have to reset the app server after all) which should also force a recompilation.


42
 
wood burning stoves
 
subject: changes in included jsp does not get displyed.