You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kevin Lawrence <ke...@diamond-sky.com> on 2007/07/18 23:36:41 UTC

Don't expose .action to user?

Hi,

I am a struts newbie and am exploring struts2 for a website rewrite.

I don't want the user to know whether or not they are accessing an 
action - and I don't want to expose the .action suffix in the url.

examples:

  http://www.junitfactory.com/demo
    - needs to go via DemoAction to /demo/index.jsp

  http://www.junitfactory.com/faq
    - will go straight to /faq/index.html


I came up with a way to do it.

My web.xml looks like this:

     <display-name>JUnit Factory</display-name>

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

     <filter-mapping>
         <filter-name>struts</filter-name>
         <url-pattern>*.action</url-pattern>
     </filter-mapping>

     <welcome-file-list>
         <welcome-file>main.action</welcome-file>
         <welcome-file>index.html</welcome-file>
         <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>

It looks like tomcat won't use main.action unless a file main.action 
exists in the directory.

Most of the pages don't require an action and will just fall through to 
index.html or index.jsp. For the pages that do require an action, I'll 
create a main.action in the directory and an entry in struts.xml:

     <package name="demo" extends="struts-default" namespace="/demo">
         <action name="main" class="demo.DemoAction">
             <result>/demo/main.jsp</result>
         </action>
     </package>


It seems to work in a simple example but, before I go too far, am I 
missing something that is obviously stupid? Is there a better way to do 
this?

Thanks,

Kevin



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


Re: Don't expose .action to user?

Posted by Perssy Llamosas <pl...@telecall.com.pe>.
This is what happens:

There is no Action mapped for action name pages/index.html. - [unknown location]

Struts tries to handle everything, wouldn't it be nice to have a fall through?
If Struts can't find the URI within its mapping try to find if there is static content with that request.

I am using the action extension configured as an empty string but to avoid Struts trying to handle everything,
I mapped the struts filter to /logic/* . 
I am still not convinced with my solution but at least the result is pretty clean and works for me.
And I can use RestFul without ".action" or map struts to serve dynamic files,
ex: "/logic/get/result.csv" "/logic/get/result.pdf"

Perssy Llamosas.

-------- Original Message --------
Subject: Re:Don't expose .action to user?
From: Ted Husted <hu...@apache.org>
To: Struts Users Mailing List <us...@struts.apache.org>
Date: 23/07/2007 10:08 a.m.
> Try it with the action extension configured to an empty string, and
> see what happens.
>
> On 7/23/07, Perssy Llamosas <pl...@telecall.com.pe> wrote:
>> Well...
>>
>> How would you handle a situation that requires you to use an action with
>> slashes?
>> <action name="show/*" class="org.beyond.TestAction"  method="{1}" />
>>
>> Or even better, action with parameters in their uri. "show/{1}/{2}" ex:
>> "show/book/43"
>>
>> It has its downfalls. I don't see myself creating hundreds of folders
>> and .action files. I wanted to use the restful mapper for RESTful URLs.
>>
>> Perssy Llamosas
>>
>> -------- Original Message --------
>> Subject: Re:Don't expose .action to user?
>> From: Kevin Lawrence <ke...@diamond-sky.com>
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Date: 20/07/2007 11:06 a.m.
>> > I have a solution that seems to work. Feedback on whether it is a good
>> > solution or rather, why it is not, would be wonderful.
>> >
>> >
>> > Executive summary:
>> >  map *.action to struts filter
>> >  add main.action as the first entry in web.xml's welcome list
>> >
>> > Have all user-visible urls look like directories:
>> >
>> >   http://www.junitfactory.com/demo
>> >
>> > For urls that will be handled by an action, add a file main.action to
>> > the directory.
>> >
>> > Original post is here:
>> > http://www.mail-archive.com/user%40struts.apache.org/msg63838.html
>> >
>> > Kevin
>> >
>> > http://www.junitfactory.com
>> > You send us code. We send back tests. For free.
>> >
>> > Perssy Llamosas wrote:
>> >> You can't get rid of the ".action", at least in my tests I have not
>> >> being able to map a clean url without the ".action". Even the
>> >> Restful2ActionMapper requires a .action at the end.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: Don't expose .action to user?

Posted by Ted Husted <hu...@apache.org>.
Try it with the action extension configured to an empty string, and
see what happens.

On 7/23/07, Perssy Llamosas <pl...@telecall.com.pe> wrote:
> Well...
>
> How would you handle a situation that requires you to use an action with
> slashes?
> <action name="show/*" class="org.beyond.TestAction"  method="{1}" />
>
> Or even better, action with parameters in their uri. "show/{1}/{2}" ex:
> "show/book/43"
>
> It has its downfalls. I don't see myself creating hundreds of folders
> and .action files. I wanted to use the restful mapper for RESTful URLs.
>
> Perssy Llamosas
>
> -------- Original Message --------
> Subject: Re:Don't expose .action to user?
> From: Kevin Lawrence <ke...@diamond-sky.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Date: 20/07/2007 11:06 a.m.
> > I have a solution that seems to work. Feedback on whether it is a good
> > solution or rather, why it is not, would be wonderful.
> >
> >
> > Executive summary:
> >  map *.action to struts filter
> >  add main.action as the first entry in web.xml's welcome list
> >
> > Have all user-visible urls look like directories:
> >
> >   http://www.junitfactory.com/demo
> >
> > For urls that will be handled by an action, add a file main.action to
> > the directory.
> >
> > Original post is here:
> > http://www.mail-archive.com/user%40struts.apache.org/msg63838.html
> >
> > Kevin
> >
> > http://www.junitfactory.com
> > You send us code. We send back tests. For free.
> >
> > Perssy Llamosas wrote:
> >> You can't get rid of the ".action", at least in my tests I have not
> >> being able to map a clean url without the ".action". Even the
> >> Restful2ActionMapper requires a .action at the end.

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


Re: Don't expose .action to user?

Posted by Perssy Llamosas <pl...@telecall.com.pe>.
Well...

How would you handle a situation that requires you to use an action with 
slashes?
<action name="show/*" class="org.beyond.TestAction"  method="{1}" />

Or even better, action with parameters in their uri. "show/{1}/{2}" ex: 
"show/book/43"

It has its downfalls. I don't see myself creating hundreds of folders 
and .action files. I wanted to use the restful mapper for RESTful URLs.

Perssy Llamosas

-------- Original Message --------
Subject: Re:Don't expose .action to user?
From: Kevin Lawrence <ke...@diamond-sky.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Date: 20/07/2007 11:06 a.m.
> I have a solution that seems to work. Feedback on whether it is a good 
> solution or rather, why it is not, would be wonderful.
>
>
> Executive summary:
>  map *.action to struts filter
>  add main.action as the first entry in web.xml's welcome list
>
> Have all user-visible urls look like directories:
>
>   http://www.junitfactory.com/demo
>
> For urls that will be handled by an action, add a file main.action to 
> the directory.
>
> Original post is here:
> http://www.mail-archive.com/user%40struts.apache.org/msg63838.html
>
> Kevin
>
> http://www.junitfactory.com
> You send us code. We send back tests. For free.
>
> Perssy Llamosas wrote:
>> You can't get rid of the ".action", at least in my tests I have not 
>> being able to map a clean url without the ".action". Even the 
>> Restful2ActionMapper requires a .action at the end.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: Don't expose .action to user?

Posted by Paul Benedict <pb...@apache.org>.
I use filters as welcome pages. I think that's part of Servlet 2.5.

Ted Husted wrote:
> On 7/20/07, Kevin Lawrence <ke...@diamond-sky.com> wrote:
>> I have a solution that seems to work. Feedback on whether it is a good
>> solution or rather, why it is not, would be wonderful.
>
> I was *very* surprised to find that
>
>    <constant name="struts.action.extension" value="" />
>
> actually seems to work as expected under Tomcat 5.5.
>
> Hmmph!
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Don't expose .action to user?

Posted by Ted Husted <hu...@apache.org>.
On 7/20/07, Kevin Lawrence <ke...@diamond-sky.com> wrote:
> I have a solution that seems to work. Feedback on whether it is a good
> solution or rather, why it is not, would be wonderful.

I was *very* surprised to find that

    <constant name="struts.action.extension" value="" />

actually seems to work as expected under Tomcat 5.5.

Hmmph!

-Ted.

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


Re: Don't expose .action to user?

Posted by Kevin Lawrence <ke...@diamond-sky.com>.
I have a solution that seems to work. Feedback on whether it is a good 
solution or rather, why it is not, would be wonderful.


Executive summary:
  map *.action to struts filter
  add main.action as the first entry in web.xml's welcome list

Have all user-visible urls look like directories:

   http://www.junitfactory.com/demo

For urls that will be handled by an action, add a file main.action to 
the directory.

Original post is here:
http://www.mail-archive.com/user%40struts.apache.org/msg63838.html

Kevin

http://www.junitfactory.com
You send us code. We send back tests. For free.

Perssy Llamosas wrote:
> You can't get rid of the ".action", at least in my tests I have not 
> being able to map a clean url without the ".action". Even the 
> Restful2ActionMapper requires a .action at the end.
> 


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


Re: Don't expose .action to user?

Posted by Perssy Llamosas <pl...@telecall.com.pe>.
You can't get rid of the ".action", at least in my tests I have not 
being able to map a clean url without the ".action". Even the 
Restful2ActionMapper requires a .action at the end.

To make it work without the action you can always set the struts2 
extension to "" and map the struts2 filter to somewhere else than /* so 
struts2 lets you serve other content.
web.xml:
<!-- snip  -->
<filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/logic/*</url-pattern>
</filter-mapping>
<!-- /snip  -->

struts.xml:
<!-- snip  -->
<constant name="struts.action.extension" value="" />
<!-- /snip  -->

If someone knows other way without extra prefix and no suffix, please share.

Perssy Llamosas

-------- Original Message --------
Subject: Re:Don't expose .action to user?
From: Adam Ruggles <a....@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Date: 19/07/2007 02:23 p.m.
> Here a couple links that should get you started.
>
> http://struts.apache.org/2.0.8/struts2-core/apidocs/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.html 
>
> http://struts.apache.org/2.0.8/docs/restfulactionmapper.html
> http://struts.apache.org/2.0.8/docs/actionmapper.html
>
> Kevin Lawrence wrote:
>> I have not. Can you give me a link?
>>
>> Thanks,
>>
>> Kevin
>>
>> Adam Ruggles wrote:
>>> Have you looked at using the restful url stuff?
>>>
>>> Kevin Lawrence wrote:
>>>> I know you were joking but, for me, there are two concerns:
>>>>
>>>> 1. I want the urls to be memorable
>>>>
>>>>  www.junitfactory.com/demo
>>>>
>>>> is easier to remember than
>>>>
>>>>  www.junitfactory.com/demo.action (or .htm or .html or .jsp)
>>>>
>>>>
>>>> 2. I will almost certainly move part of my site to a CMS in the 
>>>> near future and I don't want to break all the URLs
>>>>
>>>>
>>>>
>>>> Kevin
>>>>
>>>>
>>>> Eric Buitenhuis wrote:
>>>>> If obscuring the underlying technology is the primary concern, 
>>>>> perhaps using
>>>>> *.htm
>>>>  instead of *.action for struts 2 while using *.html for static could
>>>>> be a solution. Then everyone would think you were writing it using 
>>>>> Microsoft
>>>>> technology :-)
>>>>>
>>>>>
>>>>>
>>>>> On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>>>>>>
>>>>>> Matt:
>>>>>>
>>>>>> I use URLRewrite.  I only have a few rules since
>>>>>> urlreqrite supports regex pattern mathing.
>>>>>>
>>>>>> Thanks,
>>>>>>         Neil
>>>>>>
>>>>>> -- 
>>>>>> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
>>>>>> FREE! Eliminate junk email and reclaim your inbox.
>>>>>> Visit http://www.spammilter.com for details.
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: mraible [mailto:matt@raibledesigns.com]
>>>>>> Sent: Thursday, July 19, 2007 11:32 AM
>>>>>> To: user@struts.apache.org
>>>>>> Subject: Re: Don't expose .action to user?
>>>>>>
>>>>>>
>>>>>> I agree it would be nice if you could make totally clean URLs 
>>>>>> with Struts
>>>>>> 2
>>>>>> -
>>>>>> as if you had each action registered as servlets in your web.xml.
>>>>>> Unfortunately, I don't believe it's possible. The only solution I 
>>>>>> can
>>>>>> think
>>>>>> of is to use the UrlRewriteFilter.
>>>>>>
>>>>>> http://tuckey.org/urlrewrite
>>>>>>
>>>>>> While this solution would work, it'd require duplicating your 
>>>>>> action paths
>>>>>> in urlrewrite.xml. I guess the best solution is to write some 
>>>>>> sort of
>>>>>> adapter for the UrlRewriteFilter that sweeps your struts.xml and 
>>>>>> creates
>>>>>> rules to forward all action names (w/o an extension) to your 
>>>>>> actions with
>>>>>> an
>>>>>> extension. In turn, you'd have to write outgoing rules that strip 
>>>>>> off the
>>>>>> extension from URLs.
>>>>>>
>>>>>> If someone has a more elegant solution, I'd love to hear about it.
>>>>>>
>>>>>> Matt
>>>>>>
>>>>>>
>>>>>> Chris Pratt wrote:
>>>>>> >
>>>>>> > We had the same concern, so by putting this in the top of our 
>>>>>> struts.xml
>>>>>> :
>>>>>> >
>>>>>> >   <constant name="struts.action.extension" value="html"/>
>>>>>> >
>>>>>> > It makes all the actions look like regular old .html requests.
>>>>>> >   (*Chris*)
>>>>>> >
>>>>>> > 
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> > For additional commands, e-mail: user-help@struts.apache.org
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>>
>>>>>> -- 
>>>>>> View this message in context:
>>>>>>
>>>>>> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921 
>>>>>>
>>>>>> 69
>>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: Don't expose .action to user?

Posted by Adam Ruggles <a....@gmail.com>.
Here a couple links that should get you started.

http://struts.apache.org/2.0.8/struts2-core/apidocs/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.html
http://struts.apache.org/2.0.8/docs/restfulactionmapper.html
http://struts.apache.org/2.0.8/docs/actionmapper.html

Kevin Lawrence wrote:
> I have not. Can you give me a link?
>
> Thanks,
>
> Kevin
>
> Adam Ruggles wrote:
>> Have you looked at using the restful url stuff?
>>
>> Kevin Lawrence wrote:
>>> I know you were joking but, for me, there are two concerns:
>>>
>>> 1. I want the urls to be memorable
>>>
>>>  www.junitfactory.com/demo
>>>
>>> is easier to remember than
>>>
>>>  www.junitfactory.com/demo.action (or .htm or .html or .jsp)
>>>
>>>
>>> 2. I will almost certainly move part of my site to a CMS in the near 
>>> future and I don't want to break all the URLs
>>>
>>>
>>>
>>> Kevin
>>>
>>>
>>> Eric Buitenhuis wrote:
>>>> If obscuring the underlying technology is the primary concern, 
>>>> perhaps using
>>>> *.htm
>>>  instead of *.action for struts 2 while using *.html for static could
>>>> be a solution. Then everyone would think you were writing it using 
>>>> Microsoft
>>>> technology :-)
>>>>
>>>>
>>>>
>>>> On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>>>>>
>>>>> Matt:
>>>>>
>>>>> I use URLRewrite.  I only have a few rules since
>>>>> urlreqrite supports regex pattern mathing.
>>>>>
>>>>> Thanks,
>>>>>         Neil
>>>>>
>>>>> -- 
>>>>> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
>>>>> FREE! Eliminate junk email and reclaim your inbox.
>>>>> Visit http://www.spammilter.com for details.
>>>>>
>>>>> -----Original Message-----
>>>>> From: mraible [mailto:matt@raibledesigns.com]
>>>>> Sent: Thursday, July 19, 2007 11:32 AM
>>>>> To: user@struts.apache.org
>>>>> Subject: Re: Don't expose .action to user?
>>>>>
>>>>>
>>>>> I agree it would be nice if you could make totally clean URLs with 
>>>>> Struts
>>>>> 2
>>>>> -
>>>>> as if you had each action registered as servlets in your web.xml.
>>>>> Unfortunately, I don't believe it's possible. The only solution I can
>>>>> think
>>>>> of is to use the UrlRewriteFilter.
>>>>>
>>>>> http://tuckey.org/urlrewrite
>>>>>
>>>>> While this solution would work, it'd require duplicating your 
>>>>> action paths
>>>>> in urlrewrite.xml. I guess the best solution is to write some sort of
>>>>> adapter for the UrlRewriteFilter that sweeps your struts.xml and 
>>>>> creates
>>>>> rules to forward all action names (w/o an extension) to your 
>>>>> actions with
>>>>> an
>>>>> extension. In turn, you'd have to write outgoing rules that strip 
>>>>> off the
>>>>> extension from URLs.
>>>>>
>>>>> If someone has a more elegant solution, I'd love to hear about it.
>>>>>
>>>>> Matt
>>>>>
>>>>>
>>>>> Chris Pratt wrote:
>>>>> >
>>>>> > We had the same concern, so by putting this in the top of our 
>>>>> struts.xml
>>>>> :
>>>>> >
>>>>> >   <constant name="struts.action.extension" value="html"/>
>>>>> >
>>>>> > It makes all the actions look like regular old .html requests.
>>>>> >   (*Chris*)
>>>>> >
>>>>> > 
>>>>> ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> > For additional commands, e-mail: user-help@struts.apache.org
>>>>> >
>>>>> >
>>>>> >
>>>>>
>>>>> -- 
>>>>> View this message in context:
>>>>>
>>>>> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921 
>>>>>
>>>>> 69
>>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

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


Re: Don't expose .action to user?

Posted by Kevin Lawrence <ke...@diamond-sky.com>.
I have not. Can you give me a link?

Thanks,

Kevin

Adam Ruggles wrote:
> Have you looked at using the restful url stuff?
> 
> Kevin Lawrence wrote:
>> I know you were joking but, for me, there are two concerns:
>>
>> 1. I want the urls to be memorable
>>
>>  www.junitfactory.com/demo
>>
>> is easier to remember than
>>
>>  www.junitfactory.com/demo.action (or .htm or .html or .jsp)
>>
>>
>> 2. I will almost certainly move part of my site to a CMS in the near 
>> future and I don't want to break all the URLs
>>
>>
>>
>> Kevin
>>
>>
>> Eric Buitenhuis wrote:
>>> If obscuring the underlying technology is the primary concern, 
>>> perhaps using
>>> *.htm
>>  instead of *.action for struts 2 while using *.html for static could
>>> be a solution. Then everyone would think you were writing it using 
>>> Microsoft
>>> technology :-)
>>>
>>>
>>>
>>> On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>>>>
>>>> Matt:
>>>>
>>>> I use URLRewrite.  I only have a few rules since
>>>> urlreqrite supports regex pattern mathing.
>>>>
>>>> Thanks,
>>>>         Neil
>>>>
>>>> -- 
>>>> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
>>>> FREE! Eliminate junk email and reclaim your inbox.
>>>> Visit http://www.spammilter.com for details.
>>>>
>>>> -----Original Message-----
>>>> From: mraible [mailto:matt@raibledesigns.com]
>>>> Sent: Thursday, July 19, 2007 11:32 AM
>>>> To: user@struts.apache.org
>>>> Subject: Re: Don't expose .action to user?
>>>>
>>>>
>>>> I agree it would be nice if you could make totally clean URLs with 
>>>> Struts
>>>> 2
>>>> -
>>>> as if you had each action registered as servlets in your web.xml.
>>>> Unfortunately, I don't believe it's possible. The only solution I can
>>>> think
>>>> of is to use the UrlRewriteFilter.
>>>>
>>>> http://tuckey.org/urlrewrite
>>>>
>>>> While this solution would work, it'd require duplicating your action 
>>>> paths
>>>> in urlrewrite.xml. I guess the best solution is to write some sort of
>>>> adapter for the UrlRewriteFilter that sweeps your struts.xml and 
>>>> creates
>>>> rules to forward all action names (w/o an extension) to your actions 
>>>> with
>>>> an
>>>> extension. In turn, you'd have to write outgoing rules that strip 
>>>> off the
>>>> extension from URLs.
>>>>
>>>> If someone has a more elegant solution, I'd love to hear about it.
>>>>
>>>> Matt
>>>>
>>>>
>>>> Chris Pratt wrote:
>>>> >
>>>> > We had the same concern, so by putting this in the top of our 
>>>> struts.xml
>>>> :
>>>> >
>>>> >   <constant name="struts.action.extension" value="html"/>
>>>> >
>>>> > It makes all the actions look like regular old .html requests.
>>>> >   (*Chris*)
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> > For additional commands, e-mail: user-help@struts.apache.org
>>>> >
>>>> >
>>>> >
>>>>
>>>> -- 
>>>> View this message in context:
>>>>
>>>> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921 
>>>>
>>>> 69
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

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


Re: Don't expose .action to user?

Posted by Adam Ruggles <a....@gmail.com>.
Have you looked at using the restful url stuff?

Kevin Lawrence wrote:
> I know you were joking but, for me, there are two concerns:
>
> 1. I want the urls to be memorable
>
>  www.junitfactory.com/demo
>
> is easier to remember than
>
>  www.junitfactory.com/demo.action (or .htm or .html or .jsp)
>
>
> 2. I will almost certainly move part of my site to a CMS in the near 
> future and I don't want to break all the URLs
>
>
>
> Kevin
>
>
> Eric Buitenhuis wrote:
>> If obscuring the underlying technology is the primary concern, 
>> perhaps using
>> *.htm
>  instead of *.action for struts 2 while using *.html for static could
>> be a solution. Then everyone would think you were writing it using 
>> Microsoft
>> technology :-)
>>
>>
>>
>> On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>>>
>>> Matt:
>>>
>>> I use URLRewrite.  I only have a few rules since
>>> urlreqrite supports regex pattern mathing.
>>>
>>> Thanks,
>>>         Neil
>>>
>>> -- 
>>> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
>>> FREE! Eliminate junk email and reclaim your inbox.
>>> Visit http://www.spammilter.com for details.
>>>
>>> -----Original Message-----
>>> From: mraible [mailto:matt@raibledesigns.com]
>>> Sent: Thursday, July 19, 2007 11:32 AM
>>> To: user@struts.apache.org
>>> Subject: Re: Don't expose .action to user?
>>>
>>>
>>> I agree it would be nice if you could make totally clean URLs with 
>>> Struts
>>> 2
>>> -
>>> as if you had each action registered as servlets in your web.xml.
>>> Unfortunately, I don't believe it's possible. The only solution I can
>>> think
>>> of is to use the UrlRewriteFilter.
>>>
>>> http://tuckey.org/urlrewrite
>>>
>>> While this solution would work, it'd require duplicating your action 
>>> paths
>>> in urlrewrite.xml. I guess the best solution is to write some sort of
>>> adapter for the UrlRewriteFilter that sweeps your struts.xml and 
>>> creates
>>> rules to forward all action names (w/o an extension) to your actions 
>>> with
>>> an
>>> extension. In turn, you'd have to write outgoing rules that strip 
>>> off the
>>> extension from URLs.
>>>
>>> If someone has a more elegant solution, I'd love to hear about it.
>>>
>>> Matt
>>>
>>>
>>> Chris Pratt wrote:
>>> >
>>> > We had the same concern, so by putting this in the top of our 
>>> struts.xml
>>> :
>>> >
>>> >   <constant name="struts.action.extension" value="html"/>
>>> >
>>> > It makes all the actions look like regular old .html requests.
>>> >   (*Chris*)
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> > For additional commands, e-mail: user-help@struts.apache.org
>>> >
>>> >
>>> >
>>>
>>> -- 
>>> View this message in context:
>>>
>>> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921 
>>>
>>> 69
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

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


Re: Don't expose .action to user?

Posted by Kevin Lawrence <ke...@diamond-sky.com>.
I know you were joking but, for me, there are two concerns:

1. I want the urls to be memorable

  www.junitfactory.com/demo

is easier to remember than

  www.junitfactory.com/demo.action (or .htm or .html or .jsp)


2. I will almost certainly move part of my site to a CMS in the near 
future and I don't want to break all the URLs



Kevin


Eric Buitenhuis wrote:
> If obscuring the underlying technology is the primary concern, perhaps 
> using
> *.htm
  instead of *.action for struts 2 while using *.html for static could
> be a solution. Then everyone would think you were writing it using 
> Microsoft
> technology :-)
> 
> 
> 
> On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>>
>> Matt:
>>
>> I use URLRewrite.  I only have a few rules since
>> urlreqrite supports regex pattern mathing.
>>
>> Thanks,
>>         Neil
>>
>> -- 
>> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
>> FREE! Eliminate junk email and reclaim your inbox.
>> Visit http://www.spammilter.com for details.
>>
>> -----Original Message-----
>> From: mraible [mailto:matt@raibledesigns.com]
>> Sent: Thursday, July 19, 2007 11:32 AM
>> To: user@struts.apache.org
>> Subject: Re: Don't expose .action to user?
>>
>>
>> I agree it would be nice if you could make totally clean URLs with Struts
>> 2
>> -
>> as if you had each action registered as servlets in your web.xml.
>> Unfortunately, I don't believe it's possible. The only solution I can
>> think
>> of is to use the UrlRewriteFilter.
>>
>> http://tuckey.org/urlrewrite
>>
>> While this solution would work, it'd require duplicating your action 
>> paths
>> in urlrewrite.xml. I guess the best solution is to write some sort of
>> adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
>> rules to forward all action names (w/o an extension) to your actions with
>> an
>> extension. In turn, you'd have to write outgoing rules that strip off the
>> extension from URLs.
>>
>> If someone has a more elegant solution, I'd love to hear about it.
>>
>> Matt
>>
>>
>> Chris Pratt wrote:
>> >
>> > We had the same concern, so by putting this in the top of our 
>> struts.xml
>> :
>> >
>> >   <constant name="struts.action.extension" value="html"/>
>> >
>> > It makes all the actions look like regular old .html requests.
>> >   (*Chris*)
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>> >
>>
>> -- 
>> View this message in context:
>>
>> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921 
>>
>> 69
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 

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


Re: Don't expose .action to user?

Posted by Eric Buitenhuis <er...@gmail.com>.
If obscuring the underlying technology is the primary concern, perhaps using
*.htm instead of *.action for struts 2 while using *.html for static could
be a solution. Then everyone would think you were writing it using Microsoft
technology :-)



On 7/19/07, Neil Aggarwal <ne...@jammconsulting.com> wrote:
>
> Matt:
>
> I use URLRewrite.  I only have a few rules since
> urlreqrite supports regex pattern mathing.
>
> Thanks,
>         Neil
>
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
>
> -----Original Message-----
> From: mraible [mailto:matt@raibledesigns.com]
> Sent: Thursday, July 19, 2007 11:32 AM
> To: user@struts.apache.org
> Subject: Re: Don't expose .action to user?
>
>
> I agree it would be nice if you could make totally clean URLs with Struts
> 2
> -
> as if you had each action registered as servlets in your web.xml.
> Unfortunately, I don't believe it's possible. The only solution I can
> think
> of is to use the UrlRewriteFilter.
>
> http://tuckey.org/urlrewrite
>
> While this solution would work, it'd require duplicating your action paths
> in urlrewrite.xml. I guess the best solution is to write some sort of
> adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
> rules to forward all action names (w/o an extension) to your actions with
> an
> extension. In turn, you'd have to write outgoing rules that strip off the
> extension from URLs.
>
> If someone has a more elegant solution, I'd love to hear about it.
>
> Matt
>
>
> Chris Pratt wrote:
> >
> > We had the same concern, so by putting this in the top of our struts.xml
> :
> >
> >   <constant name="struts.action.extension" value="html"/>
> >
> > It makes all the actions look like regular old .html requests.
> >   (*Chris*)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
>
> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921
> 69
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Don't expose .action to user?

Posted by Kevin Lawrence <ke...@diamond-sky.com>.
Hi Matt,

My solution does seem to work for the few simple cases that I tried. The 
only overhead is that you have to create an empty main.action file in 
each directory that corresponds with an action url.

That suits my purposes quite well as, despite best practice 
recommendations, I don't want every page to go via struts. For the few 
that do, I add the file. I don't want any user-visible urls to have 
suffixes including (especially!) JSPs.

If I later want to add an action to a page that doesn't currently have 
one, I add the action to struts.xml and add the file to it's directory.

I can't see any downsides but, again, I ask - am I missing something 
really stupid?

-- 
Kevin

http://www.junitfactory.com
You send us code. We send back tests. For free.



mraible wrote:
> I agree it would be nice if you could make totally clean URLs with Struts 2 -
> as if you had each action registered as servlets in your web.xml.
> Unfortunately, I don't believe it's possible. The only solution I can think
> of is to use the UrlRewriteFilter.
> 

[snip]

> 
> If someone has a more elegant solution, I'd love to hear about it.
> 
> Matt
> 
> 

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


RE: Don't expose .action to user?

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Matt:

Both. 

	Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: mraible [mailto:matt@raibledesigns.com] 
Sent: Thursday, July 19, 2007 12:04 PM
To: user@struts.apache.org
Subject: RE: Don't expose .action to user?


Do you rewrite outgoing URLs as well, or just incoming?


Neil Aggarwal wrote:
> 
> Matt:
> 
> I use URLRewrite.  I only have a few rules since
> urlreqrite supports regex pattern mathing.
> 
> Thanks,
> 	Neil 
> 
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
> 
> -----Original Message-----
> From: mraible [mailto:matt@raibledesigns.com] 
> Sent: Thursday, July 19, 2007 11:32 AM
> To: user@struts.apache.org
> Subject: Re: Don't expose .action to user?
> 
> 
> I agree it would be nice if you could make totally clean URLs with Struts
> 2
> -
> as if you had each action registered as servlets in your web.xml.
> Unfortunately, I don't believe it's possible. The only solution I can
> think
> of is to use the UrlRewriteFilter.
> 
> http://tuckey.org/urlrewrite
> 
> While this solution would work, it'd require duplicating your action paths
> in urlrewrite.xml. I guess the best solution is to write some sort of
> adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
> rules to forward all action names (w/o an extension) to your actions with
> an
> extension. In turn, you'd have to write outgoing rules that strip off the
> extension from URLs.
> 
> If someone has a more elegant solution, I'd love to hear about it.
> 
> Matt
> 
> 
> Chris Pratt wrote:
>> 
>> We had the same concern, so by putting this in the top of our struts.xml:
>> 
>>   <constant name="struts.action.extension" value="html"/>
>> 
>> It makes all the actions look like regular old .html requests.
>>   (*Chris*)
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921
> 69
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116935
05
Sent from the Struts - User mailing list archive at Nabble.com.


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


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


RE: Don't expose .action to user?

Posted by mraible <ma...@raibledesigns.com>.
Do you rewrite outgoing URLs as well, or just incoming?


Neil Aggarwal wrote:
> 
> Matt:
> 
> I use URLRewrite.  I only have a few rules since
> urlreqrite supports regex pattern mathing.
> 
> Thanks,
> 	Neil 
> 
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> FREE! Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
> 
> -----Original Message-----
> From: mraible [mailto:matt@raibledesigns.com] 
> Sent: Thursday, July 19, 2007 11:32 AM
> To: user@struts.apache.org
> Subject: Re: Don't expose .action to user?
> 
> 
> I agree it would be nice if you could make totally clean URLs with Struts
> 2
> -
> as if you had each action registered as servlets in your web.xml.
> Unfortunately, I don't believe it's possible. The only solution I can
> think
> of is to use the UrlRewriteFilter.
> 
> http://tuckey.org/urlrewrite
> 
> While this solution would work, it'd require duplicating your action paths
> in urlrewrite.xml. I guess the best solution is to write some sort of
> adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
> rules to forward all action names (w/o an extension) to your actions with
> an
> extension. In turn, you'd have to write outgoing rules that strip off the
> extension from URLs.
> 
> If someone has a more elegant solution, I'd love to hear about it.
> 
> Matt
> 
> 
> Chris Pratt wrote:
>> 
>> We had the same concern, so by putting this in the top of our struts.xml:
>> 
>>   <constant name="struts.action.extension" value="html"/>
>> 
>> It makes all the actions look like regular old .html requests.
>>   (*Chris*)
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921
> 69
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a11693505
Sent from the Struts - User mailing list archive at Nabble.com.


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


RE: Don't expose .action to user?

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Matt:

I use URLRewrite.  I only have a few rules since
urlreqrite supports regex pattern mathing.

Thanks,
	Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: mraible [mailto:matt@raibledesigns.com] 
Sent: Thursday, July 19, 2007 11:32 AM
To: user@struts.apache.org
Subject: Re: Don't expose .action to user?


I agree it would be nice if you could make totally clean URLs with Struts 2
-
as if you had each action registered as servlets in your web.xml.
Unfortunately, I don't believe it's possible. The only solution I can think
of is to use the UrlRewriteFilter.

http://tuckey.org/urlrewrite

While this solution would work, it'd require duplicating your action paths
in urlrewrite.xml. I guess the best solution is to write some sort of
adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
rules to forward all action names (w/o an extension) to your actions with an
extension. In turn, you'd have to write outgoing rules that strip off the
extension from URLs.

If someone has a more elegant solution, I'd love to hear about it.

Matt


Chris Pratt wrote:
> 
> We had the same concern, so by putting this in the top of our struts.xml:
> 
>   <constant name="struts.action.extension" value="html"/>
> 
> It makes all the actions look like regular old .html requests.
>   (*Chris*)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921
69
Sent from the Struts - User mailing list archive at Nabble.com.


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


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


Re: Don't expose .action to user?

Posted by mraible <ma...@raibledesigns.com>.
I agree it would be nice if you could make totally clean URLs with Struts 2 -
as if you had each action registered as servlets in your web.xml.
Unfortunately, I don't believe it's possible. The only solution I can think
of is to use the UrlRewriteFilter.

http://tuckey.org/urlrewrite

While this solution would work, it'd require duplicating your action paths
in urlrewrite.xml. I guess the best solution is to write some sort of
adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
rules to forward all action names (w/o an extension) to your actions with an
extension. In turn, you'd have to write outgoing rules that strip off the
extension from URLs.

If someone has a more elegant solution, I'd love to hear about it.

Matt


Chris Pratt wrote:
> 
> We had the same concern, so by putting this in the top of our struts.xml:
> 
>   <constant name="struts.action.extension" value="html"/>
> 
> It makes all the actions look like regular old .html requests.
>   (*Chris*)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a11692169
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Don't expose .action to user?

Posted by Chris Pratt <th...@gmail.com>.
We had the same concern, so by putting this in the top of our struts.xml:

  <constant name="struts.action.extension" value="html"/>

It makes all the actions look like regular old .html requests.
  (*Chris*)

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