RE: Configuring Tiles + Validation + Modules

2003-03-27 Thread Niesen, Nathan
My mistake on the lack user manual, I forgot about the PDF and the JavaWorld
article links on the docs page. My real beef is that they are not just
included as part of the Struts download.

 -Original Message-
From:   Niesen, Nathan  
Sent:   Thursday, March 27, 2003 1:17 PM
To: 'Cedric Dumoulin'; Struts Users Mailing List
Subject:    RE: Configuring Tiles + Validation + Modules

I also wanted to mention... If I can only accomplish this using tiles, then
that indicates to me that something is wrong with the way modules were
designed.  I also noticed in the tiles examples that many of your URLs
contain <%=request.getContextPath()%>. This looks to me like you are
constantly having to override the URLs generated by the modules. I see that
as another design issue.

I admit I haven't fully explored the tiles-documentation.war but I do have
the following comments. The docs module lacks any documentation on how to
actually use tiles. Instead it is just a list of features and release notes
and is in fact identical to the welcome page. I think a user manual with
similar format and content to David Geary's templates article (Using JSP
templates to encapsulate Webpage layout and encourage modular design) would
be extremely beneficial. The left hand navigation on the main page is not
organized very well, it contains duplicate links with deferent names and
listed under different categories. The examples also contain a lot of script
which makes them hard to read. The blocks of script in the layouts (column,
vertical, etc...) and menu.jsp look like potential candidates for custom
tags.

Nathan.


 -Original Message-
From:   Niesen, Nathan  
Sent:   Thursday, March 27, 2003 12:32 PM
To: 'Cedric Dumoulin'; Struts Users Mailing List
Subject:    RE: Configuring Tiles + Validation + Modules

Again, all that example appears to show is that you can link from one module
to another. As far as I can tell, it does not show how to define a jsp page
containing a Struts  tag in on module and then
reuse that page from modules B, C, and D. The action mappings for myAction
would need to be defined in the config files for modules B, C, and D because
the forward pages would be different.

Here's as good an example as any that I can give in this medium:

/mapping/zoomControl.jsp
...

  

  

...

/orders-module/orderTracking.jsp
...

  
  ...order selection and action controls...

...

/inventory-module/inventoryTracking.jsp
...

  ...product selection control...
  

...

/WEB-INF/struts-config-inventory-module.xml
  ...
  

  
  ...

/WEB-INF/struts-config-orders-module.xml
  ...
  

  
  ...


 -Original Message-
From:   Cedric Dumoulin [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, March 27, 2003 10:11 AM
To: Struts Users Mailing List
Subject:    Re: Configuring Tiles + Validation + Modules



Niesen, Nathan wrote:

>I basically have the same questions. I've been searching the user docs and
>mailing lists trying to get a handle on what modules were intended to do,
>what modules can and can't do, and how I can use modules to improve my
>application framework. It appears to me that the modules feature opened up
a
>whole can-o-design-worms and they're still wiggling. I can't find anything
>that clearly defines intended usage of modules or the limitations of
>modules; especially in regards to using "resources" outside of a modules
>sub-directory.
>
>In addition to John's questions, I have the following question:
>
>1) How can I use tiles/templates to assemble a page in one module from
>reusable "components/pages" in one or more other modules? For example: I
>have pages in modules B, C, and D, that all want to pull in a menu page
from
>my default module as well as a reusable page from module A.
>  
>
  Tiles config file consider the url as absolute to the application. So, 
simply specify the absolute URL of your layout, page or tile.
  The tiles-documentation.war use 3 modules. You can check it for examples.

  Cedric

>Other issues with modules:
>
>1) Not all tags (html:img in particular) use the pagePattern or
>forwardPattern attributes from the controller. If I want to use an image in
>my header.jsp, the image file has to be physically located in each module
or
>I get a broken link.
>
>2) The pagePattern and forwardPattern are defined on the controller which
>means all tag or forward URLs for the module will be mapped to the same
>context relative URL. I think it would be more flexible if you simply
>specified the pattern as part of the URL attribute for the tag or forward.
>For example: page="$P/header.gif"/> and 
>
>3) The examples don't effectively demonstrate the effects that the
>contextRelative, input

RE: Configuring Tiles + Validation + Modules

2003-03-27 Thread Niesen, Nathan
I also wanted to mention... If I can only accomplish this using tiles, then
that indicates to me that something is wrong with the way modules were
designed.  I also noticed in the tiles examples that many of your URLs
contain <%=request.getContextPath()%>. This looks to me like you are
constantly having to override the URLs generated by the modules. I see that
as another design issue.

I admit I haven't fully explored the tiles-documentation.war but I do have
the following comments. The docs module lacks any documentation on how to
actually use tiles. Instead it is just a list of features and release notes
and is in fact identical to the welcome page. I think a user manual with
similar format and content to David Geary's templates article (Using JSP
templates to encapsulate Webpage layout and encourage modular design) would
be extremely beneficial. The left hand navigation on the main page is not
organized very well, it contains duplicate links with deferent names and
listed under different categories. The examples also contain a lot of script
which makes them hard to read. The blocks of script in the layouts (column,
vertical, etc...) and menu.jsp look like potential candidates for custom
tags.

Nathan.


 -Original Message-
From:   Niesen, Nathan  
Sent:   Thursday, March 27, 2003 12:32 PM
To: 'Cedric Dumoulin'; Struts Users Mailing List
Subject:        RE: Configuring Tiles + Validation + Modules

Again, all that example appears to show is that you can link from one module
to another. As far as I can tell, it does not show how to define a jsp page
containing a Struts  tag in on module and then
reuse that page from modules B, C, and D. The action mappings for myAction
would need to be defined in the config files for modules B, C, and D because
the forward pages would be different.

Here's as good an example as any that I can give in this medium:

/mapping/zoomControl.jsp
...

  

  

...

/orders-module/orderTracking.jsp
...

  
  ...order selection and action controls...

...

/inventory-module/inventoryTracking.jsp
...

  ...product selection control...
  

...

/WEB-INF/struts-config-inventory-module.xml
  ...
  

  
  ...

/WEB-INF/struts-config-orders-module.xml
  ...
  

  
  ...


 -Original Message-
From:   Cedric Dumoulin [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, March 27, 2003 10:11 AM
To: Struts Users Mailing List
Subject:    Re: Configuring Tiles + Validation + Modules



Niesen, Nathan wrote:

>I basically have the same questions. I've been searching the user docs and
>mailing lists trying to get a handle on what modules were intended to do,
>what modules can and can't do, and how I can use modules to improve my
>application framework. It appears to me that the modules feature opened up
a
>whole can-o-design-worms and they're still wiggling. I can't find anything
>that clearly defines intended usage of modules or the limitations of
>modules; especially in regards to using "resources" outside of a modules
>sub-directory.
>
>In addition to John's questions, I have the following question:
>
>1) How can I use tiles/templates to assemble a page in one module from
>reusable "components/pages" in one or more other modules? For example: I
>have pages in modules B, C, and D, that all want to pull in a menu page
from
>my default module as well as a reusable page from module A.
>  
>
  Tiles config file consider the url as absolute to the application. So, 
simply specify the absolute URL of your layout, page or tile.
  The tiles-documentation.war use 3 modules. You can check it for examples.

  Cedric

>Other issues with modules:
>
>1) Not all tags (html:img in particular) use the pagePattern or
>forwardPattern attributes from the controller. If I want to use an image in
>my header.jsp, the image file has to be physically located in each module
or
>I get a broken link.
>
>2) The pagePattern and forwardPattern are defined on the controller which
>means all tag or forward URLs for the module will be mapped to the same
>context relative URL. I think it would be more flexible if you simply
>specified the pattern as part of the URL attribute for the tag or forward.
>For example: page="$P/header.gif"/> and 
>
>3) The examples don't effectively demonstrate the effects that the
>contextRelative, inputForward, pagePattern, and forwardPattern attributes
>have on the page, forward, action, and href attributes.
>
>4) The examples only show how to switch from one self-contained module to
>another. They don't demonstrate how to combine resources/pages from
multiple
>modules into a single page via either includes or tiles/templates.
>
>Thanks, Nathan.
>
> -Original Message

RE: Configuring Tiles + Validation + Modules

2003-03-27 Thread Niesen, Nathan
Again, all that example appears to show is that you can link from one module
to another. As far as I can tell, it does not show how to define a jsp page
containing a Struts  tag in on module and then
reuse that page from modules B, C, and D. The action mappings for myAction
would need to be defined in the config files for modules B, C, and D because
the forward pages would be different.

Here's as good an example as any that I can give in this medium:

/mapping/zoomControl.jsp
...

  

  

...

/orders-module/orderTracking.jsp
...

  
  ...order selection and action controls...

