File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes URLConnection and form based authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "URLConnection and form based authentication" Watch "URLConnection and form based authentication" New topic

URLConnection and form based authentication

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I cannot get this to work. It works for all other sites besides ones that have j_username & j_password. It always comes back to the login page. I see other messageboards via google that have the same problem, but there is no answer.

<form method="POST" action='/cpvs/login' >
<input type="hidden" name="auth" value="securid" />
<table border="0" cellspacing="5">
<th align="right">Username:</th>
<td align="left"><input type="text" name="j_username"></td>
<th align="right">Password:</th>
<td align="left"><input type="password" name="j_password" ></td>
<td align="right"><input type="submit" value="Log In" name="login" ></td>
<td align="left"><input type="reset"></td>
I agree. Here's the link:
subject: URLConnection and form based authentication
jQuery in Action, 3rd edition