• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

changes in included jsp does not get displyed.

 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pratibha Malhotra
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic