Lalita_jonnalagadda
asked on
struts appliation problem on WAS 5.1.1
My war file is deploying fine.But when I click on submit on my jsp I get the following error in the browser:
Error 503: Failed to load target servlet [action]
logs show the followng message:
E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: javax.servlet.UnavailableE xception
at org.apache.struts.action.A ctionServl et.initMod ulePlugIns (ActionSer vlet.java: 880)
at org.apache.struts.action.A ctionServl et.init(Ac tionServle t.java:336 )
at javax.servlet.GenericServl et.init(Ge nericServl et.java:25 8)
at com.ibm.ws.webcontainer.se rvlet.Stri ctServletI nstance.do Init(Stric tServletIn stance.jav a:82)
at com.ibm.ws.webcontainer.se rvlet.Stri ctLifecycl eServlet._ init(Stric tLifecycle Servlet.ja va:147)
at com.ibm.ws.webcontainer.se rvlet.PreI nitialized ServletSta te.init(St rictLifecy cleServlet .java:270)
at com.ibm.ws.webcontainer.se rvlet.Stri ctLifecycl eServlet.i nit(Strict LifecycleS ervlet.jav a:113)
at com.ibm.ws.webcontainer.se rvlet.Serv letInstanc e.init(Ser vletInstan ce.java:18 9)
at javax.servlet.GenericServl et.init(Ge nericServl et.java:25 8)
at com.ibm.ws.webcontainer.we bapp.WebAp pServletMa nager.addS ervlet(Web AppServlet Manager.ja va:876)
at com.ibm.ws.webcontainer.we bapp.WebAp pServletMa nager.load Servlet(We bAppServle tManager.j ava:224)
at com.ibm.ws.webcontainer.we bapp.WebAp pServletMa nager.getS ervletRefe rence(WebA ppServletM anager.jav a:455)
at com.ibm.ws.webcontainer.we bapp.WebAp p.getServl etReferenc e(WebApp.j ava:652)
at com.ibm.ws.webcontainer.we bapp.WebAp pRequestDi spatcherIn fo.calcula teInfo(Web AppRequest Dispatcher Info.java: 187)
at com.ibm.ws.webcontainer.we bapp.WebAp pRequestDi spatcherIn fo.<init>( WebAppRequ estDispatc herInfo.ja va:68)
at com.ibm.ws.webcontainer.we bapp.WebAp p.getReque stDispatch er(WebApp. java:1464)
at com.ibm.ws.webcontainer.we bapp.WebAp p.getReque stDispatch er(WebApp. java:1423)
at com.ibm.ws.webcontainer.sr t.WebAppIn voker.hand leInvocati onHook(Web AppInvoker .java:276)
at com.ibm.ws.webcontainer.ca che.invoca tion.Cache dInvocatio n.handleIn vocation(C achedInvoc ation.java :71)
at com.ibm.ws.webcontainer.sr p.ServletR equestProc essor.disp atchByURI( ServletReq uestProces sor.java:1 82)
at com.ibm.ws.webcontainer.os elistener. OSEListene rDispatche r.service( OSEListene r.java:334 )
at com.ibm.ws.webcontainer.ht tp.HttpCon nection.ha ndleReques t(HttpConn ection.jav a:56)
at com.ibm.ws.http.HttpConnec tion.readA ndHandleRe quest(Http Connection .java:615)
at com.ibm.ws.http.HttpConnec tion.run(H ttpConnect ion.java:4 39)
at com.ibm.ws.util.ThreadPool $Worker.ru n(ThreadPo ol.java:91 2)
What could be the problem.I downloaded the Struts 1.2.7 from apache.org.
I have a the following folder structutre
-x
my.jsp
MTEA-INF
WEB-INF
- all tlds and dtds
-lib all jars
-classes
-yyy
-zzz
-aaaction
.class file
-fffform
.class file
-resources
-Application .prop
I war this folder and I'm deploying it on WAS 5.1.1
My Action.java and Form.java are stored in another location with the package structure yyy,zzz,.
Please give some answer.
Thanks
Error 503: Failed to load target servlet [action]
logs show the followng message:
E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: javax.servlet.UnavailableE
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.GenericServl
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at javax.servlet.GenericServl
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.sr
at com.ibm.ws.webcontainer.ca
at com.ibm.ws.webcontainer.sr
at com.ibm.ws.webcontainer.os
at com.ibm.ws.webcontainer.ht
at com.ibm.ws.http.HttpConnec
at com.ibm.ws.http.HttpConnec
at com.ibm.ws.util.ThreadPool
What could be the problem.I downloaded the Struts 1.2.7 from apache.org.
I have a the following folder structutre
-x
my.jsp
MTEA-INF
WEB-INF
- all tlds and dtds
-lib all jars
-classes
-yyy
-zzz
-aaaction
.class file
-fffform
.class file
-resources
-Application .prop
I war this folder and I'm deploying it on WAS 5.1.1
My Action.java and Form.java are stored in another location with the package structure yyy,zzz,.
Please give some answer.
Thanks
ASKER
Here's my struts-config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="PinForm" type="xx.yy.zz.pinrequest. form.PinFo rm"/>
</form-beans>
<action-mappings>
<action path="/pin" type="xx.yy.zz.pinrequest. action.Pin Action" name="PinForm"
scope="request" input="/pin.jsp" validate="true">
<forward name="pin" path="/pin.jsp" />
</action>
</action-mappings>
<message-resources
parameter="resources.Appli cationReso urces"
null="false" />
<!-- Validator Configuration -->
<plug-in className="org.apache.stru ts
.validator.ValidatorPlugIn ">
<set-property property="pathnames"
value="/WEB-INF/
validator-rules.xml, /WEB-INF/
validation.xml"/>
</plug-in>
</struts-config>
What should I do when you said I should put mu plugin in right path
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="PinForm" type="xx.yy.zz.pinrequest.
</form-beans>
<action-mappings>
<action path="/pin" type="xx.yy.zz.pinrequest.
scope="request" input="/pin.jsp" validate="true">
<forward name="pin" path="/pin.jsp" />
</action>
</action-mappings>
<message-resources
parameter="resources.Appli
null="false" />
<!-- Validator Configuration -->
<plug-in className="org.apache.stru
.validator.ValidatorPlugIn
<set-property property="pathnames"
value="/WEB-INF/
validator-rules.xml, /WEB-INF/
validation.xml"/>
</plug-in>
</struts-config>
What should I do when you said I should put mu plugin in right path
The value for the attribute should be on the same line.
This is because xml parser will not remove the "\n" from the value when it read the struts-config.xml.
<plug-in className="org.apache.stru ts.validat or.Validat orPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator- rules.xml, /WEB-INF/validation.xml"/>
</plug-in>
However, you can set the path to multiple lines coz the plugin will split the value using the delimeter ",".
<set-property property="pathnames"
value="/WEB-INF/validator- rules.xml,
/WEB-INF/validation.xml"/>
This is because xml parser will not remove the "\n" from the value when it read the struts-config.xml.
<plug-in className="org.apache.stru
<set-property property="pathnames"
value="/WEB-INF/validator-
</plug-in>
However, you can set the path to multiple lines coz the plugin will split the value using the delimeter ",".
<set-property property="pathnames"
value="/WEB-INF/validator-
/WEB-INF/validation.xml"/>
ASKER
Thank you very much ..I don't see that error any more but I don't see the validation error message displayed when I enter 999999999 or 000000000 for ssn.
I see the following message in logs:
364d4e6c PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
In my jsp I have 3 passowrd fields with properties SSN1,SSn2,SSN3
I added <html:errors property="ssn"/> to my jsp just below my <html:html>
here is my action:
package xx.yy.zz.pinrequest.action ;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpSer vletReques t;
import javax.servlet.http.HttpSer vletRespon se;
import org.apache.struts.action.A ctionError ;
import org.apache.struts.action.A ctionError s;
import org.apache.struts.action.A ctionForm;
import org.apache.struts.action.A ctionForwa rd;
import org.apache.struts.action.A ctionMappi ng;
import org.apache.struts.action.A ction;
import us.ny.state.otda.dcse.pinr equest.for m.PinForm;
public class PinAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
ActionErrors errors = new ActionErrors();
PinForm pinForm = (PinForm) form;
boolean ssnValidity = true;
String ssn = pinForm.getSSN();
/** PinBD pinBD=nul;
pinBD=new PinBD();
String valid= pinBD.getSSN(ssn);
String mesg=pinBD.getResponseMess age();*/
try
{
if(ssn.equals( "000000000") || ssn.equals ("999999999"))
{
ssnValidity = false;
}
}catch(Exception e){
errors.add("ssn", new ActionError("error.invalid Ssn.errorM sg"));
saveErrors(request,errors) ;
return mapping.findForward("pin") ;
}
return mapping.findForward("pin") ;
}
}
Mu config.xml is above in yesterdays' comment and my ApplicationResources is below
error.invalidSsn.errorMsg= Please enter a valid SSN.
error.noRecordFound.errorM sg= No record found for this SSN.
# Struts Validator Error Messages
errors.required={0} is required.
errors.minlength={0} can not be less than {1} characters.
errors.maxlength={0} can not be greater than {1} characters.
errors.invalid={0} is invalid.
errors.byte={0} must be a byte.
errors.short={0} must be a short.
errors.integer={0} must be an integer.
errors.long={0} must be a long.
errors.float={0} must be a float.
errors.double={0} must be a double.
errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is an invalid credit card number.
errors.email={0} is an invalid e-mail address.
Since I'm doing validation in action I guess I don't need to worry about validation.xml
Thbaks a lot for the earlier anwser and please let me know what I'm doing wrong here.
I see the following message in logs:
364d4e6c PropertyMessa I org.apache.struts.util.Pro
In my jsp I have 3 passowrd fields with properties SSN1,SSn2,SSN3
I added <html:errors property="ssn"/> to my jsp just below my <html:html>
here is my action:
package xx.yy.zz.pinrequest.action
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpSer
import javax.servlet.http.HttpSer
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import us.ny.state.otda.dcse.pinr
public class PinAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
ActionErrors errors = new ActionErrors();
PinForm pinForm = (PinForm) form;
boolean ssnValidity = true;
String ssn = pinForm.getSSN();
/** PinBD pinBD=nul;
pinBD=new PinBD();
String valid= pinBD.getSSN(ssn);
String mesg=pinBD.getResponseMess
try
{
if(ssn.equals( "000000000") || ssn.equals ("999999999"))
{
ssnValidity = false;
}
}catch(Exception e){
errors.add("ssn", new ActionError("error.invalid
saveErrors(request,errors)
return mapping.findForward("pin")
}
return mapping.findForward("pin")
}
}
Mu config.xml is above in yesterdays' comment and my ApplicationResources is below
error.invalidSsn.errorMsg=
error.noRecordFound.errorM
# Struts Validator Error Messages
errors.required={0} is required.
errors.minlength={0} can not be less than {1} characters.
errors.maxlength={0} can not be greater than {1} characters.
errors.invalid={0} is invalid.
errors.byte={0} must be a byte.
errors.short={0} must be a short.
errors.integer={0} must be an integer.
errors.long={0} must be a long.
errors.float={0} must be a float.
errors.double={0} must be a double.
errors.date={0} is not a date.
errors.range={0} is not in the range {1} through {2}.
errors.creditcard={0} is an invalid credit card number.
errors.email={0} is an invalid e-mail address.
Since I'm doing validation in action I guess I don't need to worry about validation.xml
Thbaks a lot for the earlier anwser and please let me know what I'm doing wrong here.
ASKER
I'm getting below error when I put my validation in my form.
Error 500: Server caught unhandled exception from servlet [action]: null
I also changed my validation.xml and added pinForm.ssn1 =SSN1 to applicationproperties
my validation.xml islike this now
<form-validation>
<formset>
<form name="PinForm">
<field property="ssn1"
depends="required">
<arg0 key="pinForm.ssn1 "/>
</field>
</form>
</formset>
</form-validation>
and my validation in form is as follows:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ssn=getSSN();
System.out.println("1:"+ss n);
ActionErrors errors = new ActionErrors();
errors = super.validate(mapping,req uest);
System.out.println("hello1 ");
System.out.println("2:"+ge tSSN());
if(this.getSSN().equals( "000000000") || this.getSSN().equals ("999999999"))
{
System.out.println("hello2 ");
// errors.add(ActionMessages. GLOBAL_MES SAGE, new ActionMessage("error.inval idSsn.erro rMsg"));
errors.add(ActionMessages. GLOBAL_MES SAGE, new ActionMessage("pinForm.ssn 1 "));
System.out.println("hello3 ");
}
return errors;
}
I'm so confused.
Error 500: Server caught unhandled exception from servlet [action]: null
I also changed my validation.xml and added pinForm.ssn1 =SSN1 to applicationproperties
my validation.xml islike this now
<form-validation>
<formset>
<form name="PinForm">
<field property="ssn1"
depends="required">
<arg0 key="pinForm.ssn1 "/>
</field>
</form>
</formset>
</form-validation>
and my validation in form is as follows:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ssn=getSSN();
System.out.println("1:"+ss
ActionErrors errors = new ActionErrors();
errors = super.validate(mapping,req
System.out.println("hello1
System.out.println("2:"+ge
if(this.getSSN().equals( "000000000") || this.getSSN().equals ("999999999"))
{
System.out.println("hello2
// errors.add(ActionMessages.
errors.add(ActionMessages.
System.out.println("hello3
}
return errors;
}
I'm so confused.
Hmm... the codes looks fine.
Can you post the entire error stack trace.
Can you post the entire error stack trace.
ASKER
Stck trace when I put validation In Action
/20/05 8:20:52:417 EDT] 77d237bc WebGroup I SRVE0180I: [pin] [/pin] [Servlet.LOG]: /pin.jsp: init
[7/20/05 8:20:52:432 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:432 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. util.Local Strings', returnNull=true
[7/20/05 8:20:52:448 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:448 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:464 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:479 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:479 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
[7/20/05 8:20:52:511 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro pertyMessa geResource s Initializing, config='org.apache.struts. taglib.htm l.LocalStr ings', returnNull=true
THis ius my action file:
package xx.xx.xxx.pinrequest.actio n;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpSer vletReques t;
import javax.servlet.http.HttpSer vletRespon se;
import org.apache.struts.action.A ctionError ;
import org.apache.struts.action.A ctionError s;
import org.apache.struts.action.A ctionForm;
import org.apache.struts.action.A ctionForwa rd;
import org.apache.struts.action.A ctionMappi ng;
import org.apache.struts.action.A ction;
import xx.xx.xx..pinrequest.form. PinForm;
public class PinAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
//System.out.println("1");
ActionErrors errors = new ActionErrors();
// Boolean ssnValid= true;
PinForm pinForm = (PinForm) form;
boolean ssnValidity = true;
String ssn = pinForm.getSSN();
/** PinBD pinBD=nul;
pinBD=new PinBD();
String valid= pinBD.getSSN(ssn);
String mesg=pinBD.getResponseMess age();*/
//System.out.println("acti on:"+ ssn);
//ssn=getSSN();
//System.out.println("1:"+ ssn);
//ActionErrors errors = new ActionErrors();
// errors = super.validate(mapping,req uest);
//System.out.println("hell o1");
//System.out.println("2:"+ getSSN());
try
{
if(ssn.equals( "000000000") || ssn.equals ("999999999"))
{
ssnValidity = false;
}
}catch(Exception e){
errors.add("ssn", new ActionError("error.invalid Ssn.errorM sg"));
saveErrors(request,errors) ;
return mapping.findForward("pin") ;
}
return mapping.findForward("pin") ;
}
}
stack trace when I put my validation in form:
stack trace when I put validation in Form
SystemOut O 1:999999999
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O hello1
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O 2:999999999
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O hello2
[7/20/05 8:15:40:417 EDT] 27a437bc WebGroup E SRVE0026E: [Servlet Error]-[action]: java.lang.NullPointerExcep tion
at us.ny.state.otda.dcse.pinr equest.for m.PinForm. validate(P inForm.jav a:102)
at org.apache.struts.action.R equestProc essor.proc essValidat e(RequestP rocessor.j ava:942)
at org.apache.struts.action.R equestProc essor.proc ess(Reques tProcessor .java:255)
at org.apache.struts.action.A ctionServl et.process (ActionSer vlet.java: 1482)
at org.apache.struts.action.A ctionServl et.doGet(A ctionServl et.java:50 7)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 740)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 853)
at com.ibm.ws.webcontainer.se rvlet.Stri ctServletI nstance.do Service(St rictServle tInstance. java:110)
at com.ibm.ws.webcontainer.se rvlet.Stri ctLifecycl eServlet._ service(St rictLifecy cleServlet .java:174)
at com.ibm.ws.webcontainer.se rvlet.Idle ServletSta te.service (StrictLif ecycleServ let.java:3 13)
at com.ibm.ws.webcontainer.se rvlet.Stri ctLifecycl eServlet.s ervice(Str ictLifecyc leServlet. java:116)
at com.ibm.ws.webcontainer.se rvlet.Serv letInstanc e.service( ServletIns tance.java :283)
at com.ibm.ws.webcontainer.se rvlet.Vali dServletRe ferenceSta te.dispatc h(ValidSer vletRefere nceState.j ava:42)
at com.ibm.ws.webcontainer.se rvlet.Serv letInstanc eReference .dispatch( ServletIns tanceRefer ence.java: 40)
at com.ibm.ws.webcontainer.we bapp.WebAp pRequestDi spatcher.h andleWebAp pDispatch( WebAppRequ estDispatc her.java:1 019)
at com.ibm.ws.webcontainer.we bapp.WebAp pRequestDi spatcher.d ispatch(We bAppReques tDispatche r.java:592 )
at com.ibm.ws.webcontainer.we bapp.WebAp pRequestDi spatcher.f orward(Web AppRequest Dispatcher .java:204)
at com.ibm.ws.webcontainer.sr t.WebAppIn voker.doFo rward(WebA ppInvoker. java:125)
at com.ibm.ws.webcontainer.sr t.WebAppIn voker.hand leInvocati onHook(Web AppInvoker .java:286)
at com.ibm.ws.webcontainer.ca che.invoca tion.Cache dInvocatio n.handleIn vocation(C achedInvoc ation.java :71)
at com.ibm.ws.webcontainer.ca che.invoca tion.Cache ableInvoca tionContex t.invoke(C acheableIn vocationCo ntext.java :116)
at com.ibm.ws.webcontainer.sr p.ServletR equestProc essor.disp atchByURI( ServletReq uestProces sor.java:1 86)
at com.ibm.ws.webcontainer.os elistener. OSEListene rDispatche r.service( OSEListene r.java:334 )
at com.ibm.ws.webcontainer.ht tp.HttpCon nection.ha ndleReques t(HttpConn ection.jav a:56)
at com.ibm.ws.http.HttpConnec tion.readA ndHandleRe quest(Http Connection .java:615)
at com.ibm.ws.http.HttpConnec tion.run(H ttpConnect ion.java:4 39)
at com.ibm.ws.util.ThreadPool $Worker.ru n(ThreadPo ol.java:91 2)
My form is in teh earlier commnet added.
Thank you.
/20/05 8:20:52:417 EDT] 77d237bc WebGroup I SRVE0180I: [pin] [/pin] [Servlet.LOG]: /pin.jsp: init
[7/20/05 8:20:52:432 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:432 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:448 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:448 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:464 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:479 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:479 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
[7/20/05 8:20:52:511 EDT] 77d237bc PropertyMessa I org.apache.struts.util.Pro
THis ius my action file:
package xx.xx.xxx.pinrequest.actio
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpSer
import javax.servlet.http.HttpSer
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import org.apache.struts.action.A
import xx.xx.xx..pinrequest.form.
public class PinAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
//System.out.println("1");
ActionErrors errors = new ActionErrors();
// Boolean ssnValid= true;
PinForm pinForm = (PinForm) form;
boolean ssnValidity = true;
String ssn = pinForm.getSSN();
/** PinBD pinBD=nul;
pinBD=new PinBD();
String valid= pinBD.getSSN(ssn);
String mesg=pinBD.getResponseMess
//System.out.println("acti
//ssn=getSSN();
//System.out.println("1:"+
//ActionErrors errors = new ActionErrors();
// errors = super.validate(mapping,req
//System.out.println("hell
//System.out.println("2:"+
try
{
if(ssn.equals( "000000000") || ssn.equals ("999999999"))
{
ssnValidity = false;
}
}catch(Exception e){
errors.add("ssn", new ActionError("error.invalid
saveErrors(request,errors)
return mapping.findForward("pin")
}
return mapping.findForward("pin")
}
}
stack trace when I put my validation in form:
stack trace when I put validation in Form
SystemOut O 1:999999999
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O hello1
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O 2:999999999
[7/20/05 8:15:39:323 EDT] 27a437bc SystemOut O hello2
[7/20/05 8:15:40:417 EDT] 27a437bc WebGroup E SRVE0026E: [Servlet Error]-[action]: java.lang.NullPointerExcep
at us.ny.state.otda.dcse.pinr
at org.apache.struts.action.R
at org.apache.struts.action.R
at org.apache.struts.action.A
at org.apache.struts.action.A
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.se
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.we
at com.ibm.ws.webcontainer.sr
at com.ibm.ws.webcontainer.sr
at com.ibm.ws.webcontainer.ca
at com.ibm.ws.webcontainer.ca
at com.ibm.ws.webcontainer.sr
at com.ibm.ws.webcontainer.os
at com.ibm.ws.webcontainer.ht
at com.ibm.ws.http.HttpConnec
at com.ibm.ws.http.HttpConnec
at com.ibm.ws.util.ThreadPool
My form is in teh earlier commnet added.
Thank you.
ASKER
In Action stack trace do you notice 'config='org.apache.struts .taglib.ht ml.LocalSt rings', returnNull=true'
Does that mean something
Does that mean something
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Check whether the files used by the plugin exist and are in the correct path.