...

/inventory-module/inventoryTracking.jsp
...

  ...product selection control...
  

...

/WEB-INF/struts-config-inventory-module.xml
  ...
  

  
  ...

/WEB-INF/struts-config-orders-module.xml
  ...
  

  
  ...


 -Original Message-
From:   Cedric Dumoulin [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, March 27, 2003 10:11 AM
To: Struts Users Mailing List
Subject:    Re: Configuring Tiles + Validation + Modules



Niesen, Nathan wrote:

>I basically have the same questions. I've been searching the user docs and
>mailing lists trying to get a handle on what modules were intended to do,
>what modules can and can't do, and how I can use modules to improve my
>application framework. It appears to me that the modules feature opened up
a
>whole can-o-design-worms and they're still wiggling. I can't find anything
>that clearly defines intended usage of modules or the limitations of
>modules; especially in regards to using "resources" outside of a modules
>sub-directory.
>
>In addition to John's questions, I have the following question:
>
>1) How can I use tiles/templates to assemble a page in one module from
>reusable "components/pages" in one or more other modules? For example: I
>have pages in modules B, C, and D, that all want to pull in a menu page
from
>my default module as well as a reusable page from module A.
>  
>
  Tiles config file consider the url as absolute to the application. So, 
simply specify the absolute URL of your layout, page or tile.
  The tiles-documentation.war use 3 modules. You can check it for examples.

  Cedric

>Other issues with modules:
>
>1) Not all tags (html:img in particular) use the pagePattern or
>forwardPattern attributes from the controller. If I want to use an image in
>my header.jsp, the image file has to be physically located in each module
or
>I get a broken link.
>
>2) The pagePattern and forwardPattern are defined on the controller which
>means all tag or forward URLs for the module will be mapped to the same
>context relative URL. I think it would be more flexible if you simply
>specified the pattern as part of the URL attribute for the tag or forward.
>For example: page="$P/header.gif"/> and 
>
>3) The examples don't effectively demonstrate the effects that the
>contextRelative, inputForward, pagePattern, and forwardPattern attributes
>have on the page, forward, action, and href attributes.
>
>4) The examples only show how to switch from one self-contained module to
>another. They don't demonstrate how to combine resources/pages from
multiple
>modules into a single page via either includes or tiles/templates.
>
>Thanks, Nathan.
>
> -Original Message-
>From:  Hohlen, John C [mailto:[EMAIL PROTECTED] 
>Sent:  Wednesday, March 26, 2003 8:20 AM
>To:Struts-User (E-mail)
>Subject:   Configuring Tiles + Validation + Modules
>
>I'm looking for some help on how to configure the Tiles and Validation
>Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta
>Struts, etc.) and replies to the mailing list address these topics
>independently, but not collectively.  In addition, I took a look at James
>Holmes "Switching Modules" example, but that focuses on the different ways
>to switch b/t modules, not on how to configure Modules with Tiles and the
>Validation frameworks. 
>
>For discussion purposes, let's assume I have following 3 modules (default,
>modA, modB).  Here are my questions:
>
>1) If I have a form bean definition used by all 3 modules, does it need to
>be defined in each of the 3 struts-config files, or can I just declare it
in
>the default struts-config?
>
>2) Does each modules' struts-config file need the following declaration to
>use the Validation framework, or can I simply declare this once in the
>config file for the default module?
>
>  
>  value="/WEB-INF/validator-rules.xml,
>/WEB-INF/validation.xml"/>
>  
>
>3) For Tile Definition config files, can all of these just be declared in
>the default str

RE: Configuring Tiles + Validation + Modules

2003-03-27 Thread Niesen, Nathan
  String suffix = request.getParameter("forwardSuffix");

  if (suffix == null) {
 try {
// look for a previous forward suffix stored in the session
suffix =
(String)request.getSession().getAttribute("forwardSuffix");
 } catch (Exception e) {
log.error("MyActionBase.getActionForward an exception has
occured: ", e);
 }
  }

  String forwardName = name;
  if (suffix != null) {
 forwardName = forwardName + suffix;
  }

  if (log.isDebugEnabled()) {
 log.debug("MyActionBase.getActionForward for action: " +
mapping.getPath()
   + "  forwardName: " + forwardName);
  }

  // Although not publicly known or advertised, the logic below allows
action
  // forwards to be dynamically overridden. For example, if you
specified a url
  // like "myAction.do?success=nextAction.do", you could override
  // the default behavior for succes as defined in the struts action
mapping.
  String forward = request.getParameter(forwardName);

  if (forward == null) {
 return mapping.findForward(forwardName);
  } else {
 return new ActionForward(forward);
  }

   }
...

I hope this is useful.

Thanks, Nathan.

Nathan A. Niesen
Application Developer
ObjectFX Corporation
10 Second St NE, Suite 400
Minneapolis, MN  55413
612-312-2002 x2633
mailto:[EMAIL PROTECTED]
www.objectfx.com



-Original Message-
From: Hohlen, John C [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 8:04 PM
To: Struts Users Mailing List; Struts-User (E-mail); Hohlen, John C; Niesen,
Nathan
Subject: RE: Configuring Tiles + Validation + Modules

Nathan,

For now, I think we're going to just use the multiple config file
options (new in B3).  I was able to bust up our ONE struts-config.xml file
and get this working in just 1/2 day (it would have been less if I wouldn't
have introduced some XML syntax errors in my new config files).   In
addition, we'll probably bust up our application resource file and merge
them back together during our ANT build process.  We have a team of about 12
developers, so these files have become a real bottleneck.  This approach
seems to achieve many of the same benefits as modules, without all the
additional technical headaches (although you need to guard against duplicate
action mappings, form bean definitions, keys/values across all the
collection of files).

JOHN

-Original Message-
From: Niesen, Nathan [mailto:[EMAIL PROTECTED]
Sent: Wed 3/26/2003 4:43 PM [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
To: Struts-User (E-mail)
Cc:
Subject: RE: Configuring Tiles + Validation + Modules




I basically have the same questions. I've been searching the user docs and
mailing lists trying to get a handle on what modules were intended to do,
what modules can and can't do, and how I can use modules to improve my
application framework. It appears to me that the modules feature opened up a

whole can-o-design-worms and they're still wiggling. I can't find anything
that clearly defines intended usage of modules or the limitations of
modules; especially in regards to using "resources" outside of a modules
sub-directory.

In addition to John's questions, I have the following question:

1) How can I use tiles/templates to assemble a page in one module from
reusable "components/pages" in one or more other modules? For example: I
have pages in modules B, C, and D, that all want to pull in a menu page from

my default module as well as a reusable page from module A.

Other issues with modules:

1) Not all tags (html:img in particular) use the pagePattern or
forwardPattern attributes from the controller. If I want to use an image in
my header.jsp, the image file has to be physically located in each module or

I get a broken link.

2) The pagePattern and forwardPattern are defined on the controller which
means all tag or forward URLs for the module will be mapped to the same
context relative URL. I think it would be more flexible if you simply
specified the pattern as part of the URL attribute for the tag or forward.
For example:  and 

3) The examples don't effectively demonstrate the effects that the
contextRelative, inputForward, pagePattern, and forwardPattern attributes
have on the page, forward, action, and href attributes.

4) The examples only show how to switch from one self-contained module to
another. They don't demonstrate how to combine resources/pages from multiple

modules into a single page via either includes or tiles/templates.

Thanks, Nathan.

 -Original Message-
From:   Hohlen, John C [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
Sent:   Wednesday, March 26, 2003 8:20 AM
To: Struts-User (E-mail)
Subject:Configuring Tiles + Validation + Modules

I'm looking for some

Re: Configuring Tiles + Validation + Modules

2003-03-27 Thread Cedric Dumoulin


Hohlen, John C wrote:

I'm looking for some help on how to configure the Tiles and Validation
Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta
Struts, etc.) and replies to the mailing list address these topics
independently, but not collectively.  In addition, I took a look at James
Holmes "Switching Modules" example, but that focuses on the different ways
to switch b/t modules, not on how to configure Modules with Tiles and the
Validation frameworks. 

For discussion purposes, let's assume I have following 3 modules (default,
modA, modB).  Here are my questions:
1) If I have a form bean definition used by all 3 modules, does it need to
be defined in each of the 3 struts-config files, or can I just declare it in
the default struts-config?
 All modules are independent, so you need to declare form bean 
definition in each module. You can have a struts-config file containing 
the common declaration, and use it in each module (with the multi config 
file capability).

2) Does each modules' struts-config file need the following declaration to
use the Validation framework, or can I simply declare this once in the
config file for the default module?
 
   
 

 You need it for each module.

