• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help in using jsp:include tag

 
Kamal SampathKumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp page which uses struts framework. The problem is i get a file name from database based on some conditions and trying to include that page.
i am using jsp:include tag and its getting included in the page as html all the tags are not executed.
Here is my code
<logic:equal name="tableHandlerForm" property="tableDetails.queueForDevices" value="true">
<%
com.airmantech.common.TableDetails tableDetails = (com.airmantech.common.TableDetails) session.getAttribute("tableDetails");
String queueJSP = tableDetails.getQueueType().getQueueTypeJSPtoInclude();
System.out.println(queueJSP);
%>
<jsp:include page="<%=queueJSP%>" />
</logic:equal>
Is this a right way of using include tag ?
Please let me know the answer
Regards
Kamal
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing wrong with it, although I might suggest making a custom tag for it... =)
 
Kamal SampathKumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
But the problem is the page which gets included uses stuts tags and these tags are not at all executed.
I am using Jboss as my application server.
Any suggestions ???
Regards
Kamal
 
Junilu Lacar
Bartender
Pie
Posts: 7747
60
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First thing I'd check: make sure that the struts tlds are declared in the included JSP.
 
Kamal SampathKumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
That worked fine after importing struts tlds.
Thanks a lot!!!
Kamal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic