Author Login
Post Reply
user Digest 1 Apr 2008 10:05:37 -0000 Issue 7953
Topics (messages 184864 through 184873):
Re: Help on <data-source>
184864 by: Antonio Petrelli
184865 by: Chen Chunwei
184866 by: Antonio Petrelli
Problem with URL tag
184867 by: Ian Meikle
184868 by: Dave Newton
184869 by: Dave Newton
How to use validator frame work.
184870 by: balaji.m.cs
184871 by: Dave Newton
Re: New to Struts
184872 by: pavanbh
Servlet Exception While editing the values
184873 by: puneet duggal
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_184864.ezm (zipped)2008/4/1, Chen Chunwei <out-chenchunwei@(protected)>:
>
> By the way, can I say that, if I use <data-source> in my struts
> application, then the struts servlet manages the connection? That is, when
> the application is deployed, the struts servlet will automaticly create
> connections of numbers specified by "minCount". And the application just
> fetch the connection created to use?
It's not the servlet that manages the connections, but the data source, that
acts also as a connection pool. For more information, see:
http://commons.apache.org/dbcp/
This data source is created by the servlet.
The reason why it is deprecated is that it mixes the Controller and the
Model layers of the MVC model.
Antonio

Attachment:
user_184865.ezm (zipped)Thanks
Personally, I do wanna use JNDI. But the project I'm going to do is based on struts 1.1 and using <data-source> to connect to db. So I have to learn on these things first and learn the advanced things later after work :-)
Talos
----- Original Message -----
From: "Antonio Petrelli" <antonio.petrelli@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, April 01, 2008 3:54 PM
Subject: Re: Help on <data-source>
2008/4/1, Chen Chunwei <out-chenchunwei@(protected)>:
>
> By the way, can I say that, if I use <data-source> in my struts
> application, then the struts servlet manages the connection? That is, when
> the application is deployed, the struts servlet will automaticly create
> connections of numbers specified by "minCount". And the application just
> fetch the connection created to use?
It's not the servlet that manages the connections, but the data source, that
acts also as a connection pool. For more information, see:
http://commons.apache.org/dbcp/
This data source is created by the servlet.
The reason why it is deprecated is that it mixes the Controller and the
Model layers of the MVC model.
Antonio

Attachment:
user_184866.ezm (zipped)2008/4/1, Chen Chunwei <out-chenchunwei@(protected)>:
>
> Personally, I do wanna use JNDI. But the project I'm going to do is based
> on struts 1.1 and using <data-source> to connect to db. So I have to learn
> on these things first and learn the advanced things later after work :-)
Notice that JNDI support depends on the container. Even Tomcat 4.1.xsupports it.
Antonio

