[opencms-dev] Can't find params in request object
Philip
subp at wachtel.us
Mon Jul 26 13:47:02 CEST 2004
Hi there,
For some reason, I can't find the parameters from a form that I'm testing in
my request object.
I'm accessing the request object in my template and using the template for
an html file.
The only parameters that I can find in the request object are:
element: _flex_export_body
element: _flex_export
element: _flex_export_encoding
It doesn't seem to matter whether this page is being submitted to or not, I
get only those params.
---------------Here's the code:
<%
// create a JSP action element
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
CmsObject cmsObject = cms.getCmsObject();
out.println(request.getParameter("login")); // this produces null, no
matter what
Enumeration params = request.getParameterNames();
while (params.hasMoreElements()) {
out.println("element: " + params.nextElement() + "<br/>");
}
if (request.getParameter("login") != null) { //This block is never run
as the param is always null
//out.println("It was not null!");
String username = request.getParameter("username");
String password = request.getParameter("password");
out.println("About to log user in with " + username + " " +
password);
if (username != null && password != null)
cmsObject.loginUser(username, password);
}
%>
---------------End of code
I'm using OpenCMS 5.0.1 on Redhat 7.3
If anyone has any thoughts, I'd really appreciate it.
Thanks!
Philip
More information about the opencms-dev
mailing list