struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Albert" <alexandre.alb...@unicible.ch>
Subject Réf. : I try again... My action is not being called -I just get a blank page!
Date Tue, 24 Sep 2002 07:02:17 GMT
I don't know what is wrong with your webapp, but I'm using Struts with 
WebSphere developer studio as well and it works fine. Try it with a simple 
blank webapp.
The only thing that is a bit unusual is the servlet-mapping, and also I 
nerver specify the type in the action-mappings.

_________________________
Alexandre Albert






Ulrika Nordström <ulrikano@msn.com>
09/24/02 07:51 AM
Veuillez répondre à "Struts Users Mailing List"

 
        Pour :  struts-user@jakarta.apache.org
        cc : 
        Objet : I try again... My action is not being called -I just get a blank page!


No, look at my execute method:
                 public ActionForward execute(           ActionMapping 
mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) {
                 System.out.println("AccDatabaseAction :: execute");
                 return (mapping.findForward("success"));
                 }

Nothing is written in the console and an exeption is not being thrown. 
Nothin happens in the console! Nothing is printed, no error message. The 
action is not being valled, just a blank page shows up.

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>



>From: Eddie Bush <ekbush@swbell.net>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: Struts Users Mailing List <struts-user@jakarta.apache.org>
>Subject: Re: My action is not being called -I just get a blank page!
>Date: Mon, 23 Sep 2002 10:35:37 -0500
>
>... or your action returned null and Struts thought there was nothing 
left 
>to do (that's what a null ActionForward indicates).  I've seen it then 
too.
>
>David Graham wrote:
>
>>
>>Normally, when you get a blank page there was an exception thrown. Check 

>>you server logs for the exception.
>>
>>Dave
>
>
>--
>Eddie Bush
>
>
>
>
>--
>To unsubscribe, e-mail: 
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>




_________________________________________________________________
MSN Hotmail är världens populäraste e-posttjänst. Skaffa dig ett eget 
konto 
du också: http://www.hotmail.com


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




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message