3) For Tile Definition config files, can all of these just be declared in
the default struts-config, or should they be declared in the module
struts-config they correspond to (assuming you've divided your Tile
definitions by module)?  For example:
 
   
   value="/WEB-INF/tiles-defs-default.xml,
  /WEB-INF/tiles-defs-modA.xml,  
  /WEB-INF/tiles-defs-modB.xml"/>
 

 You need it for each module. Some module can use different factory, or 
no definition factory at all.

 Cedric

4) Can I use the default module's application resource file for text common
across modules?  Therefore, preventing me from having to duplicate entries
across modules.  If so, this means Struts always looks in the particular
module's application resource first, then the default module.  But this
doesn't apply for form bean definitions or action mappings, correct?
5) Is the following an acceptable way to configure the application resource
files:
--- struts-config.xml (default) ---


--- struts-config-modA.xml (default) ---


--- struts-config-modB.xml (default) ---


Thanks in advance for your help,

JOHN

-
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: Configuring Tiles + Validation + Modules

2003-03-27 Thread Cedric Dumoulin


Niesen, Nathan wrote:

I basically have the same questions. I've been searching the user docs and
mailing lists trying to get a handle on what modules were intended to do,
what modules can and can't do, and how I can use modules to improve my
application framework. It appears to me that the modules feature opened up a
whole can-o-design-worms and they're still wiggling. I can't find anything
that clearly defines intended usage of modules or the limitations of
modules; especially in regards to using "resources" outside of a modules
sub-directory.
In addition to John's questions, I have the following question:

1) How can I use tiles/templates to assemble a page in one module from
reusable "components/pages" in one or more other modules? For example: I
have pages in modules B, C, and D, that all want to pull in a menu page from
my default module as well as a reusable page from module A.
 

 Tiles config file consider the url as absolute to the application. So, 
simply specify the absolute URL of your layout, page or tile.
 The tiles-documentation.war use 3 modules. You can check it for examples.

 Cedric

Other issues with modules:

1) Not all tags (html:img in particular) use the pagePattern or
forwardPattern attributes from the controller. If I want to use an image in
my header.jsp, the image file has to be physically located in each module or
I get a broken link.
2) The pagePattern and forwardPattern are defined on the controller which
means all tag or forward URLs for the module will be mapped to the same
context relative URL. I think it would be more flexible if you simply
specified the pattern as part of the URL attribute for the tag or forward.
For example:  and 
3) The examples don't effectively demonstrate the effects that the
contextRelative, inputForward, pagePattern, and forwardPattern attributes
have on the page, forward, action, and href attributes.
4) The examples only show how to switch from one self-contained module to
another. They don't demonstrate how to combine resources/pages from multiple
modules into a single page via either includes or tiles/templates.
Thanks, Nathan.

-Original Message-
From: 	Hohlen, John C [mailto:[EMAIL PROTECTED] 
Sent:	Wednesday, March 26, 2003 8:20 AM
To:	Struts-User (E-mail)
Subject:	Configuring Tiles + Validation + Modules

I'm looking for some help on how to configure the Tiles and Validation
Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta
Struts, etc.) and replies to the mailing list address these topics
independently, but not collectively.  In addition, I took a look at James
Holmes "Switching Modules" example, but that focuses on the different ways
to switch b/t modules, not on how to configure Modules with Tiles and the
Validation frameworks. 

For discussion purposes, let's assume I have following 3 modules (default,
modA, modB).  Here are my questions:
1) If I have a form bean definition used by all 3 modules, does it need to
be defined in each of the 3 struts-config files, or can I just declare it in
the default struts-config?
2) Does each modules' struts-config file need the following declaration to
use the Validation framework, or can I simply declare this once in the
config file for the default module?
 
   
 

3) For Tile Definition config files, can all of these just be declared in
the default struts-config, or should they be declared in the module
struts-config they correspond to (assuming you've divided your Tile
definitions by module)?  For example:
 
   
   value="/WEB-INF/tiles-defs-default.xml,
  /WEB-INF/tiles-defs-modA.xml,  
  /WEB-INF/tiles-defs-modB.xml"/>
 

4) Can I use the default module's application resource file for text common
across modules?  Therefore, preventing me from having to duplicate entries
across modules.  If so, this means Struts always looks in the particular
module's application resource first, then the default module.  But this
doesn't apply for form bean definitions or action mappings, correct?
5) Is the following an acceptable way to configure the application resource
files:
--- struts-config.xml (default) ---


--- struts-config-modA.xml (default) ---


