Discussion:
"Resources not defined for Validator"
Dave Bender
2004-09-17 14:26:18 UTC
Permalink
I'm having a challenge getting the Validator plug-in to work. It's my first crack at it, so forgive if I'm missing something obvious. Better yet, if I am missing something obvious, tell me what it is.

When I call up my action, I'm getting a "Resources not defined for Validator" exception. My logs say:

87406 DEBUG [HttpProcessor[8080][2]] org.apache.struts.action.RequestProcessor - Validating input form properties
121976 ERROR [HttpProcessor[8080][2]] org.apache.struts.validator.ValidatorForm - Resources not defined for Validator
org.apache.commons.validator.ValidatorException: Resources not defined for Validator
at org.apache.commons.validator.Validator.validate(Validator.java:574)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

My web.xml contains this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
...
</servlet>

I have a properties file at the base of my src tree named ApplicationResources.properties and it contains :

profile.user.title=Title

A check of the .war file shows that this is in war file that's produced.


My validation.xml file is configured to validate just one field (hey, I'm just getting going!):

<formset>
<form name="userProfileActionForm">
<field property="title" depends="required">
<arg0 key="profile.user.title" resource="false" />
</field>
</form>
</formset>


What am I missing?

Any help would be appreciated. This looks like
b***@daimlerchrysler.com
2004-09-17 14:37:08 UTC
Permalink
Do you have the plug-in set in the struts-config.xml?






"Dave Bender"
<***@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <***@struts.apache.org>
cc

Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<***@struts.apac
he.org>








I'm having a challenge getting the Validator plug-in to work. It's my
first crack at it, so forgive if I'm missing something obvious. Better
yet, if I am missing something obvious, tell me what it is.

When I call up my action, I'm getting a "Resources not defined for
Validator" exception. My logs say:

87406 DEBUG [HttpProcessor[8080][2]]
org.apache.struts.action.RequestProcessor - Validating input form
properties
121976 ERROR [HttpProcessor[8080][2]]
org.apache.struts.validator.ValidatorForm - Resources not defined for
Validator
org.apache.commons.validator.ValidatorException: Resources not defined for
Validator
at org.apache.commons.validator.Validator.validate(Validator.java:574)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

My web.xml contains this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
...
</servlet>

I have a properties file at the base of my src tree named
ApplicationResources.properties and it contains :

profile.user.title=Title

A check of the .war file shows that this is in war file that's produced.


My validation.xml file is configured to validate just one field (hey, I'm
just getting going!):

<formset>
<form name="userProfileActionForm">
<field property="title"
depends="required">
<arg0
key="profile.user.title" resource="false" />
</field>
</form>
</formset>


What am I missing?

Any help would be appreciated. This looks like a good plug-in to use.

Dave
Dave Bender
2004-09-17 15:00:39 UTC
Permalink
Yes, I have:

...
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>
-----Original Message-----
From: ***@daimlerchrysler.com [mailto:***@daimlerchrysler.com]
Sent: Friday, September 17, 2004 9:37 AM
To: Struts Users Mailing List
Subject: Re: "Resources not defined for Validator"






Do you have the plug-in set in the struts-config.xml?






"Dave Bender"
<***@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <***@struts.apache.org>
cc

Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<***@struts.apac
he.org>








I'm having a challenge getting the Validator plug-in to work. It's my
first crack at it, so forgive if I'm missing something obvious. Better
yet, if I am missing something obvious, tell me what it is.

When I call up my action, I'm getting a "Resources not defined for
Validator" exception. My logs say:

87406 DEBUG [HttpProcessor[8080][2]]
org.apache.struts.action.RequestProcessor - Validating input form
properties
121976 ERROR [HttpProcessor[8080][2]]
org.apache.struts.validator.ValidatorForm - Resources not defined for
Validator
org.apache.commons.validator.ValidatorException: Resources not defined for
Validator
at org.apache.commons.validator.Validator.validate(Validator.java:574)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

My web.xml contains this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
...
</servlet>

I have a properties file at the base of my src tree named
ApplicationResources.properties and it contains :

profile.user.title=Title

A check of the .war file shows that this is in war file that's produced.


My validation.xml file is configured to validate just one field (hey, I'm
just getting going!):

<formset>
<form name="userProfileActionForm">
<field property="title"
depends="required">
<arg0
key="profile.user.title" resource="false" />
</field>
</form>
</formset>


What am I missing?

Any help would be appreciated. This looks like a good plug-in to use.

Dave





---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For additional co
Dave Bender
2004-09-17 15:20:53 UTC
Permalink
Clarification: I have this in my struts-config.xml file, but I have a modular application and the plug was not in the module's config file, profile-config.xml.

I've added it an now I'm getting past the "Resources not defined..." exception. Instead, I'm getting "java.lang.NoSuchMethodException: org.apache.struts.validator.FieldChecks.validateRequired. I'm hunting down the cause of that.

I'm concluding that if I have multiple modules, I need the Plug-Ins plugged into each module, correct? The benefit being I can keep validation rules contained in different files for different modules if I so choose? That is I could put the 'profile' validation rules in profile-validation.xml with this:

<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/profile-validation.xml" />

Dave





-----Original Message-----
From: Dave Bender [mailto:***@umn.edu]
Sent: Friday, September 17, 2004 10:01 AM
To: Struts Users Mailing List
Subject: RE: "Resources not defined for Validator"


Yes, I have:

...
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>
</struts-config>
-----Original Message-----
From: ***@daimlerchrysler.com [mailto:***@daimlerchrysler.com]
Sent: Friday, September 17, 2004 9:37 AM
To: Struts Users Mailing List
Subject: Re: "Resources not defined for Validator"






Do you have the plug-in set in the struts-config.xml?






"Dave Bender"
<***@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <***@struts.apache.org>
cc

Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<***@struts.apac
he.org>








I'm having a challenge getting the Validator plug-in to work. It's my
first crack at it, so forgive if I'm missing something obvious. Better
yet, if I am missing something obvious, tell me what it is.

When I call up my action, I'm getting a "Resources not defined for
Validator" exception. My logs say:

87406 DEBUG [HttpProcessor[8080][2]]
org.apache.struts.action.RequestProcessor - Validating input form
properties
121976 ERROR [HttpProcessor[8080][2]]
org.apache.struts.validator.ValidatorForm - Resources not defined for
Validator
org.apache.commons.validator.ValidatorException: Resources not defined for
Validator
at org.apache.commons.validator.Validator.validate(Validator.java:574)
at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

My web.xml contains this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
...
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
...
</servlet>

I have a properties file at the base of my src tree named
ApplicationResources.properties and it contains :

profile.user.title=Title

A check of the .war file shows that this is in war file that's produced.


My validation.xml file is configured to validate just one field (hey, I'm
just getting going!):

<formset>
<form name="userProfileActionForm">
<field property="title"
depends="required">
<arg0
key="profile.user.title" resource="false" />
</field>
</form>
</formset>


What am I missing?

Any help would be appreciated. This looks like a good plug-in to use.

Dave





---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For ad
Andrew Close
2004-09-17 15:30:29 UTC
Permalink
Dave,

On Fri, 17 Sep 2004 10:20:53 -0500, Dave Bender <***@umn.edu> wrote:

<snip>
Post by Dave Bender
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/profile-validation.xml" />
yes, it is my understanding that the plug-in needs to be defined in
the module you are working with. so if you are using more than one
module you can validate some and not have to validate all by only
including the plug-in in those modules that you want validated.
Andrew Close
2004-09-17 14:59:12 UTC
Permalink
Dave,


On Fri, 17 Sep 2004 09:26:18 -0500, Dave Bender <***@umn.edu> wrote:

<snip>
Post by Dave Bender
87406 DEBUG [HttpProcessor[8080][2]] org.apache.struts.action.RequestProcessor - Validating input form properties
121976 ERROR [HttpProcessor[8080][2]] org.apache.struts.validator.ValidatorForm - Resources not defined for Validator
org.apache.commons.validator.ValidatorException: Resources not defined for Validator
at org.apache.commons.validator.Validator.validate(Validator.java:574)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)
looking at the error you're getting my first guess would be that the
page you are executing does not have the field listed in your
validation.xml.

