On Fri, Oct 3, 2008 at 6:31 PM, Owen Berry <[EMAIL PROTECTED]> wrote:
>
> Here's a small sample out of my struts.xml file; let me know if you
> need a little more.
>
>  <package namespace="/" name="home" extends="tiles-default">
>    <action name="">
>      <result type="tiles">home</result>
>    </action>
>    <action name="home">
>      <result type="tiles">home</result>
>    </action>
>  </package>
>
> I can access the above with any of the following URLs:
>
>  /
>  /home
>  /home.action
>  /.action   (yip!)
>
> If I access it with a .action extension, then all links in my
> application get the extension appended. Maybe that's a clue for you -
> maybe the first page you hit (through a redirect or something) has an
> extension, and therefore all links get extensions automatically.
>
> My struts.properties file doesn't have anything relevant in it - I'm
> using the default value for struts.action.extension, which I mentioned
> in my previous email.
>
> Hope that helps.
>
> Owen
>
> On Fri, Oct 3, 2008 at 6:48 AM, Jq Jr <[EMAIL PROTECTED]> wrote:
> >
> >  Hi,
> > Thanks for the reply friends.
> >
> > Owen which version of struts are you using?
> > And can you post your struts.xml and struts.properties files.
> > Actually I am not using the struts.properties instead I am putting those
> > values in <constants ...> tag.
> > Is it required to have struts.properties to remove the extension?
> >
> >
> > Thanks
> >
> >
> > Jq Jr wrote:
> >>
> >> Hi All,
> >>
> >> Can anyone tell me how to remove the extension of url in struts 2 ?
> >>
> >> Like
> >> /login instead of
> >> /login.action
> >>

I don't know if the following blog article is any use to you?
http://raibledesigns.com/rd/entry/extensionless_urls_in_java_web

I've been using UrlRewriteFilter to handle a lot  of situations where
the framework can't do the style of "clean" URLs that I would like.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to