This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android forum!
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
Similar Threads
Help in using jsp:include tag
Tomcat throwing jsp error where other application servers do not
include tag
Including file in custom tag
Page tag for File include