PlanetJava
Custom Search

java-stripes-user
[Top] [All Lists]

Re: clean urls without /action/*

Subject: Re: clean urls without /action/*
Date: Wed, 06 Feb 2008 19:30:14 -0600
Of course they do, all neatly mapped in XML files that you have to 
maintain.  Although I would tend to agree with your first post about 
RESTful URLs.
Gregg
Allen Halsey wrote:
> The Struts2 FilterDispatcher [1] is able to dispatch without an action
> mapping in the URL.
>
> [1]
> http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html
>
> The Struts2 rest-plugin [2] sample-app [3] provides clean restful urls like:
>
>   http://example.com/orders/3/edit
>
> [2] http://struts.apache.org/2.x/docs/rest-plugin.html
> [3] http://svn.apache.org/repos/asf/struts/struts2/trunk/apps/rest-showcase/
>
> Allen
>
>
> Gregg Bolinger-7 wrote:
>   
>> Are you aware of a java framework that doesn't require something *like* 
>> an action mapping in the URL?  If so, maybe the devs can look into it 
>> and see how it is doen and improve stripes in that manner.
>>
>> Gregg
>>
>> Cameron Falkenhagen wrote:
>>     
>>> If *every* url must be prefixed with "/action/" or "/page/" or 
>>> whatever, it becomes extra text that provides no meaningful 
>>> information. Does there need to be a distinction between 'clean' urls 
>>> and 'meaningful' urls...?
>>>
>>>  
>>>
>>> I'm currently looking into a work-around with the urlrewrite filter to 
>>> see if there is some useful magic in there. (Filter out everything, 
>>> for example, that contains a '.')
>>>
>>>  
>>>
>>> Cameron
>>>
>>>  
>>>
>>> ------------------------------------------------------------------------
>>>
>>> *From:* 
>>> [email protected]xxxxxxx 
>>> [mailto:[email protected]xxxxxxx]
>>>  *On Behalf Of 
>>> *Gregg Bolinger
>>> *Sent:* Tuesday, February 05, 2008 9:05 PM
>>> *To:* Stripes Users List
>>> *Subject:* Re: [Stripes-users] clean urls without /action/*
>>>
>>>  
>>>
>>> You can't do what you want.  You either need a prefix of something 
>>> like /action/home (doesn't have to be the word action) or you have to 
>>> have a suffix like /home.action (again, doesn't have to be the word 
>>> action).
>>>
>>> Gregg
>>>
>>> On Feb 5, 2008 7:01 PM, cameronf 
>>> <cameron-07GvHFN/e45EfCMKe0UOsQC/[email protected] 
>>> <mailto:cameron-07GvHFN/e45EfCMKe0UOsQC/[email protected]>> wrote:
>>>
>>> OK. First post.
>>>
>>> New to many things, including Stripes. As a newbie, Stripes seems to 
>>> make a lot
>>> of things fairly straightforward, and my hiccups have had more to do 
>>> with my own
>>> learning curve. So the following problem may have a simple solution:
>>>
>>> Would like to implement the clean url's in Stripes 1.5
>>>
>>> Would like urls like:
>>>
>>> /home/...
>>> /login/...
>>> etc...
>>>
>>> corresponding to @UrlBinding("/home/...") in my action bean.
>>>
>>> but can only find examples for
>>>
>>> /action/home/...
>>> /action/login/...
>>>
>>> the /action/ seems important as it corresponds to the /action/* 
>>> url-pattern in
>>> the servlet-mapping in my web.xml
>>>
>>> but I would like to not see "/action/". If I change the url-pattern to 
>>> /*, I get
>>> an infinite loop as Stripes is continually redirecting to 'home.jsp'.
>>>
>>> What configuration do I need to get the urls I want?
>>>
>>> Thanks so much for your thoughts!
>>>
>>> Cameron
>>>
>>>
>>>       
>
>   
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy