RE: Struts modules question

2004-05-26 Thread Jose Ramon Diaz
Hi,

we have an application with four modules. We have defined four
struts-config:
struts-config-module1.xml
struts-config-module2.xml
struts-config-module3.xml
struts-config-module4.xml

This allows us to separate application logic in more little applications, as
the whole struts-config would be of 100Kb and it would be very difficult to
manage, I think.

We change of module without problems with several ways:
1) As all the JSPs are in the same directory application (under WEB-INF)
there is no difference calling a JSP (from config-file defined in Action !we
never call JSP directly!) that may contains references to each module.
2) In an Action defined in one module, we can call an action os another
module:
struts-config-module1.xml:
 
   
   
 

I hope this helps...

Regards

Jose R. Diaz


> -Mensaje original-
> De: Ashwin Desai [mailto:[EMAIL PROTECTED]
> Enviado el: jueves, 27 de mayo de 2004 0:13
> Para: [EMAIL PROTECTED]
> Asunto: Struts modules question
>
>
> Hi,
>
> I have two modules in my application
>
> Module A -> default (contains common functionality like logout etc)
> Module B -> specific funtionality developed by a separate team.
>
> Can actions in module B have access to the ones in Module A ?
> i.e. can I lookup a Struts Action defined in Module A from doing a
> lookup in an Action defined in Module B & vice versa ?
>
> Do modules in Struts follow any hierarchial structure ?
>
> Ashwin.
>
>
>
>
>
>
>
> __
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> -
> 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: Struts modules question

2004-05-26 Thread Joe Germuska
I wasn't involved in implementing modules, but from discussions and 
experience, my understanding is that modules are conceived as pretty 
isolated components, despite the fact that they are in one web 
application.

It is possible to switch between modules using the SwitchAction, for 
instance, and the JSP tags have some support for indicating paths in 
alternate modules (which has mostly happened since the 1.1 release).

In my development, my primary motivation was simply to 
compartmentalize the config files.  Once I learned that you can 
specify any number of struts-config.xml files in web.xml and, 
similarly, you can specify any number of tiles and validation files 
in the plugin configurations for those components, I haven't used 
modules.

I've become quite fond of a pattern like this:
/WEB-INF/sectionA/struts-config.xml
/WEB-INF/sectionA/tiles-definitions.xml
/WEB-INF/sectionA/validation.xml
/WEB-INF/sectionB/struts-config.xml
/WEB-INF/sectionB/tiles-definitions.xml
/WEB-INF/sectionB/validation.xml
/sectionA/Foo.jsp
/sectionA/Bar.jsp
/sectionB/Baz.jsp
/sectionB/Qux.jsp
/sectionB/Quux.jsp
This parallelism keeps any individual config file from getting too 
large while providing a pretty clear rule for where to go looking for 
the various components of a solution.  It can sometimes be unclear 
how to section things, but mostly it's very straightforward.

I think many developers begin using modules expecting more 
interoperability and perhaps hierarchical configuration.  Since 
Struts is open source, there's no reason people couldn't build that 
out -- but I've found that I don't actually need modules, so I don't 
use them.

Joe
At 3:12 PM -0700 5/26/04, Ashwin Desai wrote:
Hi,
I have two modules in my application
Module A -> default (contains common functionality like logout etc)
Module B -> specific funtionality developed by a separate team.
Can actions in module B have access to the ones in Module A ?
i.e. can I lookup a Struts Action defined in Module A from doing a
lookup in an Action defined in Module B & vice versa ?
Do modules in Struts follow any hierarchial structure ?
--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

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


Struts modules question

2004-05-26 Thread Ashwin Desai
Hi,

I have two modules in my application

Module A -> default (contains common functionality like logout etc)
Module B -> specific funtionality developed by a separate team. 

Can actions in module B have access to the ones in Module A ? 
i.e. can I lookup a Struts Action defined in Module A from doing a
lookup in an Action defined in Module B & vice versa ?

Do modules in Struts follow any hierarchial structure ? 

Ashwin.







__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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