This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSP and the fly likes A jsp deployment problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "A jsp deployment problem" Watch "A jsp deployment problem" New topic
Author

A jsp deployment problem

Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Hi ranchers,

In my application, many jsp files include the header.jsp to display the head.
There are two ways, both static include and dynamic include.
The static include is <%@ include file="/jsp/header.jsp" %>.
The dynamic include is <jsp:include page="/jsp/header.jsp" flush="true">.
There was a requirement to update the header.jsp and every page that includes the header needs to display the new header.
It seems that I just need to deploy the updated header.jsp. But that doesn't work due the web container setting.
I also need to re-deploy all those includer jsp files to make sure their time stampt is more recent then the header.jsp.
That caused a big maintenance problem.
I am not very sure if the web container is Sun iPlanet.
Do you have any comments for the sustain?
Thanks.


SCJP 1.4 SCJD
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The static includes need to be touched so they'll recompile with the new JSP contents--the solution is not to use static includes for JSPs, unless you're okay with the additional work.
Zhixiong Pan
Ranch Hand

Joined: Jan 25, 2006
Posts: 239
Thanks very much, David.
Sanjeev P Kulkarni
Greenhorn

Joined: Nov 08, 2009
Posts: 20

<%@ include file="/jsp/header.jsp" %> must be used only for static contents. If the contents changes at run time then we must use<jsp:include page="../../header.jsp" />.


Sanjeev
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: A jsp deployment problem
 
It's not a secret anymore!