struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: My action is not being called -I just get a blank page!
Date Mon, 23 Sep 2002 15:30:42 GMT

Normally, when you get a blank page there was an exception thrown.  Check 
you server logs for the exception.

Dave

>From: Ulrika Nordström <ulrikano@msn.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: My action is not being called -I just get a blank page!
>Date: Mon, 23 Sep 2002 16:28:00 +0200
>
>Hi!
>
>I am trying to access an action but it is not being called. Nothing is 
>happening in the console. In the execute()-metgod I write 
>"AccDatabaseAction :: execute" but nothing is being printed. The only thing 
>that is happening is that I get a blank page. The URL of the first index 
>page looks like: http://localhost:8080/servlet/index.jsp and when I click 
>the name the blank page will show up at 
>http://localhost:8080/servlet/do/acceptanstest/accDatabase I can't see what 
>I have missed and I have tried everything! I using IBM WebSphere Studio 
>Application Developer and I have just downloaded the latest version of 
>Struts 1.1b.
>
>Please, I really need help with this.
>Thanks, Ulrika
>
>Here are my files:
>
>My struts-config.xml:
>
><struts-config>
><!-- ==================================== Data Source Configuration -->
>
><!-- ======================================== Form Bean Definitions -->
><form-beans type="org.apache.struts.action.ActionFormBean">
>	<form-bean name="databaseForm" 
>type="se.amfpension.admin.form.DatabaseForm">
>			<form-property name="name" type="java.lang.String"/>
>	</form-bean>
></form-beans>
><!-- ================================= Global Exception Definitions -->
>     <global-exceptions>
>        <!-- sample exception handler
>        <exception
>            key="expired.password"
>            type="app.ExpiredPasswordException"
>            path="/changePassword.jsp"/>
>        end sample -->
>    </global-exceptions>
><!-- =================================== Global Forward Definitions -->
>    <global-forwards type="org.apache.struts.action.ActionForward">
>	  <forward name="accDatabase" path="/do/acceptanstest/accDatabase" />
>    </global-forwards>
>
><!-- =================================== Action Mapping Definitions -->
>    <action-mappings type="org.apache.struts.action.ActionMapping">
>		<action path="/acceptanstest/accDatabase"
>       			type="se.amfpension.admin.action.AccDatabaseAction"
>       			name="databaseForm"
>       			scope="request"
>       			validate="false">
>  					<forward name="success" path="/acceptanstest.jsp" redirect="false" 
>/>
>		</action>
>	</action-mappings>
></struts-config>
>***********************************************************************************************
>AccDatabaseAction.java:
>
>public class AccDatabaseAction extends Action {
>	public ActionForward execute(	ActionMapping mapping,
>									ActionForm form,
>									HttpServletRequest request,
>									HttpServletResponse response) {
>		System.out.println("AccDatabaseAction :: execute");
>		return (mapping.findForward("success"));
>		}
>}
>***********************************************************************************************
>DatabaseForm.java:
>public final class DatabaseForm extends org.apache.struts.action.ActionForm 
>{
>
>	public String iName;
>
>	public String getName() {
>		return this.iName;
>	}
>
>	public void setName(String aValue) {
>		this.iName = aValue;
>	}
>}
>
>****************************
>index.jsp
>
>%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
>
><HTML>
><HEAD>
></HEAD>
><BODY>
><html:form action="/acceptanstest/accDatabase">
>Här kan du greja med databaser
><table>
>	<tr><td><html:link 
>forward="accDatabase">Acceptanstest</html:link></td><td>&nbsp;&nbsp;</td></tr>
></table>
></html:form>
></BODY>
></HTML>
>
>
>
>
>
>_________________________________________________________________
>Skicka snabbmeddelanden till dina vänner online med MSN Messenger: 
>http://messenger.msn.se
>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message