--- struts-config-modB.xml (default) ---


Thanks in advance for your help,

JOHN

-
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: Configuring Tiles + Validation + Modules

2003-03-27 Thread Hohlen, John C
Title: RE: Configuring Tiles + Validation + Modules



Nathan, 
 
    For now, I think we're going to just use the multiple 
config file options (new in B3).  I was able to bust up our ONE 
struts-config.xml file and get this working in just 1/2 day (it would have been 
less if I wouldn't have introduced some XML syntax errors in my new 
config files).   In addition, we'll probably bust up our 
application resource file and merge them back together during our ANT build 
process.  We have a team of about 12 developers, so these files have become 
a real bottleneck.  This approach seems to achieve many of the same 
benefits as modules, without all the additional technical headaches 
(although you need to guard against duplicate action mappings, form bean 
definitions, keys/values across all the collection of files). 
JOHN 

  -Original Message- From: Niesen, Nathan 
  [mailto:[EMAIL PROTECTED] Sent: Wed 3/26/2003 4:43 PM [EMAIL PROTECTED]To: Struts-User 
  (E-mail) Cc: Subject: RE: Configuring Tiles + Validation 
  + Modules
  I basically have the same questions. I've been searching the 
  user docs and mailing lists trying to get a handle on 
  what modules were intended to do, what modules can and 
  can't do, and how I can use modules to improve my application framework. It appears to me that the modules feature opened 
  up a whole can-o-design-worms and they're still 
  wiggling. I can't find anything that clearly defines 
  intended usage of modules or the limitations of modules; especially in regards to using "resources" outside of a 
  modules sub-directory. 
  In addition to John's questions, I have the following 
  question: 
  1) How can I use tiles/templates to assemble a page in one 
  module from reusable "components/pages" in one or more 
  other modules? For example: I have pages in modules B, 
  C, and D, that all want to pull in a menu page from my 
  default module as well as a reusable page from module A. 
  Other issues with modules: 
  1) Not all tags (html:img in particular) use the pagePattern 
  or forwardPattern attributes from the controller. If I 
  want to use an image in my header.jsp, the image file 
  has to be physically located in each module or I get a 
  broken link. 
  2) The pagePattern and forwardPattern are defined on the 
  controller which means all tag or forward URLs for the 
  module will be mapped to the same context relative 
  URL. I think it would be more flexible if you simply specified the pattern as part of the URL attribute for the tag or 
  forward. For example:  page="$P/header.gif"/> and 
   
  3) The examples don't effectively demonstrate the effects that 
  the contextRelative, inputForward, pagePattern, and 
  forwardPattern attributes have on the page, forward, 
  action, and href attributes. 
  4) The examples only show how to switch from one 
  self-contained module to another. They don't 
  demonstrate how to combine resources/pages from multiple modules into a single page via either includes or 
  tiles/templates. 
  Thanks, Nathan. 
   -Original Message- From: 
    Hohlen, John C [mailto:[EMAIL PROTECTED]] 
  Sent:   Wednesday, March 26, 2003 8:20 
  AM To: Struts-User 
  (E-mail) Subject:    Configuring Tiles + 
  Validation + Modules 
  I'm looking for some help on how to configure the Tiles and 
  Validation Plug-Ins.  A lot of the good books 
  (Struts In Action, Programming Jakarta Struts, etc.) 
  and replies to the mailing list address these topics independently, but not collectively.  In addition, I took a look 
  at James Holmes "Switching Modules" example, but that 
  focuses on the different ways to switch b/t modules, 
  not on how to configure Modules with Tiles and the Validation frameworks. 
  For discussion purposes, let's assume I have following 3 
  modules (default, modA, modB).  Here are my 
  questions: 
  1) If I have a form bean definition used by all 3 modules, 
  does it need to be defined in each of the 3 
  struts-config files, or can I just declare it in the 
  default struts-config? 
  2) Does each modules' struts-config file need the following 
  declaration to use the Validation framework, or can I 
  simply declare this once in the config file for the 
  default module? 
           
  value="/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml"/>   
   
  3) For Tile Definition config files, can all of these just be 
  declared in the default struts-config, or should they 
  be declared in the module struts-config they 
  correspond to (assuming you've divided your Tile definitions by module)?  For example: 
              
  value="/WEB-INF/tiles-defs-default.xml,    
  /WEB-INF/tiles-defs-modA.xml,     
  /WEB-INF/tiles-defs-modB.xml"/>   
   
  4) Can I use the default module

