struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mainguy, Mike" <MMain...@kmart.com>
Subject RE: java.lang.NullPointerException struts form is null
Date Mon, 01 Mar 2004 17:58:54 GMT
It seems like that user is getting that text automagically added to the top
of his messages...


<<An Obstacle is something you see when you take your eyes off the goal>>

-----Original Message-----
From: Daniel Kalcevich [mailto:DKalcevich@mercuryinsurance.com] 
Sent: Monday, March 01, 2004 11:57 AM
To: Struts Users Mailing List; Tarik El Berrak
Subject: RE: java.lang.NullPointerException struts form is null


Try sending an empty email to struts-user-unsubscribe@jakarta.apache.org. 

Daniel 

-----Original Message-----
From: Tarik El Berrak [mailto:tarik.el_berrak@travelsoft.fr] 
Sent: Monday, March 01, 2004 9:02 AM
To: Struts Users Mailing List
Subject: Re: java.lang.NullPointerException struts form is null

hi
excuse me, can you tell me can i unsubscribe from this mailig list thanks a
lot
----- Original Message ----- 
From: "Daniel Kalcevich" <DKalcevich@mercuryinsurance.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, March 01, 2004 5:40 PM
Subject: RE: java.lang.NullPointerException struts form is null


Try changing the "name" attribute in your config file to be "TeacherAddForm"
instead of "teacherAddForm".  

HTH.

Daniel 

-----Original Message-----
From: as as [mailto:sam_struts@yahoo.com] 
Sent: Monday, March 01, 2004 8:29 AM
To: struts-user@jakarta.apache.org
Subject: java.lang.NullPointerException struts form is null

Hi,
 
Struts form is giving null in my  action class .execute().Below are my
files.Hep appreciated.Thanks
 

import java.io.IOException;

import java.util.List;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.ActionMapping;



/**

* * @struts.action

* path="/addTeacher"

* name="teacherAddForm"

* scope="request"

* validate="false"

* * @struts.action-forward

* name="success"

* path="/teachers.jsp"

* * @struts.action-forward

* name="failure"

* path="/error.jsp"

*/

public final class TeacherAddAction extends Action {

/**

* @param actionmapping The ActionMapping

* @param actionform The ActionForm object

* @param httpservletrequest The httpservletrequest of the incoming request

* @param httpservletresponse The httpservletresponse corresponding to the
request

* @param ActionForward The return path 

*/

public ActionForward execute(

ActionMapping mapping,

ActionForm actionform,

HttpServletRequest request,

HttpServletResponse response)

throws IOException, ServletException {

System.out.println("In TeacherAddAction:");

TeacherAddForm teacherAddForm = (TeacherAddForm) actionform;

if (teacherAddForm == null) teacherAddForm = new TeacherAddForm();

else 

System.out.println("teacherAddForm is not null");

try {

Teacher teacher= null;

teacher.setLast(teacherAddForm.getLast());

**********************

Thanks!



---------------------------------
Do you Yahoo!?
Get better spam protection with Yahoo! Mail

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



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


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

-----------------------------------------
This message and its contents (to include attachments) are the property of Kmart Corporation
(Kmart) and may contain confidential and proprietary information. You are hereby notified
that any disclosure, copying, or distribution of this message, or the taking of any action
based on information contained herein is strictly prohibited. Unauthorized use of information
contained herein may subject you to civil and criminal prosecution and penalties. If you are
not the intended recipient, you should delete this message immediately.


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


Mime
View raw message