Attachment:
user_184867.ezm (zipped)Hi,
I have downloaded what is discribed as the latest "best available" release
of STRUTS 2.0.11.1 (http://struts.apache.org/downloads.html)
I am following the tutorial "Using tags" where the example uses a URL tag
with the "var" attribute.
<s:url var="url" action="Welcome">
However this crashes since the TLD in the struts2-core-2.0.11.1.jar does
not define the "var" attribute.
It is however discribed in the documentation.
Is this a bug ?
If so when will it be fixed ?
What can I use as a workaround ?
I see in some of the example applications "id" is used, and in the
documentation it states:
id Deprecated. Use 'var' instead
Is it safe to use id instead ? What are the differences between the two ?
Regards
Ian
CSC Solutions Norge AS
Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway
Registered in Norway No: 958 958 455
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Attachment:
user_184868.ezm (zipped)--- Ian Meikle <imeikle@(protected):
> I am following the tutorial "Using tags" where the example uses a URL tag
> with the "var" attribute.
> <s:url var="url" action="Welcome">
>
> However this crashes since the TLD in the struts2-core-2.0.11.1.jar does
> not define the "var" attribute.
> It is however discribed in the documentation.
>
> Is this a bug ?
> If so when will it be fixed ?
S2.1.
> What can I use as a workaround ?
In S2.0 use "id".
> I see in some of the example applications "id" is used, and in the
> documentation it states:
> id Deprecated. Use 'var' instead
>
> Is it safe to use id instead ? What are the differences between the two ?
One's shorter than the other.
Dave

Attachment:
user_184869.ezm (zipped)(Quick followup.)
The wiki is a bit tricky when it comes to supplying version-specific
information when the information is added before the new version is released.
Unless editors specifically add version numbers to documentation text there's
no way to know what version something applies to.
This is one of those cases, where "id" was used, but "var" will be used in
S2.1 (AFAIK) and "id" will (hopefully) no longer be allowed. I'd have to
verify that before I changed the docs to reflect this, though.
Dave
--- Dave Newton <newton.dave@(protected):
> --- Ian Meikle <imeikle@(protected):
> > I am following the tutorial "Using tags" where the example uses a URL tag
>
> > with the "var" attribute.
> > <s:url var="url" action="Welcome">
> >
> > However this crashes since the TLD in the struts2-core-2.0.11.1.jar does
> > not define the "var" attribute.
> > It is however discribed in the documentation.
> >
> > Is this a bug ?
> > If so when will it be fixed ?
>
> S2.1.
>
> > What can I use as a workaround ?
>
> In S2.0 use "id".
>
> > I see in some of the example applications "id" is used, and in the
> > documentation it states:
> > id Deprecated. Use 'var' instead
> >
> > Is it safe to use id instead ? What are the differences between the two ?
>
> One's shorter than the other.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_184870.ezm (zipped) i am using struts for my front end handling of data. now i wish to go for
validator framework for handling form validation given by user, I have put
the validaton.xml and validaton-rules.xml into web-inf and i hav plugged in
the plugin with className and paramnames as the xml files but when my
application startsup im getting such an exception can any one help me in
this.
thanks in advance.
my validation.xml
<?xml version="1.0" encoding="windows-1252" ?>
<form-validation>
<formset>
<form name="userform">
<field
property="firstName"
depends="required">
<arg0 key="userform.firstName"/>
<arg1 name="minlength" key="${var:minlength}" resource="false"/>
<var>
<var-name>minlength</var-name>
<var-value>1</var-value>
</var>
</field>
</form>
</formset>
</form-validation>
my validation-rules.xml
<?xml version="1.0" encoding="windows-1252" ?>
<form-validation>
<global>
<validator
name="required"
classname="org.apache.struts.util.StrutsValidator"
method="validateRequired"
methodparams="
java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest"
msg="errors.required"/>
<validator name="minlength"
classname="org.apache.struts.util.StrutsValidator"
method="validateMinLength"
methodparams="
java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest"
depends="required"
msg="errors.minlength"/>
</global>
</form-validation>
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Apr 1, 2008 2:38:53 PM
org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.NoSuchMethodException: No such accessible method: addArg0() on
object:
org.apache.commons.validator.Field at
org.apache.commons.beanutils.MethodUtils.invokeMethod (
MethodUtils.java:250)
at
org.apache.commons.digester.SetNextRule.end (
SetNextRule.java:256)
at
org.apache.commons.digester.Rule.end (
Rule.java:276)
at
org.apache.commons.digester.Digester.endElement (
Digester.java:1058)
at
oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1287)
at
oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:328)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at
org.apache.commons.digester.Digester.parse (
Digester.java:1568)
at
org.apache.commons.validator.ValidatorResourcesInitializer.initialize (
ValidatorResourcesInitializer.java:259)
at
org.apache.struts.validator.ValidatorPlugIn.initResources (
ValidatorPlugIn.java:222)
at
org.apache.struts.validator.ValidatorPlugIn.init (
ValidatorPlugIn.java:161)
at
org.apache.struts.action.ActionServlet.initModulePlugIns (
ActionServlet.java:1158)
at
org.apache.struts.action.ActionServlet.init (
ActionServlet.java:473)
at
javax.servlet.GenericServlet.init (
GenericServlet.java:257)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4617)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4541)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4730)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1019)
at
com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:649)
at
com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:428)
at com.evermind.server.Application.getHttpApplication(Application.java:512)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1975)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1958)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1910)
at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:427)
at
com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:395)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:437)
at
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at
oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at
java.lang.Thread.run (
Thread.java:595)
Apr 1, 2008 2:38:53 PM
org.apache.commons.validator.ValidatorResourcesInitializer initialize
SEVERE: Error at (8, 39: No such accessible method: addArg0() on object:
org.apache.commons.validator.Fieldjava.lang.NoSuchMethodException: No such accessible method: addArg0() on
object:
org.apache.commons.validator.Field at
org.apache.commons.digester.Digester.createSAXException (
Digester.java:2540)
at
org.apache.commons.digester.Digester.createSAXException (
Digester.java:2566)
at
org.apache.commons.digester.Digester.endElement (
Digester.java:1061)
at
oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1287)
at
oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:328)
at
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
at
org.apache.commons.digester.Digester.parse (
Digester.java:1568)
at
org.apache.commons.validator.ValidatorResourcesInitializer.initialize (
ValidatorResourcesInitializer.java:259)
at
org.apache.struts.validator.ValidatorPlugIn.initResources (
ValidatorPlugIn.java:222)
at
org.apache.struts.validator.ValidatorPlugIn.init (
ValidatorPlugIn.java:161)
at
org.apache.struts.action.ActionServlet.initModulePlugIns (
ActionServlet.java:1158)
at
org.apache.struts.action.ActionServlet.init (
ActionServlet.java:473)
at
javax.servlet.GenericServlet.init (
GenericServlet.java:257)
at
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4617)
at
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4541)
at
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4730)
at
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1019)
at
com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:649)
at
com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:428)
at com.evermind.server.Application.getHttpApplication(Application.java:512)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1975)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1958)
at
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1910)
at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:427)
at
com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:395)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:437)
at
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at
oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at
java.lang.Thread.run (
Thread.java:595)
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184871.ezm (zipped)What version of Struts 1 are you using?
Dave
--- "balaji.m.cs" <balaji.m.cs@(protected):
>
> i am using struts for my front end handling of data. now i wish to go for
> validator framework for handling form validation given by user, I have put
> the validaton.xml and validaton-rules.xml into web-inf and i hav plugged in
> the plugin with className and paramnames as the xml files but when my
> application startsup im getting such an exception can any one help me in
> this.
>
> thanks in advance.
>
> my validation.xml
> <?xml version="1.0" encoding="windows-1252" ?>
> <form-validation>
> <formset>
> <form name="userform">
> <field
> property="firstName"
> depends="required">
> <arg0 key="userform.firstName"/>
> <arg1 name="minlength" key="${var:minlength}" resource="false"/>
> <var>
> <var-name>minlength</var-name>
> <var-value>1</var-value>
> </var>
> </field>
> </form>
> </formset>
> </form-validation>
>
> my validation-rules.xml
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <form-validation>
> <global>
> <validator
> name="required"
> classname="org.apache.struts.util.StrutsValidator"
> method="validateRequired"
> methodparams="
java.lang.Object,
>
org.apache.commons.validator.ValidatorAction,
>
org.apache.commons.validator.Field,
>
org.apache.struts.action.ActionErrors,
>
javax.servlet.http.HttpServletRequest"
> msg="errors.required"/>
>
> <validator name="minlength"
> classname="org.apache.struts.util.StrutsValidator"
> method="validateMinLength"
> methodparams="
java.lang.Object,
>
org.apache.commons.validator.ValidatorAction,
>
org.apache.commons.validator.Field,
>
org.apache.struts.action.ActionErrors,
>
javax.servlet.http.HttpServletRequest"
> depends="required"
> msg="errors.minlength"/>
> </global>
> </form-validation>
>
>
>
>
>
>
> INFO: Loading validation rules file from '/WEB-INF/validation.xml'
> Apr 1, 2008 2:38:53 PM
org.apache.commons.digester.Digester endElement
> SEVERE: End event threw exception
>
java.lang.NoSuchMethodException: No such accessible method: addArg0() on
> object:
org.apache.commons.validator.Field> at
>
org.apache.commons.beanutils.MethodUtils.invokeMethod (
MethodUtils.java:250)
> at
org.apache.commons.digester.SetNextRule.end (
SetNextRule.java:256)
> at
org.apache.commons.digester.Rule.end (
Rule.java:276)
> at
org.apache.commons.digester.Digester.endElement (
Digester.java:1058)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1287)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:328)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)
> at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
> at
org.apache.commons.digester.Digester.parse (
Digester.java:1568)
> at
>
org.apache.commons.validator.ValidatorResourcesInitializer.initialize (
ValidatorResourcesInitializer.java:259)
> at
>
org.apache.struts.validator.ValidatorPlugIn.initResources (
ValidatorPlugIn.java:222)
> at
>
org.apache.struts.validator.ValidatorPlugIn.init (
ValidatorPlugIn.java:161)
> at
>
org.apache.struts.action.ActionServlet.initModulePlugIns (
ActionServlet.java:1158)
> at
org.apache.struts.action.ActionServlet.init (
ActionServlet.java:473)
> at
javax.servlet.GenericServlet.init (
GenericServlet.java:257)
> at
>
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
> at
>
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4617)
> at
>
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4541)
> at
>
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4730)
> at
>
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1019)
> at
> com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:649)
> at
>
com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:428)
> at
> com.evermind.server.Application.getHttpApplication(Application.java:512)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1975)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1958)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1910)
> at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:427)
> at
>
com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:395)
> at
>
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:437)
> at
>
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
> at
>
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
> at
>
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
> at
>
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
> at
>
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
> at
>
oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
> at
>
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
> at
>
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
> at
java.lang.Thread.run (
Thread.java:595)
> Apr 1, 2008 2:38:53 PM
>
org.apache.commons.validator.ValidatorResourcesInitializer initialize
> SEVERE: Error at (8, 39: No such accessible method: addArg0() on object:
>
org.apache.commons.validator.Field>
java.lang.NoSuchMethodException: No such accessible method: addArg0() on
> object:
org.apache.commons.validator.Field> at
>
org.apache.commons.digester.Digester.createSAXException (
Digester.java:2540)
> at
>
org.apache.commons.digester.Digester.createSAXException (
Digester.java:2566)
> at
org.apache.commons.digester.Digester.endElement (
Digester.java:1061)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1287)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:328)
> at
>
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)
> at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)
> at
org.apache.commons.digester.Digester.parse (
Digester.java:1568)
> at
>
org.apache.commons.validator.ValidatorResourcesInitializer.initialize (
ValidatorResourcesInitializer.java:259)
> at
>
org.apache.struts.validator.ValidatorPlugIn.initResources (
ValidatorPlugIn.java:222)
> at
>
org.apache.struts.validator.ValidatorPlugIn.init (
ValidatorPlugIn.java:161)
> at
>
org.apache.struts.action.ActionServlet.initModulePlugIns (
ActionServlet.java:1158)
> at
org.apache.struts.action.ActionServlet.init (
ActionServlet.java:473)
> at
javax.servlet.GenericServlet.init (
GenericServlet.java:257)
> at
>
com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2231)
> at
>
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4617)
> at
>
com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4541)
> at
>
com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4730)
> at
>
com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1019)
> at
> com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:649)
> at
>
com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:428)
> at
> com.evermind.server.Application.getHttpApplication(Application.java:512)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1975)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1958)
> at
>
com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1910)
> at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:427)
> at
>
com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:395)
> at
>
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:437)
> at
>
com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
> at
>
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
> at
>
com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
> at
>
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
> at
>
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
>
=== message truncated ===

Attachment:
user_184872.ezm (zipped)
Hi All,
I am new to struts and wana to learn it.Any help or suggestion in this
regard is much appriciated.
please help me
Thanks,
Pavan
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184873.ezm (zipped)frnds when i have applied Validations on my form so when i submit My Form in Edit Mode after leaving one field Empty then it throws a servlet Exception
heres My formbean:-
<form-bean name="auditorMasterbean"
type="
org.apache.struts.validator.LazyValidatorForm"
scope="request">
<form-property name="searchresult"
type="
java.util.ArrayList"/>
</form-bean>
heres My action :-
<action
path="/update"
type="updateaudit"
input="/EditAuditor.jsp"
name="auditorMasterbean"
scope="request"
validate="true">
<forward name="success" path="/auditormaster.jsp?a=1"/>
<forward name="failure" path="/pages/AddAuditor.jsp"/>
</action>
<html>
<head>
<%@(protected)" %>
<%@(protected)" %>
<LINK href="css/StyleSheet.css" type=text/css rel=stylesheet>
<title>Add Auditor</title>
</head>
<body>
<html:form action="update">
<%
if(request.getParameter("a")!=null) {
if((Integer.parseInt(request.getParameter("a")))==1 ) {
%>
<p class="savemsg"><FONT COLOR="green"><B>RECORD SAVED</B></FONT>
<%
}else if((Integer.parseInt(request.getParameter("a")))==0){
%>
<FONT color="red"><B> Error !Try Again</B></FONT></p>
<%
}else if((Integer.parseInt(request.getParameter("a")))==3){
%>
<FONT color="red"><B>Auditor Name Already Exist</B></FONT></p>
<%
}
}
%>
<%
String s= request.getParameter("id");
%>
<table width="90%" align="center">
<tr>
<th id="Pageheader" align="left">Edit Auditor </th></tr>
<tr>
<td>
<table width="100%" align="center">
<tr>
<td>
<div id="divPersonal">
<div id="PType" style="font-size: 11px; width: 100%; font-family: verdana">
</div>
</div>
<div id="divOthers">
<div id="OType" style="font-size: 11px; width: 797; font-family: verdana; height: 346">
<fieldset>
<legend>Auditor Detail </legend>
<html:hidden property="ids" value="<%=s%>"/>
<%
java.util.ArrayList l=(
java.util.ArrayList)session.getAttribute("searchresult");
session.setAttribute("l",l);
%>
<logic:iterate id="result" name="l">
<logic:equal name="result" property="id" value="<%=s%>">
<table width="814" align="center">
<tr>
<td align="right" width="303" colspan="">
Name
<span id="Label40" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
<td width="202" style="height: 26px" >
<html:text name="result" property="Nam" maxlength="50" styleId="tbxnames" tabindex="1" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20"/></td>
<td width="295" style="height: 26px" >
<html:errors property="Nam"/> </td>
</tr>
<tr>
<td align="right" width="303" colspan="">
<span id="Label9">Address 1</span>
<span id="Label29" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
<td width="202" style="height: 26px" >
<html:text name="result" property="Address1" maxlength="50" styleId="tbxAddress1" tabindex="2" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td width="295" style="height: 26px" >
<html:errors property="Address1"/></td>
</tr>
<tr>
<td align="right" style="height: 17px" width="303">
<span id="Label10">Address 2</span></td>
<td style="height: 17px" width="202" >
<html:text name="result" property="Address2" maxlength="50" styleId="tbxAddress2" tabindex="3" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td style="height: 17px" width="295" >
</td>
</tr>
<tr>
<td align="right" style="height: 17px" width="303">
<span id="Label10">Address 3</span></td>
<td style="height: 17px" width="202" >
<html:text name="result" property="Address3" maxlength="50" styleId="tbxAddress3" tabindex="4" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td style="height: 17px" width="295" >
</td>
</tr>
<tr>
<td align="right" style="height: 22px" width="303">
City
<span id="Label31" style="display:inline-block;color:Red;height:10px;width:3px;">*</span>
</td><td style="height: 22px" width="202" >
<html:text name="result" property="City" maxlength="50" styleId="ab" tabindex="5" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td style="height: 22px" width="295" >
<html:errors property="City"/></td>
</tr>
<tr>
<td align="right" style="height: 21px" width="303"> Pincode<span id="Label32" style="display:inline-block;color:Red;height:10px;width:3px;">*</span>
</td>
<td style="height: 21px" width="202">
<html:text name="result" property="Pincode" maxlength="6" styleId="tbxpincode" tabindex="6" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td style="height: 21px" width="295">
<html:errors property="Pincode"/></td>
</tr>
<tr>
<td align="right" style="height: 31px" width="303" >
<span id="Label41">State</span><span id="Label33" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
<td align="left" style="height: 31px" width="202">
<html:select name="result" property="stat" tabindex="7" size="1">
<html:option value="Andaman and Nicobar Islands">Andaman and Nicobar Islands</html:option>
<html:option value="Andhra Pradesh">Andhra Pradesh</html:option>
<html:option value="Arunachal Pradesh">Arunachal Pradesh</html:option>
<html:option value="Assam">Assam</html:option>
<html:option value="Bihar">Bihar</html:option>
<html:option value="Chandigarh">Chandigarh</html:option>
<html:option value="Chattisgarh">Chattisgarh</html:option>
<html:option value="Dadra And NagarHaveli">Dadra And NagarHaveli</html:option>
<html:option value="Daman And Diu">Daman And Diu</html:option>
<html:option value="Delhi">Delhi</html:option>
<html:option value="Goa">Goa</html:option>
<html:option value="Gujrat">Gujrat</html:option>
<html:option value="Harayana">Harayana</html:option>
<html:option value="Himachal Pradesh">Himachal Pradesh</html:option>
<html:option value="Jammu And Kashmir">Jammu And Kashmir</html:option>
<html:option value="Jharkhand">Jharkhand</html:option>
<html:option value="Karnataka">Karnataka</html:option>
<html:option value="Kerala">Kerala</html:option>
<html:option value="Lakshadweep">Lakshadweep</html:option>
<html:option value="Manipur">Manipur</html:option>
<html:option value="Madhya Pradesh">Madhya Pradesh</html:option>
<html:option value="Maharashtra">Maharashtra</html:option>
<html:option value="Meghalaya">Meghalaya</html:option>
<html:option value="Mizoram">Mizoram</html:option>
<html:option value="Nagaland">Nagaland</html:option>
<html:option value="Orissa">Orissa</html:option>
<html:option value="Pondicherry">Pondicherry</html:option>
<html:option value="Punjab">Punjab</html:option>
<html:option value="Rajasthan">Rajasthan</html:option>
<html:option value="Sikkim">Sikkim</html:option>
<html:option value="TamilNadu">TamilNadu</html:option>
<html:option value="Tripura">Tripura</html:option>
<html:option value="uttarPradesh">uttarPradesh</html:option>
<html:option value="Uttranchal">Uttranchal</html:option>
</html:select>
</td>
<td align="left" style="height: 31px" width="295">
</td>
</tr>
<tr>
<td align="right" style="height: 31px" width="303" >
Membership Info</td>
<td align="left" style="height: 31px" width="202">
<html:text name="result" property="Membershipinfo" maxlength="50" styleId="tbxCity0" tabindex="8" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td align="left" style="height: 31px" width="295">
</td>
</tr>
<tr>
<td align="right" style="height: 31px" width="303" >
PAN
<span id="Label35" style="display:inline-block;color:Red;height:10px;width:3px;">*</span></td>
<td align="left" style="height: 31px" width="202">
<html:text name="result" property="Pan" maxlength="16" styleId="tbx" tabindex="9" style="color:Black;border-width:1px;border-style:solid;font-family:verdana;font-size:11px;height:20px;width:200px;" size="20" /></td>
<td align="left" style="height: 31px" width="295">
<html:errors property="Pan"/></td>
</tr>
</logic:equal>
</logic:iterate>
<tr>
<td align="right" style="height: 31px" width="303" >
</td>
<td align="left" style="height: 31px" width="202"> </td>
<td align="left" style="height: 31px" width="295"> </td>
</tr>
</table>
<div id="ValidationSummary2" style="color:Red;width:377px;display:none;">
</div>
<p> </p>
</fieldset>
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="left"><html:link action="page1">Back</html:link></td>
</tr>
<tr align="right">
<td><hr>
<p>
<html:submit/>
<input id="btnCancel" style="font-weight: bold; font-size: 11px; width: 120px; color: white; font-family: verdana; height: 20px; border-style: none; background-color: #630000" tabIndex="22" type="reset" value="Cancel" name="btnCancel"></td>
</tr>
</table>
</html:form>
</body>
</html>
So when i submit this form leaving a field blank it through a servlet exception but it works fine if i dont leave a fiied blank csee below the exception:-
exception
javax.servlet.ServletException at
org.apache.struts.chain.ComposableRequestProcessor.process (
ComposableRequestProcessor.java:283) at
org.apache.struts.action.ActionServlet.process (
ActionServlet.java:1858) at
org.apache.struts.action.ActionServlet.doPost (
ActionServlet.java:459) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:716) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:809) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:200) at
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:146) at
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:433) at
org.apache.catalina.core.ContainerBase.invoke (
ContainerBase.java:948) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
root cause
org.apache.jasper.JasperException at
org.apache.jasper.servlet.JspServletWrapper.service (
JspServletWrapper.java:207) at
org.apache.jasper.servlet.JspServlet.serviceJspFile (
JspServlet.java:240) at
org.apache.jasper.servlet.JspServlet.service (
JspServlet.java:187) at
javax.servlet.http.HttpServlet.service (
HttpServlet.java:809) at
org.apache.catalina.core.ApplicationDispatcher.invoke (
ApplicationDispatcher.java:627) at
org.apache.catalina.core.ApplicationDispatcher.doForward (
ApplicationDispatcher.java:382) at
org.apache.catalina.core.ApplicationDispatcher.forward (
ApplicationDispatcher.java:306) at org.apache.struts.chain.commands.servlet.PerformForward
---------------------------------
Yahoo! for Good helps you make a difference