RE: Configuring Tiles + Validation + Modules

2003-03-26 Thread Hohlen, John C
Nathan, 
  
For now, I think we're going to just use the multiple config file
options (new in B3).  I was able to bust up our ONE struts-config.xml file
and get this working in just 1/2 day (it would have been less if I wouldn't
have introduced some XML syntax errors in my new config files).   In
addition, we'll probably bust up our application resource file and merge
them back together during our ANT build process.  We have a team of about 12
developers, so these files have become a real bottleneck.  This approach
seems to achieve many of the same benefits as modules, without all the
additional technical headaches (although you need to guard against duplicate
action mappings, form bean definitions, keys/values across all the
collection of files). 

JOHN 

-Original Message- 
From: Niesen, Nathan [mailto:[EMAIL PROTECTED] 
Sent: Wed 3/26/2003 4:43 PM [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
To: Struts-User (E-mail) 
Cc: 
Subject: RE: Configuring Tiles + Validation + Modules




I basically have the same questions. I've been searching the user docs and 
mailing lists trying to get a handle on what modules were intended to do, 
what modules can and can't do, and how I can use modules to improve my 
application framework. It appears to me that the modules feature opened up a

whole can-o-design-worms and they're still wiggling. I can't find anything 
that clearly defines intended usage of modules or the limitations of 
modules; especially in regards to using "resources" outside of a modules 
sub-directory. 

In addition to John's questions, I have the following question: 

1) How can I use tiles/templates to assemble a page in one module from 
reusable "components/pages" in one or more other modules? For example: I 
have pages in modules B, C, and D, that all want to pull in a menu page from

my default module as well as a reusable page from module A. 

Other issues with modules: 

1) Not all tags (html:img in particular) use the pagePattern or 
forwardPattern attributes from the controller. If I want to use an image in 
my header.jsp, the image file has to be physically located in each module or

I get a broken link. 

2) The pagePattern and forwardPattern are defined on the controller which 
means all tag or forward URLs for the module will be mapped to the same 
context relative URL. I think it would be more flexible if you simply 
specified the pattern as part of the URL attribute for the tag or forward. 
For example:  and  

3) The examples don't effectively demonstrate the effects that the 
contextRelative, inputForward, pagePattern, and forwardPattern attributes 
have on the page, forward, action, and href attributes. 

4) The examples only show how to switch from one self-contained module to 
another. They don't demonstrate how to combine resources/pages from multiple

modules into a single page via either includes or tiles/templates. 

Thanks, Nathan. 

 -Original Message- 
From:   Hohlen, John C [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] 
Sent:   Wednesday, March 26, 2003 8:20 AM 
To: Struts-User (E-mail) 
Subject:Configuring Tiles + Validation + Modules 

I'm looking for some help on how to configure the Tiles and Validation 
Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta 
Struts, etc.) and replies to the mailing list address these topics 
independently, but not collectively.  In addition, I took a look at James 
Holmes "Switching Modules" example, but that focuses on the different ways 
to switch b/t modules, not on how to configure Modules with Tiles and the 
Validation frameworks. 

For discussion purposes, let's assume I have following 3 modules (default, 
modA, modB).  Here are my questions: 

1) If I have a form bean definition used by all 3 modules, does it need to 
be defined in each of the 3 struts-config files, or can I just declare it in

the default struts-config? 

2) Does each modules' struts-config file need the following declaration to 
use the Validation framework, or can I simply declare this once in the 
config file for the default module? 

   
 
   

3) For Tile Definition config files, can all of these just be declared in 
the default struts-config, or should they be declared in the module 
struts-config they correspond to (assuming you've divided your Tile 
definitions by module)?  For example: 

   
 
   

4) Can I use the default module's application resource file for text common 
across modules?  Therefore, preventing me from having to duplicate entries 
across modules.  If so, this means Struts always looks in the particular 
module's application resource first, then the default module.  But this 
doesn't apply for form bean definitions or action mappings, correct? 

5) Is the following an acceptable way to configure the application resource 
files: 

 --- s

RE: Configuring Tiles + Validation + Modules

2003-03-26 Thread Niesen, Nathan

I basically have the same questions. I've been searching the user docs and
mailing lists trying to get a handle on what modules were intended to do,
what modules can and can't do, and how I can use modules to improve my
application framework. It appears to me that the modules feature opened up a
whole can-o-design-worms and they're still wiggling. I can't find anything
that clearly defines intended usage of modules or the limitations of
modules; especially in regards to using "resources" outside of a modules
sub-directory.

