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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To use <%@ include page="header.jsp" %> in a JSP generated XML?

Status
Not open for further replies.

archu

Programmer
Nov 18, 2001
1
HK
Currently I'm using JSP to generate XML and use XSL to parse them. Originally, there is no problem.

test.jsp
--------
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;listUsers.xsl&quot;?>
.....some jsp generated xml here

listUser.xsl
------------
display header.html
parse the xml tag from test.jsp
display footer.html

This work well when header and footer are html. However, in order to have dynamic menu in header, header has to be changed to header.jsp. However, you could not include the header.jsp inside listUser.xsl. So I include header.jsp inside test.jsp

test.jsp
---------
<@%include file=&quot;header.jsp&quot; %>
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;listUsers.xsl&quot;?>
.....some jsp generated xml here

However, xsl cannot recognize the normal html tag inside header.jsp.

How can I include dynamic header.jsp and footer.jsp inside a jsp generated xml? where xml will be interpreted by XSL also. Please help! Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top