wood burning stoves 2.0*
The moose likes JSP and the fly likes How to Pass, Username and password and Login from 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 to Pass, Username and password and Login from the url" Watch "How to Pass, Username and password and Login from the url" New topic
Author

How to Pass, Username and password and Login from the url

sandesh test
Greenhorn

Joined: Dec 20, 2011
Posts: 2
I tried https://portal.testsan.com/FortressLogin/Login?Email=username&password=password&Submit=Log/In

But did not work... Please help
Below is the page source


<FORM name=loginForm action="/FortressLogin/Login" onsubmit="return rememberTheUser();" method=post>
<TABLE cellSpacing=0 cellPadding=0 width=270 border=0>
<TR>
<TD align="right" width="100"><A
class=logintd style="align:right;">Username:</A>  </TD>

<TD width="170"><INPUT class=inputTypeClass id=username size=25
name=EMail autocomplete="OFF" autofocus="autofocus"> </TD>
</TR>
<TR>
<TD align="right" height="54" width="100"><A
class=logintd style="align:right;">Password:</A>  </TD>
<TD width="170"><INPUT class=inputTypeClass id=password type=password size=25
name=Password autocomplete="OFF"> </TD>
</TR>
<TR valign="top">

<TD align="right" width="100">
<TD width="170">
<a href="/forgotPasswd" class=logintd >Forgot your Password <img src="/resources/bcImages/QuestionMark.png" width=13 style="border:none;"/></a>
</TD>
</TR>
<TR>
<TD colspan=2 width="100%">
   ---------------------------------------------
</TD>

</TR>

<TR>
<TD colspan=2 width="100%">
<Table width="100%">
<TD align=right valign="top">
<INPUT id=rememberMe type=checkbox name=rememberMe>
</td>
<td>

<A class=logintd>
<b>Remember Me</b><br/>
[Uncheck if on a shared computer]
</A>
</TD>
</TABLE>
</TD>
</TR>

<TR>

<TD colspan=2 width="100%">
   ---------------------------------------------<br/>
</TD>
</TR>

<TR>
<TD vAlign=bottom align=right colSpan=2 style="padding-top:11px;" ><STRONG><INPUT style="FONT-SIZE: 11px" type=submit value=" Log In " name=submit></STRONG>
       </TD>
</TR>
B. Katz
Ranch Hand

Joined: Aug 28, 2009
Posts: 51

Greetings,

I'm not sure about pulling the password as well, but you should be able to get the username from just:


As a question, are you doing this on Tomcat?

And, is that slash at the end of your URL supposed to be there or is that just a typo?

HTH. Let us know.


"I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use."
-- Galileo Galilei
sandesh test
Greenhorn

Joined: Dec 20, 2011
Posts: 2
Hi,
I am using a link testing tool called XENU.
To check the broken links of a site we need to pass the login username and password in the url as a post request.
I am not sure about the internals as I am a tester.
Yes, Its a tomcat server.
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Just some input which might hopefully clear your situation.

In your form you are using method as post. Then isn't the username and password going to go in the post body?
So if you are trying to get these parameters from the query string itself isn't that not going to work?

Further, you really shouldn't include sensitive information such as a password in the URL even if you are using https. What if somebody is shoulder browsing?
And browser might be storing this as history information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Pass, Username and password and Login from the url