also, look in your struts-config where you've defined your action. do
you have validation="true" set for that action?

<snip>
Post by Dave Bender
<formset>
<form name="userProfileActionForm">
<field property="title" depends="required">
<arg0 key="profile.user.title" resource="false" />
</field>
</form>
</formset>
What am I missing?
is your formset wrapped in <form-validation>? or do you have
<formset> as your root tag in the validation.xml? i would guess that
this would give you a different error if you had the wrong root...
but worth a look

HTH,
andy
struts Dude
2004-09-29 12:17:17 UTC
Permalink
Hi,

Just a question on what's the usual practice or the easiest way of
adding/updating a product to an online store.

1.
Is the usualy practice using web services where a registered supplier
login and send an XML file with images serialized as binary data to
add a new product or update product?

Alternatively, an admin may use web services like these to update/add a
product.

2.
Suppose supplier not allowed to update online, then I guess the
usual practice is for admin to login, shown a product list or search form,
choose product and shown product description form to add a new product
or update product descriptions manually, upload image files. After pressing
save button, all these will be saved in database. Right???

This seems like a stupid way as if 50 new products arrived, admin
will repeat manual update 50 times.

3. Is there even an easier way?? 1. seems the easiest but also require
expertise in web services which is complicated.

----------

I think a professional online store might use both 1 and 2.

