Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Struts2 Url Truncation  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to change the URL from full URL to one without the action name.

For Example



to



Could someone guide me how this could be achieved please?
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use URLRewriterFilter over here http://www.tuckey.org/urlrewrite/. If you want to make your own urls.
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Pinky Before the hitting action or after hitting the action. And I would like to know what's need of changing the url.
 
Pinki Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its just the client requirement, that we need to implement.
 
Sheriff
Posts: 24369
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you could clarify what it means to "change" a URL? A more precise description of the requirement would be very helpful.
 
Pinki Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually the client does not want the user to know what action classes are being hit so for the whole application he wants that the user should only see and not a url with the changing action classes eg that are being hit as he moves around the application.

I hope I have made my requirement clear now.


 
Paul Clapham
Sheriff
Posts: 24369
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's a lot clearer now. The original question could have involved trying to make the browser recognize the long form and somehow change it at run-time to the shorter form. But you want to do the change at design time, so that you have a short form for each URL which is going to be used in the application for requests, am I right?
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!