File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Page Cannot Be Displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Page Cannot Be Displayed" Watch "Page Cannot Be Displayed" New topic

Page Cannot Be Displayed

aleah de guzman

Joined: Jun 06, 2006
Posts: 15
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

Joined: Feb 15, 2005
Posts: 4864
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 ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: Page Cannot Be Displayed
It's not a secret anymore!