Does anyone who have done 1 or 2 can share some tips or thoughts that may
save
me the trouble of reinventing the wheel??

Is there a sample application of 1. that I can adapt to quickly for my own
use??

BTW, is it popular practice to use Lucene as search engines to search
products
by boolean expressions in online store??

Personally, I can't see why people wud want to do that unless Lucene can
offer
significant performance speed as mapping boolean expressions typed by
user in search text field to SQL and query DB seems much easier.


Thanks

Duude where is my car
Amit Gupta
2004-09-30 00:57:12 UTC
Permalink
Hello guys,

Can we prepare a list of URLs of resources that can be useful to person who
have no background in java and need to develop struts application. A
comprehensive FAQ is also proposed.

Take care
Amit Gupta
Mobile:9891062552
Email: ***@yahoo.co.in

A request - given the barrage of spam these days, there is a non-zero
probability that we accidentally delete important emails. If a response is
necessary to your email, rest assured that I will respond in time. If
however, you have not received a response in a reasonable period, please
don't hesitate to resend.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 9/27/2004
Vic Cekvenich
2004-09-29 14:47:12 UTC
Permalink
Gupta wrote:
person who
Post by Amit Gupta
have no background in java and need to develop
Here is just the thing:

http://developer.sun.com/prodtech/javatools/jscreator/index.jsp

Also google on Sun'd PetStore on how to use EJB w/ above.


.V

ps: People that have development background should use
http://ibatis.com/jpetstore/jpetstore.html - now an Apache project.
struts Dude
2004-09-24 08:29:34 UTC
Permalink
Hi
Has anyone written a project management web application
using Struts with CVS server??

I am thinking of writing 1 and wud be most interested to hear from
someone who has done this already to stop reinventing wheel.

Thanks
Jesse Alexander (KXT)
2004-09-24 09:45:15 UTC
Permalink
Codebeamer is a super set of project management tool and is written using
Struts.
-> <http://www.intland.com/products/codebeamer.htm>
And it has a hook into CVS too...

hth
Alexander

-----Original Message-----
From: struts Dude [mailto:***@slingshot.co.nz]
Sent: Friday, September 24, 2004 10:30 AM
To: Struts Users Mailing List
Subject: Struts with CVS??

