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

Struts: Getting a blank page instead of the form

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been over this code a million times and can't for the life of me figure out why the form is not displaying and when I do a view source, there is 0 code showing. This form is a bit lengthy, but I need some fresh eyes, so bare with me.

[struts-config.xml - relavent code]
<form-bean name="newIssueForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="pcModel" type="java.lang.String"/>
<form-property name="monitor" type="java.lang.String"/>
<form-property name="hardware" type="java.lang.String"/>
<form-property name="printer" type="java.lang.String"/>
<form-property name="printerProblem" type="java.lang.String"/>
<form-property name="type" type="java.lang.String"/>
<form-property name="importance" type="java.lang.String"/>
<form-property name="action" type="java.lang.String"/>
<form-property name="assignedTo" type="java.lang.Integer"/>
<form-property name="info" type="java.lang.String"/>
<form-property name="systemId" type="java.lang.Integer"/>
</form-bean>

<action
path="/newIssueSubmit"
type="com.intrustbank.anykey.actions.NewIssueAction"
name="newIssueForm"
scope="request"
validate="false"
input="/newissue.jsp">
<forward name="success" path="/welcome.jsp"/>
<forward name="failure" path="/newissue.jsp"/>
</action>
[/code]

[NewIssueAction.java - minus the imports to save space]
[code]
public class NewIssueAction extends Action
{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
return mapping.findForward("success");
}
}
[/code]

Again, sorry for such a long post, but my eyes hurt from validating all this. Any help is appreciated. Thanks.
[ August 10, 2004: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Had a problem trying to put my jsp in the same post, so here it is:

[newissue.jsp]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was missing a <form-property> element so it wasn't rendering the page. Sure wish there was some error generation on problems like this. Wonder why I didn't get any errors regarding this?
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic