Hi,
I want to know how can I get the value of the request parameters "j_username" and "j_password"?
After successfully login using form based authentication, I want my servlet to get the value of parameters "j_username" and "j_password", but I'm getting null as the value in both parameters. Could anyone please tell me how can I get the actual value of both paramters?
Servlets class :
package foo;
import javax.servlet.http.*;
import javax.servlet.*;
public class RequestHandler extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)
{
try
{
String user = request.getParameter("j_username");
String password = request.getParameter("j_password");
response.getWriter().println(user+" "+password);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
output: null null