Hide or not show url value
I have a JSP web page that is redirected from another non Java web
site where I fetch the parameter from the non Java web site and put it
in the JSP web page. It works great but the value shows up in my JSP
url on Tomcat 6.0.18 located on a Windows server.
The problem is I dont want the parameter value showing up in the url.
The redirected parameter value shows in my JSP url like this:
http://mydomain/mysite.jsp?myvalue=jones
I want to hide or not show the myvalue=jones part of the url so it
shows up like this:
http://mydomain/mysite.jsp
Here is how I am fetching the parameter:
The redirect from a non java page goes to a servlet:
package projectOne;
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class ProjectServlet extends HttpServlet {
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
String myvalue = request.getParameter("myvalue");
request.setAttribute("myvalue", myvalue);
request.getRequestDispatcher("/mysite.jsp").forward
(request,response);
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
}
I capture the value in the mysite.jsp and it works great but
unfortunately shows the value also in the url:
<%= request.getAttribute("myvalue") %>