You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Bender <db...@umn.edu> on 2004/09/17 16:26:18 UTC
"Resources not defined for Validator"
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
Re: Advice on adding/updating products to an online store?
Posted by Vic Cekvenich <ce...@portalvu.com>.
Gupta wrote:
person who
> 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Advice on adding/updating products to an online store?
Posted by Amit Gupta <am...@computerware.co.in>.
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: amitguptainn@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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Advice on adding/updating products to an online store?
Posted by struts Dude <sc...@slingshot.co.nz>.
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: "Resources not defined for Validator"
Posted by Andrew Close <ac...@gmail.com>.
Dave,
On Fri, 17 Sep 2004 09:26:18 -0500, Dave Bender <db...@umn.edu> wrote:
<snip>
> 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)
>
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>
> 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?
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Struts with CVS??
Posted by struts Dude <sc...@slingshot.co.nz>.
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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Xml files as backend database question?
Posted by Craig McClanahan <cr...@gmail.com>.
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
<hu...@ix.netcom.com> wrote:
> 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:scea@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" <sc...@slingshot.co.nz>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Wednesday, September 29, 2004 10:14 AM
> Subject: Xml files as backend database question?
>
> > 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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Xml files as backend database question?
Posted by "David G. Friedman" <hu...@ix.netcom.com>.
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:scea@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" <sc...@slingshot.co.nz>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, September 29, 2004 10:14 AM
Subject: Xml files as backend database question?
> 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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Xml files as backend database question?
Posted by struts Dude <sc...@slingshot.co.nz>.
----- Original Message -----
From: "struts Dude" <sc...@slingshot.co.nz>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, September 29, 2004 10:14 AM
Subject: Xml files as backend database question?
> 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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Xml files as backend database question?
Posted by struts Dude <sc...@slingshot.co.nz>.
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
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: "Resources not defined for Validator"
Posted by Andrew Close <ac...@gmail.com>.
Dave,
On Fri, 17 Sep 2004 10:20:53 -0500, Dave Bender <db...@umn.edu> wrote:
<snip>
> 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" />
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: "Resources not defined for Validator"
Posted by Dave Bender <db...@umn.edu>.
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:dbender@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: bmf5@daimlerchrysler.com [mailto:bmf5@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"
<db...@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <us...@struts.apache.org>
cc
Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<user@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: "Resources not defined for Validator"
Posted by Dave Bender <db...@umn.edu>.
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: bmf5@daimlerchrysler.com [mailto:bmf5@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"
<db...@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <us...@struts.apache.org>
cc
Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<user@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: "Resources not defined for Validator"
Posted by bm...@daimlerchrysler.com.
Do you have the plug-in set in the struts-config.xml?
"Dave Bender"
<db...@umn.edu>
To
09/17/2004 10:26 "Struts Users Mailing List"
AM <us...@struts.apache.org>
cc
Please respond to Subject
"Struts Users "Resources not defined for
Mailing List" Validator"
<user@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org