Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jsp page reuse

Status
Not open for further replies.

azulpind4

Technical User
Mar 30, 2004
2
GR
Hello, I have created a jsp page which has the functionality of a side menu frame. Now i wan to reuse it about 5-10 times... I thought it would be nice easy to make 10 jsps that reuse or extend this jsp and just overide the attributes and change links names and links.

Is that possible?

Thank you in advance
 
save the file as an "inc" file - eg "common.inc" or similar ...

Then in you jsp, add :

<%@ include file="common.inc" %>
 
You can do a dynamic include of a jsp and passit parameters.
Code:
<jsp:include page="myPage.jsp" flush="true"
  <jsp:param name="param1" value="paramval"/>
</jsp:include>
Then in myPage.jsp you just use request.getParameter() to retrieve the values passed in.

Greg.
 
grega

Could you explain this to me in more detail or send me to a web page which would, as this is exactly what I need.

Thanking you in advance

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top