On Fri, 6 Sep 2002, julio wrote:
> Date: Fri, 6 Sep 2002 15:01:55 -0300
> From: julio <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> Subject: RES: multiple sub projects
>
> Hi,
>
> The layout of my application is very similar, and it works fine but...I
> really would like that struts could switch "automatically" to the
> data-source associated with the current sub-application.
>
> Craig, is this being implemented?
>
Use one of the Action.getDataSource() methods to get data sources for the
current subapp. Requires 1.1b2 or later.
Craig
>
> ________________________________
> Julio Cesar
> SOFTSITE Tecnologia
> Fortaleza, CE, Brasil
> http://www.softsite.com.br
> ________________________________
>
> -----Mensagem original-----
> De: Thinh Doan [mailto:[EMAIL PROTECTED]]
> Enviada em: sexta-feira, 6 de setembro de 2002 13:37
> Para: Struts Users Mailing List
> Assunto: RE: multiple sub projects
>
> I'm about to try the sub-app fetures now with 1.1b2. Based on what I
> gathered, I could put all the sub-app jsps, images, templates,
> javascript,
> styles under the sub-app folder like this:
>
> /myapp
> /default_templates
> /default_images
> /default_styles
> ...
> /mod1
> /jsp
> /styles
> /images
> /templates
> ...
>
> In what way the mod1 jsps can share the root app (myapp)
> default_templates,
> default_images, default_styles etc...?
>
> TIA. Appreciate your help.
>
> Thinh
>
> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 16, 2002 6:01 PM
> To: Struts Users Mailing List
> Subject: Re: multiple sub projects
>
>
>
>
> On Sat, 17 Aug 2002, Michael Delamere wrote:
>
> > Date: Sat, 17 Aug 2002 01:04:38 +0200
> > From: Michael Delamere <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re: multiple sub projects
> >
> > > Please report back ...
> >
> > Craig, I did it exactly as you described below and it works perfectly.
> >
>
> Cool ... the really small number of bug reports on application modules
> either means we did a really good job, or nobody is trying it ... glad
> to
> hear that it works for you.
>
> > Thanks again,
> >
> > Michael
> >
>
> Craig
>
> >
> > ----- Original Message -----
> > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Friday, August 16, 2002 10:40 PM
> > Subject: Re: multiple sub projects
> >
> >
> > >
> > >
> > > On Fri, 16 Aug 2002, Michael Delamere wrote:
> > >
> > > > Date: Fri, 16 Aug 2002 22:42:48 +0200
> > > > From: Michael Delamere <[EMAIL PROTECTED]>
> > > > Reply-To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> > > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > > Subject: Re: multiple sub projects
> > > >
> > > > Craig,
> > > >
> > > > you�re such a great guy!! Thank you so much!!
> > > >
> > > > I�ll have a go immediately :-).
> > > >
> > >
> > > Please report back ... a primary purpose for the beta 2 release was
> to
> > > flush out any remaining bugs, but success stories are useful as well
> (so
> I
> > > don't have to sit here wondering if anybody is actually trying all
> the
> > > cool new stuff :-).
> > >
> > > > Regards,
> > > >
> > > > Michael
> > >
> > > Craig
> > >
> > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Friday, August 16, 2002 10:28 PM
> > > > Subject: Re: multiple sub projects
> > > >
> > > >
> > > > >
> > > > >
> > > > > On Fri, 16 Aug 2002, Michael Delamere wrote:
> > > > >
> > > > > > Date: Fri, 16 Aug 2002 21:38:49 +0200
> > > > > > From: Michael Delamere <[EMAIL PROTECTED]>
> > > > > > Reply-To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> > > > > > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > > > > Subject: multiple sub projects
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I�ve just read some chapters from the oreilly struts book in
> order
> > to
> > > > find
> > > > > > out more about creating multiple sub-projects. Very nice
> book!
> > > > > >
> > > > > > Ok, I know how to define another struts-config xml. But in
> the
> case
> > of
> > > > the
> > > > > > order example how do I tell struts to use the
> > struts-order-config.xml?
> > > > > >
> > > > > > order.do -> use struts-order-config.xml
> > > > > >
> > > > > > Could someone provide me with an example please or send me a
> link
> > where
> > > > I
> > > > > > can find out more.
> > > > > >
> > > > >
> > > > > The key is in the module prefixes.
> > > > >
> > > > > Let's say your webapp is installed under context path "/myapp"
> and
> you
> > > > > have the following configuration settingss in your web.xml file:
> > > > >
> > > > > <servlet>
> > > > > <servlet-name>controller</servlet-name>
> > > > >
> > > >
> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
> > > > > ...
> > > > > <init-param>
> > > > > <param-name>config/foo</param-name>
> > > > >
> <param-value>/WEB-INF/struts-config-foo.xml</param-value>
> > > > > </init-param>
> > > > > <init-param>
> > > > > <param-name>config/bar</param-name>
> > > > >
> <param-value>/WEB-INF/struts-config-bar.xml</param-value>
> > > > > </init-param>
> > > > > </servlet>
> > > > >
> > > > > <servlet-mapping>
> > > > > <servlet-name>controller</servlet-name>
> > > > > <url-pattern>*.do</url-pattern>
> > > > > </servlet-mapping>
> > > > >
> > > > > Now, a path like "/myapp/foo/order.do" will go to the "/foo"
> module,
> > while
> > > > > paths like "/myapp/bar/order.do" will go to the "/bar" module.
> You
> do
> > the
> > > > > same things with your JSP pages -- put them in "/foo" and "/bar"
> > > > > subdirectories under the context root.
> > > > >
> > > > > Note that *inside* the struts-config.xml file for a module, you
> do
> not
> > > > > include the module prefix in any of the paths. In other words,
> in
> > each
> > > > > module you'd still have an <action path="/order" ...> element.
> Struts
> > > > > will tack the module prefix onto the front where necessary, just
> like
> > it
> > > > > adds the context path for your webapp automatically.
> > > > >
> > > > > > Any help would be appreciated,
> > > > > >
> > > > > > thanks,
> > > > > >
> > > > > > Michael
> > > > > >
> > > > >
> > > > > Craig
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > > For additional commands, e-mail:
> > > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>