File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Hide the variable name and values in url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Hide the variable name and values in url " Watch "Hide the variable name and values in url " New topic
Author

Hide the variable name and values in url

S Kalai
Greenhorn

Joined: Jun 26, 2007
Posts: 2
Hi,
In jsp the resultant values are display from the bean.
<logic:iterate id="customer" name="custList">
<td> <bean:write name="customer" property="customerId" /></td>
<td> <html:link action="editCustomer.do?do=editCustomer"
paramName="customer" paramProperty="customerId"
paramId="customerId">
<bean:write name="customer" property="customerName" />
</html:link> </td>
</logic: iterate>
In that resultant page the customerId and names are displayed.While cilcking the customername the customer details are edited. In that time in webbrowser url shows with Id.
http://localhost:8080/CRM_WebApp/editCustomer.do?do=editCustomer&customerId=5
How can i set the variables invisible in url?

Thanks in Advance.
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
change your request into a post request in which the parameters are not shown in the header but in the body of the request.

I understand that you're using Struts. You could put your link in a form element and define the form method as post.

The following link may help you

form submission using struts link tag


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hide the variable name and values in url