• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to hide action "extension" in URL? (Struts2)

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends...

i have a question..
iam using Struts2..
how to hide action "extension" in URL?..
example..
ussually i go to URL by write down :
http://localhost:8080/MyApplication/Category/new.action
http://localhost:8080/MyApplication/Category/edit.action?id=1

what i have to do to access URL by only write down :
http://localhost:8080/MyApplication/Category/new
http://localhost:8080/MyApplication/Category/edit?id=1

its like this website..

is it any configuration in our struts.xml?..

Thanks before...



 
Ranch Hand
Posts: 689
Scala Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I think if you put one line code at your struts.xml

<constant name="struts.action.extension" value="" /> then you can get your solution.


If you get your solution at least let me know by punting one comment.





 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
S2.1 ships with the extension set to "action," so it's enabled by default. The REST plugin also uss extension-less mappings by default.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..

iam so sorry for my late post reply..

okay.. its run well.. but its happen all of configuration in my application has to changed..

yeah maybe i will use it in next application..

Thank's
 
reply
    Bookmark Topic Watch Topic
  • New Topic