This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 15286
    
    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 - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    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: 15286
    
    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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts: Getting a blank page instead of the form
 
Similar Threads
action doesnot excute?
ERROR: No action instance
I am getting error when starting Tomcat .How can I rectify it?
Deploying struts1.29 appl to struts 1.3.10
Struts validation framework- for single form, multiple actions