This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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
It's not a secret anymore!