You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Vjeran Marcinko <vj...@tis.hr> on 2004/08/30 06:54:30 UTC

URL path mappings and Turbine

Hi.

It seems to me that Turbine's URLs are not exactly friendly for J2EE
declarative security, or also for any kind of URL path mappings, since these
mappings usually require URLs that have folder structure ?

For eg., I have admin and user pages/actions in my Turbine web app :
http://server:8080/myapp/app/template/admin,Index.vm
http://server:8080/myapp/app/action/admin.SomeAction
and
http://server:8080/myapp/app/template/user,Index.vm
http://server:8080/myapp/app/action/user.SomeAction
And not to mention how can URLs look like when you combine both actions and
pages in URL.

And I want to separate this 2 logical pieces (admin and user) of my web app
by some maping. Usually all URL mapping (for setting Apache virtual hosts
let's say) basically need URLs like:
http://server:8080/myapp/app/admin/...all admin stuff
http://server:8080/myapp/app/user/...all user stuff

Has anybody resolved this problem somehow ?

Cheers,
Vjeran


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


Re: URL path mappings and Turbine

Posted by Brian Lawler <br...@tribenetwork.com>.
It is also possible to use

http://tuckey.org/urlrewrite/

to rewrite URLs coming in to your webapp, just the same as you can 
rewrite apache rules.  We have not yet deployed this to production, but 
the next release of tribe.net will use this package to do some 
rudimentary rewriting.  We are working with it now and it seems 
reliable so far...

-Brian

On Aug 29, 2004, at 9:54 PM, Vjeran Marcinko wrote:

> Hi.
>
> It seems to me that Turbine's URLs are not exactly friendly for J2EE
> declarative security, or also for any kind of URL path mappings, since 
> these
> mappings usually require URLs that have folder structure ?
>
> For eg., I have admin and user pages/actions in my Turbine web app :
> http://server:8080/myapp/app/template/admin,Index.vm
> http://server:8080/myapp/app/action/admin.SomeAction
> and
> http://server:8080/myapp/app/template/user,Index.vm
> http://server:8080/myapp/app/action/user.SomeAction
> And not to mention how can URLs look like when you combine both 
> actions and
> pages in URL.
>
> And I want to separate this 2 logical pieces (admin and user) of my 
> web app
> by some maping. Usually all URL mapping (for setting Apache virtual 
> hosts
> let's say) basically need URLs like:
> http://server:8080/myapp/app/admin/...all admin stuff
> http://server:8080/myapp/app/user/...all user stuff
>
> Has anybody resolved this problem somehow ?
>
> Cheers,
> Vjeran
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


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


Re: URL path mappings and Turbine

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Vjeran Marcinko" <vj...@tis.hr> writes:

>Hi.

>It seems to me that Turbine's URLs are not exactly friendly for J2EE
>declarative security, or also for any kind of URL path mappings, since these
>mappings usually require URLs that have folder structure ?

>For eg., I have admin and user pages/actions in my Turbine web app :
>http://server:8080/myapp/app/template/admin,Index.vm
>http://server:8080/myapp/app/action/admin.SomeAction
>and
>http://server:8080/myapp/app/template/user,Index.vm
>http://server:8080/myapp/app/action/user.SomeAction
>And not to mention how can URLs look like when you combine both actions and
>pages in URL.

>And I want to separate this 2 logical pieces (admin and user) of my web app
>by some maping. Usually all URL mapping (for setting Apache virtual hosts
>let's say) basically need URLs like:
>http://server:8080/myapp/app/admin/...all admin stuff
>http://server:8080/myapp/app/user/...all user stuff

>Has anybody resolved this problem somehow ?

The answer is simple: you can't do that. You will need two different
Turbine instances.

To clear this issue, you should think of

http://server:8080/myapp/app/template/admin,Index.vm
http://server:8080/myapp/app/action/admin.SomeAction

really being 

http://server:8080/myapp/app?template=admin,Index.vm
http://server:8080/myapp/app?action=admin.SomeAction

with the PATH_INFO writing just being a convenience for bookmarking
pages inside a Turbine application. Then it is clear why this does not
work.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honorable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

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


RE: URL path mappings and Turbine

Posted by David Demner <tu...@demner.com>.
I don't think turbine works like you are hoping it will...  I'm not sure if
this is possible for you, but you can separate the admin stuff and the user
stuff into 2 separate webapps and change each web.xml accordingly.  It will
look like the same path structure for people, but will be 2 separate webapps
in the backend.  There will be some duplication, but it shouldn't be too
bad.

I can't think of another way, but that certainly doesn't mean there isn't
one.

Good luck,

David

-----Original Message-----
From: Vjeran Marcinko [mailto:vjeran@tis.hr] 
Sent: Sunday August 29, 2004 9:55 PM
To: turbine-user@jakarta.apache.org
Subject: URL path mappings and Turbine


Hi.

It seems to me that Turbine's URLs are not exactly friendly for J2EE
declarative security, or also for any kind of URL path mappings, since these
mappings usually require URLs that have folder structure ?

For eg., I have admin and user pages/actions in my Turbine web app :
http://server:8080/myapp/app/template/admin,Index.vm
http://server:8080/myapp/app/action/admin.SomeAction
and
http://server:8080/myapp/app/template/user,Index.vm
http://server:8080/myapp/app/action/user.SomeAction
And not to mention how can URLs look like when you combine both actions and
pages in URL.

And I want to separate this 2 logical pieces (admin and user) of my web app
by some maping. Usually all URL mapping (for setting Apache virtual hosts
let's say) basically need URLs like:
http://server:8080/myapp/app/admin/...all admin stuff
http://server:8080/myapp/app/user/...all user stuff

Has anybody resolved this problem somehow ?

Cheers,
Vjeran


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


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