Re: Exception in Validation

2008-03-16 Thread Lukasz Lenart
Hi,

How do you start your project? With maven2 maybe? The xml file have to
be in the same output directory, next to compiled class. If you use
maven2, put your xml in to folder resources with the same path as for
action class.


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Re: Exception in Validation

2008-03-16 Thread aum strut
i am using myeclipse for the development purpose
and putting the file in the same folderwhere action class mean .java class
is placed..
its neithergiving me any error or exception nor doing any validation


On 3/16/08, Lukasz Lenart [EMAIL PROTECTED] wrote:

 Hi,

 How do you start your project? With maven2 maybe? The xml file have to
 be in the same output directory, next to compiled class. If you use
 maven2, put your xml in to folder resources with the same path as for
 action class.


 Regards
 --
 Lukasz

 http://www.linkedin.com/in/lukaszlenart

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




Re: Exception in Validation

2008-03-16 Thread Lukasz Lenart
Ok, check if xml file is in WebRoot/WEB-INF/classes/path


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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



Re: Exception in Validation

2008-03-16 Thread aum strut
yes it is there in the same folder

structure is
1)WebRoot\WEB-INF\classes\TestExample-validation

where as my class file for the action is in

2)WebRoot\WEB-INF\classes\aum

and if i will put it in the aum folder it is giving error.while it is
neithergiving any error nor performing validation when placed in the path
mentioned in point 1.

--aum


On 3/16/08, Lukasz Lenart [EMAIL PROTECTED] wrote:

 Ok, check if xml file is in WebRoot/WEB-INF/classes/path


 Regards
 --
 Lukasz

 http://www.linkedin.com/in/lukaszlenart

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




Re: Exception in Validation

2008-03-16 Thread Dave Newton
--- aum strut [EMAIL PROTECTED] wrote:
 structure is
 1)WebRoot\WEB-INF\classes\TestExample-validation
 
 where as my class file for the action is in
 
 2)WebRoot\WEB-INF\classes\aum
 
 and if i will put it in the aum folder it is giving error.while it is
 neithergiving any error nor performing validation when placed in the path
 mentioned in point 1.

The path in (1) is wrong: it needs to be in the SAME PACKAGE as the action
class.

Please post the precise error message you're getting.

Dave



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



Re: Exception in Validation

2008-03-16 Thread aum strut
Hi Dave,

As my complied action class namely TestExample.class is at the following
position
WebRoot\WEB-INF\classes\aum
 and if i am putting my TestExample-validation in this folder,it is giving
following error in the console


SEVERE: Could not find action or result

No result defined for action aum.TestExample and result input - action -
file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Test/WEB-INF/classes/struts.xml:6:60

at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(*
DefaultActionInvocation.java:350*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:253*)

at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(*
ValidationInterceptor.java:150*)

