Kiuma, without sounded condescending or anything, just by looking at the
error msg you got it seems to besomething wrong with your jsp page. I
haven't looked at your jsp page yet, but from a debugging, or problem
solving point of view, change your jsp page to simply say "testing" nested
in two <html> tags. Then start adding more and more tag to it, untill you
eventually have the jsp page shown below. You're getting a Nullpointer
exception in the userlist.jsp. So a variable that you're trying to access in
the jsp is null. Are you setting the variable in your action class???

-----Original Message-----
From: kiuma [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 7:18 PM
To: struts-user
Subject: Re: [STRUTS] Please !


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?*


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to