You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Canos <da...@gmail.com> on 2009/07/30 13:09:11 UTC

One Struts2-project to rule them all

Hi folksI'm facing a nice problem and I would be glad to hear from you. I
think it should be useful to all.

Problem is easy:
Gandalf and I need to build 15 websites one per domain, I really dont want
to maintain 15 different and pretty small projects.
I will be happy to use subdomains, but I couldnt.

Alternatives:
- A Struts2 project attending 15 websites.
is it possible? Writing my own FilterDispatcher??

- Multiple Struts2 project on per domain bundled in a EAR.
I think I will overhead the job.
I dont want to duplicate struts configurations, javascript and
css resources.

Re: One Struts2-project to rule them all

Posted by David Canos <da...@gmail.com>.
thankx for your answers

> I did a similar project as few months back where we supported 15 different
> URL with one Enterprise Implementation. The FilterDispatacher approach I
> guess is the right way to modularize the code.


What you mean with Enterprise Implementation? just an ear with a simple war?

I really dont like to changing the Filter.
I was looking at URLRewrite [1] this morning, it works just before the
filter.
Implementing my own filter should be great but if I resolve the issue one
step before I think it would be better.

[1] http://code.google.com/p/urlrewritefilter/

<http://code.google.com/p/urlrewritefilter/>
2009/7/30 kishore chakraborty <ki...@yahoo.com>

> Hi David,
>
> I did a similar project as few months back where we supported 15 different
> URL with one Enterprise Implementation. The FilterDispatacher approach I
> guess is the right way to modularize the code.
>
> Your own FilterDispatacher (extending the Struts FilterDispatcher this
> class), which parses the URLs and redirected/forwarded the calls to the main
> application action classes. In this class you can also enforce other rules.
> Example :
>        -- Mandating usage of "https" if the user types "http"
>        -- Can handle application level controls Language and other stuff.
>
> Hope it helps.
> regards
> Kishore.
>
>
>
>
> ________________________________
> From: David Canos <da...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thursday, July 30, 2009 4:39:11 PM
> Subject: One Struts2-project to rule them all
>
> Hi folksI'm facing a nice problem and I would be glad to hear from you. I
> think it should be useful to all.
>
> Problem is easy:
> Gandalf and I need to build 15 websites one per domain, I really dont want
> to maintain 15 different and pretty small projects.
> I will be happy to use subdomains, but I couldnt.
>
> Alternatives:
> - A Struts2 project attending 15 websites.
> is it possible? Writing my own FilterDispatcher??
>
> - Multiple Struts2 project on per domain bundled in a EAR.
> I think I will overhead the job.
> I dont want to duplicate struts configurations, javascript and
> css resources.
>
>
>
>
>

Re: One Struts2-project to rule them all

Posted by kishore chakraborty <ki...@yahoo.com>.
Hi David,

I did a similar project as few months back where we supported 15 different URL with one Enterprise Implementation. The FilterDispatacher approach I guess is the right way to modularize the code.

Your own FilterDispatacher (extending the Struts FilterDispatcher this class), which parses the URLs and redirected/forwarded the calls to the main application action classes. In this class you can also enforce other rules. Example :
        -- Mandating usage of "https" if the user types "http"
        -- Can handle application level controls Language and other stuff.

Hope it helps.
regards
Kishore.




________________________________
From: David Canos <da...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Thursday, July 30, 2009 4:39:11 PM
Subject: One Struts2-project to rule them all

Hi folksI'm facing a nice problem and I would be glad to hear from you. I
think it should be useful to all.

Problem is easy:
Gandalf and I need to build 15 websites one per domain, I really dont want
to maintain 15 different and pretty small projects.
I will be happy to use subdomains, but I couldnt.

Alternatives:
- A Struts2 project attending 15 websites.
is it possible? Writing my own FilterDispatcher??

- Multiple Struts2 project on per domain bundled in a EAR.
I think I will overhead the job.
I dont want to duplicate struts configurations, javascript and
css resources.



      

Re: One Struts2-project to rule them all

Posted by Paweł Wielgus <po...@gmail.com>.
Hi David,
i don't understand well what You would like to achieve but will
aliases work for You?
Just like regular alias www.myapp.com inside tomcat for myapp.com,
you can add myapp2.com and so on for every domain You need.

Best greetings,
Paweł Wielgus.

2009/7/30 David Canos <da...@gmail.com>:
> Hi folksI'm facing a nice problem and I would be glad to hear from you. I
> think it should be useful to all.
>
> Problem is easy:
> Gandalf and I need to build 15 websites one per domain, I really dont want
> to maintain 15 different and pretty small projects.
> I will be happy to use subdomains, but I couldnt.
>
> Alternatives:
> - A Struts2 project attending 15 websites.
> is it possible? Writing my own FilterDispatcher??
>
> - Multiple Struts2 project on per domain bundled in a EAR.
> I think I will overhead the job.
> I dont want to duplicate struts configurations, javascript and
> css resources.
>

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


Re: One Struts2-project to rule them all

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
We¹ve implemented a similar solution where we have a custom interceptor
which sets a domainId value based on the url used to access the site.

It¹s then a simple matter of applying the appropriate processing for each of
the domains based on the domainId value.

I can tell you from our perspective its great as our app manages about 120
domains on a single app and the client loves it because they a a single
interface for all domains.

Z.
> 
> Hi folksI'm facing a nice problem and I would be glad to hear from you. I
> think it should be useful to all.
> 
> Problem is easy:
> Gandalf and I need to build 15 websites one per domain, I really dont want
> to maintain 15 different and pretty small projects.
> I will be happy to use subdomains, but I couldnt.
> 
> Alternatives:
> - A Struts2 project attending 15 websites.
> is it possible? Writing my own FilterDispatcher??
> 
> - Multiple Struts2 project on per domain bundled in a EAR.
> I think I will overhead the job.
> I dont want to duplicate struts configurations, javascript and
> css resources.