Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can anyone suggest me a code snippet for IncludeAction in Struts

 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone suggest me a code snippet for IncludeAction in Struts

this is my code in the struts-config in the action mappings

<action path="/menu"
type="org.apache.struts.actions.IncludeAction"
parameter="jsp/content.jsp">
</action>

this is the code on the jsp page on which i want to include the contents of the content.jsp page.

<bean:include id= "abc" forward="/menu"/>
. i get the error
Cannot create include URL: java.net.MalformedURLException: Cannot retrieve ActionForward named /menu]: javax.servlet.jsp.JspException: Cannot create include URL: java.net.MalformedURLException: Cannot retrieve ActionForward named /menu

Please help me with this. Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic