This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP Include tag problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Include tag problem" Watch "JSP Include tag problem" New topic
Author

JSP Include tag problem

daman sidhu
Ranch Hand

Joined: Aug 19, 2000
Posts: 184
Hi Guys, Have a problem with the include tag of jsp, actually im dynamically including a file based on a request parameter, but then i do that i am getting error of attribute must be quoted. Please help.. heres the code
<%
String html=request.getParameter("file");
String fileName="/includes/"+html;
%>
<!-- Include file -->
<%@include file=fileName%>
Thanks in advance!!
Daman
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You can't do it with the jsp-style includes, you have to use the XML-style tags.
ie either


Exactly what is allowed in the page="..." part is sometimes vendor specific though.
Dave
 
Don't get me started about those stupid light bulbs.
 
subject: JSP Include tag problem
 
Similar Threads
Including file in custom tag
Page tag for File include
Help in using jsp:include tag
Tomcat throwing jsp error where other application servers do not
include tag