struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hibbs, David" <David.Hi...@ANICO.com>
Subject RE: Validator / Tiles and modules - anybody done it?
Date Wed, 18 Feb 2004 13:43:51 GMT
	I highly recommend specifying the validator plugin in each module's
config file. It will save you much pain later on for a minimum of effort.
Each module can refer to the same validator rules and form files without
problem.  And, after all, it's 5 minutes at the most to copy/paste it to
each module once you have the first one working.

	BTW, a couple things I didn't mention.  

	1) Make sure to keep your jsps, js, etc etc grouped together by
module name--and MaKe SURE thaT yOur CASE MATCHES, or you'll have trouble
with the struts:html tags such as rewrite later.
	2) Keep in mind that the paths in your tile definitions are ALWAYS
relative to the context root, not the module root.  If you have a tile def
myTile with a jsp stored under MyWAR/module1/jsp/myTileJsp.jsp, the path in
the tiles-defs.xml is /module1/jsp/myTileJsp.jsp -- you probably already
knew this, though. =)

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company


> -----Original Message-----
> From: Bill Johnson [mailto:petchia@yahoo.com]
> Sent: Tuesday, February 17, 2004 11:25 PM
> To: Struts Users Mailing List
> Subject: RE: Validator / Tiles and modules - anybody done it?
> 
> 
> Thanks for the info David. One last question.  Do you
> have to have the Validator plugin in every module's
> Struts config file if you simply want to have the same
> validation file for all modules?  Can I just put the
> validator plugin definition in the default module's
> struts-config.xml and then all of the other modules
> get it by default?
> 
> Thanks, Bill
> 
> 
> --- "Hibbs, David" <David.Hibbs@ANICO.com> wrote:
> > > I'm curious if anyone out there has gotten
> > Validator
> > > and/or Tiles working with Struts modules? Here are
> > my
> > > questions.  If you can answer any of them it would
> > be
> > > a great help.
> > 
> > 	Yep.  Got 'em both working.
> >  
> > > Do you have to have the validator plugin defined
> > in
> > > each module config file?  If so, how?
> > 
> > 	You've got it--it works just like in a
> > single-module app.  Create a
> > separate forms.xml for each module and set it in the
> > plugin and you're off.
> > 
> > > Do you have to have the tiles plugin defined in
> > each
> > > module config file? If so, how?
> > 
> > 	Again, on the money.  In each module's config,
> > define the tiles
> > plugin just as you would for a no-module app. 
> > 	Here's the gotcha that I ran into.  IIRC, the docs
> > indicate that the
> > default is for the tiles plugin to be module aware. 
> > The docs were wrong.
> > You MUST include <set-property
> > property="moduleAware" value="true" /> in the
> > plugin definition of each module.   
> > 
> > > Any gotchas or things to know?
> > 
> > 	If you see messages on the console about "Plugin
> > already
> > initialized" see the above--make sure you make ALL
> > module tiles plugins
> > module aware.
> > 
> > 	Once you get past that problem, it's really pretty
> > straightforward.
> > 
> > David Hibbs, ACS
> > Staff Programmer / Analyst
> > American National Insurance Company
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message