aspose file tools*
The moose likes Struts and the fly likes Struts: Getting a blank page instead of the form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts: Getting a blank page instead of the form" Watch "Struts: Getting a blank page instead of the form" New topic
Author

Struts: Getting a blank page instead of the form

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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 ]

GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Had a problem trying to put my jsp in the same post, so here it is:

[newissue.jsp]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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

Joined: Dec 10, 2001
Posts: 7023
Amen!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts: Getting a blank page instead of the form