That sort of thing is probably best handled outside Struts in my opinion.
A servlet filter which catches requests with that pattern /myapp/8 and
then does a clean forward to blah?partner=8 - I do a similar thing in my
app, but you then need to think about relative URLs for everything which
then sits under that.

Personally unless you have a specific need for clean URLs such as for
search engine optimisation then its not really worth the effort.

Chris

> I need to implement a webapp that uses the URL to determine the
> "partner" that is accessing the application.  I'd like your opinion on
> the way to do this that might work best with Struts.
>
> Right now, we use a querystring parameter to set a session value that
> is references throughout the application to determine the partner.
>
> I can do that same thing with struts (ie.,
> www.example.com/myapp?partnerId=8)
>
> I am wondering if it might be better to create a URL like
> www.example.com/myapp/8
>
> Ultimately, it would be nice to map a url to a domain (ie.,
> www.example.com/myapp/8 -> partner8.example.com
>
> Ultimately, this would avoid problems with keeping the value in the
> session, as it could always be retrieved from the URL
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


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

Reply via email to