File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Include tag problem" Watch "JSP Include tag problem" New topic

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!!
David O'Meara

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.
I agree. Here's the link:
subject: JSP Include tag problem
It's not a secret anymore!