In addition to John's questions, I have the following question:

1) How can I use tiles/templates to assemble a page in one module from
reusable "components/pages" in one or more other modules? For example: I
have pages in modules B, C, and D, that all want to pull in a menu page from
my default module as well as a reusable page from module A.

Other issues with modules:

1) Not all tags (html:img in particular) use the pagePattern or
forwardPattern attributes from the controller. If I want to use an image in
my header.jsp, the image file has to be physically located in each module or
I get a broken link.

2) The pagePattern and forwardPattern are defined on the controller which
means all tag or forward URLs for the module will be mapped to the same
context relative URL. I think it would be more flexible if you simply
specified the pattern as part of the URL attribute for the tag or forward.
For example:  and 

3) The examples don't effectively demonstrate the effects that the
contextRelative, inputForward, pagePattern, and forwardPattern attributes
have on the page, forward, action, and href attributes.

4) The examples only show how to switch from one self-contained module to
another. They don't demonstrate how to combine resources/pages from multiple
modules into a single page via either includes or tiles/templates.

Thanks, Nathan.

 -Original Message-
From:   Hohlen, John C [mailto:[EMAIL PROTECTED] 
Sent:   Wednesday, March 26, 2003 8:20 AM
To: Struts-User (E-mail)
Subject:Configuring Tiles + Validation + Modules

I'm looking for some help on how to configure the Tiles and Validation
Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta
Struts, etc.) and replies to the mailing list address these topics
independently, but not collectively.  In addition, I took a look at James
Holmes "Switching Modules" example, but that focuses on the different ways
to switch b/t modules, not on how to configure Modules with Tiles and the
Validation frameworks. 

For discussion purposes, let's assume I have following 3 modules (default,
modA, modB).  Here are my questions:

1) If I have a form bean definition used by all 3 modules, does it need to
be defined in each of the 3 struts-config files, or can I just declare it in
the default struts-config?

2) Does each modules' struts-config file need the following declaration to
use the Validation framework, or can I simply declare this once in the
config file for the default module?

  

  

3) For Tile Definition config files, can all of these just be declared in
the default struts-config, or should they be declared in the module
struts-config they correspond to (assuming you've divided your Tile
definitions by module)?  For example:

  

  

4) Can I use the default module's application resource file for text common
across modules?  Therefore, preventing me from having to duplicate entries
across modules.  If so, this means Struts always looks in the particular
module's application resource first, then the default module.  But this
doesn't apply for form bean definitions or action mappings, correct?

5) Is the following an acceptable way to configure the application resource
files:

 --- struts-config.xml (default) ---
 

 --- struts-config-modA.xml (default) ---
 

 --- struts-config-modB.xml (default) ---
 

Thanks in advance for your help,

JOHN


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



Configuring Tiles + Validation + Modules

2003-03-26 Thread Hohlen, John C
I'm looking for some help on how to configure the Tiles and Validation
Plug-Ins.  A lot of the good books (Struts In Action, Programming Jakarta
Struts, etc.) and replies to the mailing list address these topics
independently, but not collectively.  In addition, I took a look at James
Holmes "Switching Modules" example, but that focuses on the different ways
to switch b/t modules, not on how to configure Modules with Tiles and the
Validation frameworks. 

For discussion purposes, let's assume I have following 3 modules (default,
modA, modB).  Here are my questions:

1) If I have a form bean definition used by all 3 modules, does it need to
be defined in each of the 3 struts-config files, or can I just declare it in
the default struts-config?

2) Does each modules' struts-config file need the following declaration to
use the Validation framework, or can I simply declare this once in the
config file for the default module?

  

  

3) For Tile Definition config files, can all of these just be declared in
the default struts-config, or should they be declared in the module
struts-config they correspond to (assuming you've divided your Tile
definitions by module)?  For example:

  

  

4) Can I use the default module's application resource file for text common
across modules?  Therefore, preventing me from having to duplicate entries
across modules.  If so, this means Struts always looks in the particular
module's application resource first, then the default module.  But this
doesn't apply for form bean definitions or action mappings, correct?

5) Is the following an acceptable way to configure the application resource
files:

 --- struts-config.xml (default) ---
 

 --- struts-config-modA.xml (default) ---
 

 --- struts-config-modB.xml (default) ---
 

Thanks in advance for your help,

JOHN


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