| Author |
How to hide action "extension" in URL? (Struts2)
|
Leonardo Carreira
Ranch Hand
Joined: Apr 07, 2009
Posts: 482
|
|
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...
|
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
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.
|
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
|
 |
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
|
posted

0
|
|
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
Joined: Apr 07, 2009
Posts: 482
|
|
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
|
 |
 |
|
|
subject: How to hide action "extension" in URL? (Struts2)
|
|
|