Hi
Has anyone written a project management web application
using Struts with CVS server??

I am thinking of writing 1 and wud be most interested to hear from
someone who has done this already to stop reinventing wheel.

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For additional commands, e-mail: user-***@struts.apache.org
struts Dude
2004-09-28 22:14:03 UTC
Permalink
Hi,

Just want some thought on this question.

Nobody in their right mind wud use xml files as backend database in
production system right?

I ask this because I was wandering whether one can get away with a DB in a
production site.

Well, I rememebered reading some discussion of
how someone read in 3-5MB of xml files into memory
as database when application starts for production but
that's rare practice and not sensible I assume.

Synchronizing data wud have been enough of a headache I think.


Thanks
struts Dude
2004-09-29 00:12:29 UTC
Permalink
----- Original Message -----
From: "struts Dude" <***@slingshot.co.nz>
To: "Struts Users Mailing List" <***@struts.apache.org>
Sent: Wednesday, September 29, 2004 10:14 AM
Subject: Xml files as backend database question?
Post by struts Dude
Hi,
Just want some thought on this question.
Nobody in their right mind wud use xml files as backend database in
production system right?
I ask this because I was wandering whether one can get away with a DB in a
production site.
I mean get away without a DB.
David G. Friedman
2004-09-29 00:35:29 UTC
Permalink
Maybe, maybe not.. How about an XML database in Java? Open source even. :)

http://exist.sourceforge.net/

Search engines are a wonderful thing. Open Source projects are surprising,
aren't they?

I almost want to try this. :)

-David

-----Original Message-----
From: struts Dude [mailto:***@slingshot.co.nz]
Sent: Tuesday, September 28, 2004 8:12 PM
To: Struts Users Mailing List
Subject: Re: Xml files as backend database question?



----- Original Message -----
From: "struts Dude" <***@slingshot.co.nz>
To: "Struts Users Mailing List" <***@struts.apache.org>
Sent: Wednesday, September 29, 2004 10:14 AM
Subject: Xml files as backend database question?
Post by struts Dude
Hi,
Just want some thought on this question.
Nobody in their right mind wud use xml files as backend database in
production system right?
I ask this because I was wandering whether one can get away with a DB in a
production site.
I mean get away without a DB.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@struts.apache.org
For additional commands, e-mail: user-***@struts.apache.org
Craig McClanahan
2004-09-29 03:22:01 UTC
Permalink
You might also want to take a look at something closer to our (Apache) home:

http://xml.apache.org/xindice/

Craig


On Tue, 28 Sep 2004 20:35:29 -0400, David G. Friedman
Post by David G. Friedman
Maybe, maybe not.. How about an XML database in Java? Open source even. :)
http://exist.sourceforge.net/
Search engines are a wonderful thing. Open Source projects are surprising,
aren't they?
I almost want to try this. :)
-David
-----Original Message-----
Sent: Tuesday, September 28, 2004 8:12 PM
To: Struts Users Mailing List
Subject: Re: Xml files as backend database question?
----- Original Message -----
Sent: Wednesday, September 29, 2004 10:14 AM
Subject: Xml files as backend database question?
Post by struts Dude
Hi,
Just want some thought on this question.
Nobody in their right mind wud use xml files as backend database in
production system right?
I ask this because I was wandering whether one can get away with a DB in a
production site.
I mean get away without a DB.
---------------------------------------------------------------------
---------------------------------------------------------------------
D***@EvergreenInvestments.com
2004-09-29 12:35:19 UTC
Permalink
Return Receipt

Your Re: Advice on adding/updating products to an online store?
document
:

was Dennis Graham/EvergreenFunds
received
by:

at: 09/29/2004 08:36:41 AM
Anant D Agarwal
2004-09-29 14:20:10 UTC
Permalink
Return Receipt

Your Re: Advice on adding/updating products to an online store?
document
:

was Anant D Agarwal/India/IBM
received
by:

at: 29/09/2004 19:46:11
Loading...