File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how can i hide the login in the url. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how can i hide the login in the url." Watch "how can i hide the login in the url." New topic
Author

how can i hide the login in the url.

jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
i got a code in my search page:
whcih is displaying the names found in the search:
<table align="center" border="1" width="400">
<td bgcolor="#FFFFCC"><a href ="my_page.jsp?user_login=<%=user_login%>" > <%=fname+" "+lname %></a></td>
<td bgcolor="#FFFFCC"><%=Desg%></td>
</table>
but iam not using any forms .
how do i make sure that the user_login is not displayed in the next page.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
If you put the data in the query string, it is a GET method. With this method, you CANNOT hide the query string at the next page.
If you really wanna hide it, I guess the best way is to use a FORM and submit it using POST method, not GET method.
Nick.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
tkx for the reply ..bt how can i use a form in this..iam not making the user submit anything..here..the user just clicks in the name found on search and goes to the page that shows that particular users records..
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
I just give you the outline, and below is not the exact codes.
You have a JavaScript, say, validate()

For the hyperlink part:

I forget how to invoke the JS in the onClick attribute, you need to check it. Then, when the user clicks the link, the validate will be called, and it will further call the form1 to submit, and thus, you can do the POST method.
Nick.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Please notice that the [on click] in fact should be onClick, but I dont know why, when I use onClick, the server disallow me to send the post.
Anyway, hope this help.
Nick.
jyotsana dang
Ranch Hand

Joined: Sep 26, 2003
Posts: 135
Thanks Nicholas..
will try this one out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i hide the login in the url.