tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <rashmi....@gmail.com>
Subject Re: NullPointerException with Parameters.getParameterValues(String)
Date Tue, 10 Apr 2007 05:23:14 GMT
>From looking at the following snippet I assume that username, password
and logout are initialized as in:

String username ="username";
String password ="password";
String logout="logout";

If the above are not initialized then you would get NPE.

On 4/9/07, Rahul Thakur <rahul.thakur.xdev@gmail.com> wrote:

>
>             username = pageContext.getRequest ().getParameter (username);
>             System.out.println ("param : 'username' , value: '" +
> username + "'");
>             password = pageContext.getRequest ().getParameter (password);
>             System.out.println ("param : 'password' , value: '" +
> password + "'");
>             logout = pageContext.getRequest ().getParameter (logout);
>             System.out.println ("param : 'logout' , value: '" + logout + "'");
>

Another point is that the form doesn't have a submit button, but a
Javascript based submit

<a href="javascript:
document.loginform.submit ();" onmousedown="changeImage ('btn_login',
'/admin/img/login/login_button_d.gif');" onmouseup="restoreImage
('btn_login');" onmouseout="restoreImage ('btn_login');"><img
name="btn_login" src="/admin/img/login/login_button_u.gif"
border=0></a>

, does the Javascript code properly submit the values? You could try
temporarily replacing it with a html submit button within the form, if
the issue still persists.

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message