struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiuma <ki...@usa.net>
Subject Re: [STRUTS] Please !
Date Thu, 12 Sep 2002 17:18:00 GMT
Thx, but since I'm complitely new to struts I don't know what to do:

*Here is my action class*

public class ListedUserAction extends LookupDispatchAction {
   
    protected String keyfinder = "";
   
    protected Map getKeyMethodMap()
    {
            Map map = new HashMap();
            map.put("button.find", "find");
            map.put("button.delete.selected", "delete");
            map.put("button.append", "append");
            return map;
    }
   
    public ActionForward delete( ActionMapping mapping,
                                  ActionForm form,
                                  HttpServletRequest req,
                                  HttpServletResponse res ) throws 
Exception
    {
        //keyfinder = ((ListedUserForm)form).getUserToFind();
       
        return mapping.findForward( IStrutsConstants.SUCCESS );
        //"/secure/userlist.jsp?userToFind=" + keyfinder
    }
   
    public ActionForward find( ActionMapping mapping,
                                  ActionForm form,
                                  HttpServletRequest req,
                                  HttpServletResponse res ) throws 
Exception
    {
        //keyfinder = ((ListedUserForm)form).getUserToFind();
       
        return mapping.findForward( IStrutsConstants.SUCCESS );
        //"/secure/userlist.jsp?userToFind=" + keyfinder
    }
   
    public ActionForward append( ActionMapping mapping,
                                  ActionForm form,
                                  HttpServletRequest req,
                                  HttpServletResponse res ) throws 
Exception
    {
        //keyfinder = ((ListedUserForm)form).getUserToFind();
       
        return mapping.findForward( IStrutsConstants.SUCCESS );
        //"/secure/userlist.jsp?userToFind=" + keyfinder
    }
   
}

*my jsp page:*

<%@page language="java"
    contentType="text/html;charset=UTF-8"
    session="true"
    isThreadSafe="true"
    isErrorPage="false"
    import="javax.naming.*,
           com.wingstech.webappointments.interfaces.*,
       java.util.*"
%> 
<%@ taglib uri="/WEB-INF/struts-html.tld"
        prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld"
        prefix="bean" %>



<html:html>
<head>
    <html:base/>
    <title><bean:message key="title.userfinder"/></title></head>
</head>

<BODY>
<html:form action="/userlist">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
    <tr>
        <td>
            <b><bean:message key="label.find.surname"/>:</b>&nbsp;
            <html:submit property="submit">
                <bean:message key="button.find"/>
            </html:submit>
            <html:text property="userToFind" size="35"/>               
        </td>
    </tr>   
</tbody>
</TABLE>
<html:submit property="submit">
    <bean:message key="button.delete.selected"/>
</html:submit>
<html:submit property="submit">
    <bean:message key="button.append"/>
</html:submit>
</html:form>
<%-- <jsp:useBean id="beanInstanceName" scope="session" 
class="package.class" /> --%>
<%-- <jsp:getProperty name="beanInstanceName"  property="propertyName" 
/> --%>

</body>
</html:html>


*and my <action> config tag:*

<action
    path="/userlist"
    type="com.wingstech.webappointments.ListedUserAction"
    parameter="submit"
    scope="request"
    validate="false">
    <forward name="Success" path="/secure/userlist.jsp" redirect="false" />
</action>     


*
I really can't see the error, can you help me please?*


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