This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Page Cannot Be Displayed  RSS feed

aleah de guzman
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi im a newbie in struts and im getting a hard time making struts 1.3.5 work in RAD 6. i created a simple struts application, just having a jsp with link that will go the the next jsp that will show data (data are statically populated by another java bean). everytime i click the link im getting Page Cannot Be Displayed. Both jsps are in WebContent/jsp. In the actionmapping i already tried input="/jsp/bookList.jsp" and input="jsp/bookList.jsp", but still not working.

code in the 1st page:
<html:link action="bookList">Show the booklist</html:link>

actionmapping in struts-config
<action path="/bookList" name="bookListForm"

formbean in struts-config
<form-bean name="bookListForm" type="com.library.BookListForm"/>
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your action mapping appears to be incorrect. In order for the control to pass from your BookListAction class to the bookList.jsp, you must specify a forward that tells Struts where to go next. So, your action mapping should look something like this:

When you code the execute method in your BookListAction, the last statement should be:

This tells Struts to forward to the bookList.jsp once the Action is complete.

One more thing: When referencing an action, it's best to include the initial "/". So, your link would look like this:

<html:link action="/bookList">Show the booklist</html:link>
[ October 19, 2006: Message edited by: Merrill Higginson ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!