[opencms-dev] Can't find params in request object

Arian Abrahantes Quintana Arian.Abrahantes.Quintana at cern.ch
Mon Jul 26 15:47:01 CEST 2004


Hi,

First of all, I am beginner. So... When I am working on the workplace 
session, I also had this kind of problem. Seems to be that there is some 
interference when the workplace session is open and the method 
"request.getParameter" is called (at least for login, username, password 
and logout) but it vanishes as soon as I am loged out of the workplace 
session.

hope this help or heat the forum ;)

best regards,

arian

Philip wrote:

>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
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>  
>





More information about the opencms-dev mailing list