Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Include tag problem

 
daman sidhu
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic