You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Didier McGillis <co...@hotmail.com> on 2005/03/23 17:47:19 UTC

ugly urls

Hi everyone


I wanted to see if in JSP or Tomcat there was an easy way to transform ugly 
urls into pretty urls.  So taking category.jsp?catid=12&type=2 and changing 
it to category/catid/12/type/2?



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


Re: ugly urls

Posted by PA <pe...@gmail.com>.
On Mar 23, 2005, at 17:47, Didier McGillis wrote:

> I wanted to see if in JSP or Tomcat there was an easy way to transform 
> ugly urls into pretty urls.  So taking category.jsp?catid=12&type=2 
> and changing it to category/catid/12/type/2?

What about creating "pretty URLs" in the first place?

"Choose URIs wisely"
http://www.w3.org/TR/chips/#gl1

"URL as UI"
http://www.useit.com/alertbox/990321.html

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/


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


Re: ugly urls

Posted by Hein Behrens <in...@curvaciones.com>.
----- Original Message ----- 
From: "Mark Leone" <mi...@cox.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Thursday, March 24, 2005 2:46 AM
Subject: Re: ugly urls


> Don't know if this will help you or not, but Web Services Description 
> Language (WSDL) provides a standard way to create URLs that encode 
> parameters passed to web apps. If you need to publish your web app URLs 
> or make them available to lots of people, or if clients want to 
> programmatically ingest your published URLs, WSDL can be a convenient 
> mechanism. Most people think of the SOAP bindings that describe web 
> services when they think of WSDL, but it also provides HTTP bindings for 
> exposing web apps. Go to http://www.w3.org/TR/wsdl#_http and see Section 
> 4. Excerpt below.
> 
> 
>     4. HTTP GET & POST Binding
> 
> WSDL includes a binding for HTTP 1.1's GET and POST verbs in order to 
> describe the interaction between a Web Browser and a web site. This 
> allows applications other than Web Browsers to interact with the site. 
> The following protocol specific information may be specified:
> 
>     * An indication that a binding uses HTTP GET or POST
>     * An address for the port
>     * A relative address for each operation (relative to the base
>       address defined by the port)
> 
> 
>       4.1 HTTP GET/POST Examples
> 
> The following example shows three ports that are bound differently for a 
> given port type.
> 
> If the values being passed are part1=1, part2=2, part3=3, the request 
> format would be as follows for each port:
> 
> port1: GET, URL="http://example.com/o1/A1B2/3"
> port2: GET, URL="http://example.com/o1?p1=1&p2=2&p3=3
> port3: POST, URL="http://example.com/o1", PAYLOAD="p1=1&p2=2&p3=3"
> 
> 
> 
> Hein Behrens wrote:
> 
> >http://tuckey.org/urlrewrite/
> >
> >Does the same for Tomcat.
> >
> >No need for Apache
> >
> >
> >----- Original Message ----- 
> >From: "Jason Bainbridge" <jb...@gmail.com>
> >To: "Tomcat Users List" <to...@jakarta.apache.org>
> >Sent: Wednesday, March 23, 2005 6:45 PM
> >Subject: Re: ugly urls
> >
> >
> >  
> >
> >>On Wed, 23 Mar 2005 16:47:19 +0000, Didier McGillis
> >><co...@hotmail.com> wrote:
> >>    
> >>
> >>>Hi everyone
> >>>
> >>>I wanted to see if in JSP or Tomcat there was an easy way to transform
> >>>      
> >>>
> >ugly
> >  
> >
> >>>urls into pretty urls.  So taking category.jsp?catid=12&type=2 and
> >>>      
> >>>
> >changing
> >  
> >
> >>>it to category/catid/12/type/2?
> >>>      
> >>>
> >>Best way would be to put Apache (Webserver) in front of tomcat and
> >>then use mod_rewrite rules.
> >>
> >>Regards,
> >>-- 
> >>Jason Bainbridge
> >>http://kde.org - webmaster@kde.org
> >>Personal Site - http://jasonbainbridge.com
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >>    
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >  
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

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


Re: ugly urls

Posted by Mark Leone <mi...@cox.net>.
Don't know if this will help you or not, but Web Services Description 
Language (WSDL) provides a standard way to create URLs that encode 
parameters passed to web apps. If you need to publish your web app URLs 
or make them available to lots of people, or if clients want to 
programmatically ingest your published URLs, WSDL can be a convenient 
mechanism. Most people think of the SOAP bindings that describe web 
services when they think of WSDL, but it also provides HTTP bindings for 
exposing web apps. Go to http://www.w3.org/TR/wsdl#_http and see Section 
4. Excerpt below.


    4. HTTP GET & POST Binding

WSDL includes a binding for HTTP 1.1's GET and POST verbs in order to 
describe the interaction between a Web Browser and a web site. This 
allows applications other than Web Browsers to interact with the site. 
The following protocol specific information may be specified:

    * An indication that a binding uses HTTP GET or POST
    * An address for the port
    * A relative address for each operation (relative to the base
      address defined by the port)


      4.1 HTTP GET/POST Examples

The following example shows three ports that are bound differently for a 
given port type.

If the values being passed are part1=1, part2=2, part3=3, the request 
format would be as follows for each port:

port1: GET, URL="http://example.com/o1/A1B2/3"
port2: GET, URL="http://example.com/o1?p1=1&p2=2&p3=3
port3: POST, URL="http://example.com/o1", PAYLOAD="p1=1&p2=2&p3=3"



Hein Behrens wrote:

>http://tuckey.org/urlrewrite/
>
>Does the same for Tomcat.
>
>No need for Apache
>
>
>----- Original Message ----- 
>From: "Jason Bainbridge" <jb...@gmail.com>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>Sent: Wednesday, March 23, 2005 6:45 PM
>Subject: Re: ugly urls
>
>
>  
>
>>On Wed, 23 Mar 2005 16:47:19 +0000, Didier McGillis
>><co...@hotmail.com> wrote:
>>    
>>
>>>Hi everyone
>>>
>>>I wanted to see if in JSP or Tomcat there was an easy way to transform
>>>      
>>>
>ugly
>  
>
>>>urls into pretty urls.  So taking category.jsp?catid=12&type=2 and
>>>      
>>>
>changing
>  
>
>>>it to category/catid/12/type/2?
>>>      
>>>
>>Best way would be to put Apache (Webserver) in front of tomcat and
>>then use mod_rewrite rules.
>>
>>Regards,
>>-- 
>>Jason Bainbridge
>>http://kde.org - webmaster@kde.org
>>Personal Site - http://jasonbainbridge.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>

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


Re: ugly urls

Posted by Hein Behrens <in...@curvaciones.com>.
http://tuckey.org/urlrewrite/

Does the same for Tomcat.

No need for Apache


----- Original Message ----- 
From: "Jason Bainbridge" <jb...@gmail.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, March 23, 2005 6:45 PM
Subject: Re: ugly urls


> On Wed, 23 Mar 2005 16:47:19 +0000, Didier McGillis
> <co...@hotmail.com> wrote:
> > Hi everyone
> >
> > I wanted to see if in JSP or Tomcat there was an easy way to transform
ugly
> > urls into pretty urls.  So taking category.jsp?catid=12&type=2 and
changing
> > it to category/catid/12/type/2?
>
> Best way would be to put Apache (Webserver) in front of tomcat and
> then use mod_rewrite rules.
>
> Regards,
> -- 
> Jason Bainbridge
> http://kde.org - webmaster@kde.org
> Personal Site - http://jasonbainbridge.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

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


Re: ugly urls

Posted by Jason Bainbridge <jb...@gmail.com>.
On Wed, 23 Mar 2005 16:47:19 +0000, Didier McGillis
<co...@hotmail.com> wrote:
> Hi everyone
> 
> I wanted to see if in JSP or Tomcat there was an easy way to transform ugly
> urls into pretty urls.  So taking category.jsp?catid=12&type=2 and changing
> it to category/catid/12/type/2?

Best way would be to put Apache (Webserver) in front of tomcat and
then use mod_rewrite rules.

Regards,
-- 
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com

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