at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept
(*AnnotationValidationInterceptor.java:48*)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:86*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
*ConversionErrorInterceptor.java:123*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
ParametersInterceptor.java:167*)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:86*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept
(*StaticParametersInterceptor.java:105*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(*
CheckboxInterceptor.java:83*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(*
FileUploadInterceptor.java:207*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(*
ModelDrivenInterceptor.java:74*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(*
ScopedModelDrivenInterceptor.java:127*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at 

Re: Exception in Validation

2008-03-16 Thread aum strut
hi dave,

Thanks for the help.i have solved the problem,actually i was not configuring
for the input result type in the struts.xml file.

after configuring its working fine..

:)

--aum


On 3/16/08, aum strut [EMAIL PROTECTED] wrote:

 Hi Dave,

 As my complied action class namely TestExample.class is at the following
 position
 WebRoot\WEB-INF\classes\aum
  and if i am putting my TestExample-validation in this folder,it is giving
 following error in the console


 SEVERE: Could not find action or result

 No result defined for action aum.TestExample and result input - action -
 file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Test/WEB-INF/classes/struts.xml:6:60

 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(
 *DefaultActionInvocation.java:350*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:253*)

 at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(
 *ValidationInterceptor.java:150*)

 at
 org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept
 (
 *AnnotationValidationInterceptor.java:48*)

 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 *MethodFilterInterceptor.java:86*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at
 com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
 *ConversionErrorInterceptor.java:123*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
 *ParametersInterceptor.java:167*)

 at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(
 *MethodFilterInterceptor.java:86*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at
 com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(
 *StaticParametersInterceptor.java:105*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(
 *CheckboxInterceptor.java:83*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(
 *FileUploadInterceptor.java:207*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(
 *ModelDrivenInterceptor.java:74*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:224*)

 at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(
 *DefaultActionInvocation.java:223*)

 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(
 *UtilTimerStack.java:455*)

 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
 *DefaultActionInvocation.java:221*)

 at
 com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept
 (
 

Re: Exception in Validation

2008-03-16 Thread Dave Newton
--- aum strut [EMAIL PROTECTED] wrote:
 Thanks for the help.i have solved the problem,actually i was not
 configuring for the input result type in the struts.xml file.

Sometimes reading the error message is actually useful!

Not always :/ But sometimes.

Dave


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



Re: Exception in Validation

2008-03-16 Thread aum strut
thats true
:)


On 3/16/08, Dave Newton [EMAIL PROTECTED] wrote:

 --- aum strut [EMAIL PROTECTED] wrote:
  Thanks for the help.i have solved the problem,actually i was not
  configuring for the input result type in the struts.xml file.

 Sometimes reading the error message is actually useful!

 Not always :/ But sometimes.

 Dave


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




Re: Exception in Validation

2008-03-15 Thread Dave Newton
--- aum strut [EMAIL PROTECTED] wrote:
 TestExample.java. i have two files namely validators.xml 

Why are you creating a validators.xml?

That aside, you don't have a grammar in the validators.xml, which is exactly
what the error message states.

Dave


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



Re: Exception in Validation

2008-03-15 Thread aum strut
Hi Dave,

Thanks for the rply..
i have already removed validators.xml
i am not sure about the two points:

1)  i am only using the two fields in my input form:
namely Name and password.
the name of the action is TestExample i have created a
TestExample-validation.xml file with following contents:

?xml version=1.0 encoding=UTF-8?

!DOCTYPE validators PUBLIC

-//OpenSymphony Group//XWork Validator 1.0.2//EN

http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
  validators
   field name=name
field-validator type=requiredstring
messageYou must enter a value for Name/message
/field-validator
  /field

 field name=password
field-validator type=requiredstring
messageYou must enter a valid password/message
/field-validator
/field

/validators
what is meant by grammer not defined?? as i am not getting it.

2) can u plz specify the exact location for the above XML file.

-aum




On 3/15/08, Dave Newton [EMAIL PROTECTED] wrote:

 --- aum strut [EMAIL PROTECTED] wrote:
  TestExample.java. i have two files namely validators.xml

 Why are you creating a validators.xml?

 That aside, you don't have a grammar in the validators.xml, which is
 exactly
 what the error message states.

 Dave


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




Re: Exception in Validation

2008-03-15 Thread Dave Newton
--- aum strut [EMAIL PROTECTED] wrote:
 what is meant by grammer not defined?? as i am not getting it.

Are you still getting the error after removing validators.xml?

If not, it probably means that the XML parser was expecting there to be an
XML grammar (like a DTD) specified in the XML file.

If you're still getting the error then repost the file as it is now.

 2) can u plz specify the exact location for the above XML file.

In the same package the action is in.

Dave


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



Re: Exception in Validation

2008-03-15 Thread Martin Gainty
sounds as if you might possibly a Speech to Text engine you're working with?
check the referenced DTD is a valid 'grammar DTD'
http://www.w3.org/TR/2001/WD-speech-grammar-20010820/#AppB

(or post it here and we can check for you..)

Martin-

- Original Message -
From: Dave Newton [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, March 15, 2008 1:08 PM
Subject: Re: Exception in Validation


 --- aum strut [EMAIL PROTECTED] wrote:
  TestExample.java. i have two files namely validators.xml

 Why are you creating a validators.xml?

 That aside, you don't have a grammar in the validators.xml, which is
exactly
 what the error message states.

 Dave


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




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



Re: Exception in Validation

2008-03-15 Thread Dave Newton
--- Martin Gainty [EMAIL PROTECTED] wrote:
 sounds as if you might possibly a Speech to Text engine you're working
 with? check the referenced DTD is a valid 'grammar DTD'
 http://www.w3.org/TR/2001/WD-speech-grammar-20010820/#AppB

?!

The validators.xml didn't have a doctype with a DTD in it. Some XML parsers
will complain about that, and the exception message (no grammar found, or
something like that) tends to point me in that direction, particularly since
the exception occurred on a form submission with validation.

Dave


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



Re: Exception in Validation

2008-03-15 Thread aum strut
Hi Dave,

I have removed validators.xml.

i have put the TestExample-validation.xml in the same folder where my action
is placed.
now it is not giving me any error but validation is not working at all.
belw is snap shop of my TestExample-validation.xml:

?xml version=1.0 encoding=UTF-8?



!DOCTYPE validators PUBLIC





-//OpenSymphony Group//XWork Validator 1.0.2//EN





http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;



validators



field name=name

field-validator type=requiredstring

messageYou must enter a value for Name/message

/field-validator

/field

field name=password

field-validator type=requiredstring

messageYou must enter a valid password/message

/field-validator



/field



/validators
i have only tow fildes namely:
1) Name
2)Password

any pointer about the problem will be much appriciated.

--aum



On 3/16/08, Dave Newton [EMAIL PROTECTED] wrote:

 --- Martin Gainty [EMAIL PROTECTED] wrote:
  sounds as if you might possibly a Speech to Text engine you're working
  with? check the referenced DTD is a valid 'grammar DTD'
  http://www.w3.org/TR/2001/WD-speech-grammar-20010820/#AppB

 ?!

 The validators.xml didn't have a doctype with a DTD in it. Some XML
 parsers
 will complain about that, and the exception message (no grammar found, or
 something like that) tends to point me in that direction, particularly
 since
 the exception occurred on a form submission with validation.

 Dave


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