How can I get actual url containing parameters without .do pattern
Nina Anderson
Ranch Hand
Joined: Jul 18, 2006
Posts: 148
posted
0
Hi guys,
I have a struts web application where users are going to be emailing their friends pages they like. For example, a user reads an artice and clicks on an "Email To Friends" button.
I want my application to email the url with parameters to the recipient's email address. However, when I invoke "reques.getRequestURL()" to get the url, this is how ths URL looks like: www.whatever.com/article/emailToFriend.do
If the end user clicks on this URL, they would not be taken to that unique article page.
You know very well that param name 'articleID' you can get is as requesr.getParameter("articleID"); Note this is Object class.. change accordingly. or use request.getQueryString();