• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Page Cannot Be Displayed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
scope="request"
type="com.library.BookListAction"
input="/jsp/bookList.jsp"/>

formbean in struts-config
<form-bean name="bookListForm" type="com.library.BookListForm"/>
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic