Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-01       - By Emi Lu

 Back
Is there a way to hide .action & .do by using filter & url-pattern?

For example, I have the following codes:

 <filter>
        <filter-name>tutorial</filter-name>
        <filter-class>
           org.apache.struts2.dispatcher.FilterDispatcher
        </filter-class>
    </filter>



    <filter-mapping>
        <filter-name>tutorial</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


How would the the following tech be applied to struts2 web.xml?

<servlet>
<servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>action</servlet-name>
  <url-pattern>*.do</url-pattern>
</servlet-mapping>



> Here is another approach suggested by Peter Hilton.
>
> On 20 Sep 2007, at 06:37, Vo Van Thuong wrote:
>  I've just read your article at
> http://www.lunatech-research.com/archives/2005/07/29/struts-urls,
>  and i find it very useful for me.
> I'm glad if it helps you.
>
>
>  would you pls give me some idea about Ebay's url.
>  http://antiques.listings.ebay.com/Antiquities-Classical-Amer
_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1Q
QsabfmtsZ1QQsacatZ37903QQsaobfmtsZinsifQQsocmdZListingItemList
>
>
>  I'm wondering why they do that,
>
>
>
> It looks like they have replaced ? = and & in the query string with
> letters, because search engines sometimes treat URLs with a query string
> differently.
>
>
>  and how they do that?
>  Can i also implement something like that?
> Sure. You need to do two things. First change the characters in URLs
> that appear in HTML your application generates. In JSP or JSF you could
> use a custom tag for that. Second, in the web server use some kind of
> rewriting such as Apache mod_rewrite or a Servlet filter to translate
> the characters back again before they are used by your application.
>
>
> Peter
>
> -- -- Original Message -- -- From: "hezjing" <hezjing@(protected)>
> To: "Struts Users Mailing List" <user@(protected)>
> Sent: Friday, September 21, 2007 3:00 PM
> Subject: Re: Struts URLs for perfectionists like Ebay's URLs
>
>
>> I think that is called URL's parameter encryption.
>>
>> You may want to take a look at
>> http://www.avedatech.com/Products/QueryCrypt/index.jsp,
>> I haven't try it by myself though.
>>
>>
>> On 9/20/07, Vo Van Thuong <vovanthuong@(protected)> wrote:
>>> Hi Vinny,
>>>
>>> I'd like users to access to my website by URLs like Ebay's:
>>> http://listings.ebay.com/
_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1Q
QsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList
>>>
>>> In which we can't see which one is get parameters which one is value
>>> obviously.
>>>
>>> I've already read an article at
>>> http://www.lunatech-research.com/archives/2005/07/29/struts-urls
>>> Which gives guides to remove the request extension (.do), the
>>> parameter and
>>> value from urls.
>>> eg:
>>>    customer.do?method=edit&id=42
>>>    /customer/edit/42
>>>
>>> Thanks for quick response.
>>>
>>> -- -- Original Message -- --
>>> From: "Vinny" <xaymaca@(protected)>
>>> To: "Struts Users Mailing List" <user@(protected)>
>>> Sent: Thursday, September 20, 2007 12:54 PM
>>> Subject: Re: Struts URLs for perfectionists like Ebay's URLs
>>>
>>>
>>> > Can you give an example of what you are trying to do?
>>> > There a few plugins/tools/filters that can effect urls in struts and
>>> > webapps in general
>>> >

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.