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

Cyrill Brunschwiler cbrunsch at hsr.ch
Tue Jul 27 15:32:02 CEST 2004


Hi Philip

Set a propety named export to false. The export and caching features of 
opencms are explained in the documentation. You should take a quick
glance at the paper!

regards,
Cyrill

On Monday 26 July 2004 12.06, Philip wrote:
> Ok,
>
> The reason it wasn't working is because my page was an .html page.  So,
> even though the page was created with a template that had dynamic elements
> in it, it wasn’t actually dynamic because it was exported as an .html flat
> file.
>
> Now I know what's going on, but I still need a "best practice" for the
> solution.
>
> Basically, I want to have a login process that is included in the template.
> So, there'll either be a message like:
> "You are logged in as Joe"
>
> Or, if guest is logged in, just display a login/password form.  I had the
> login logic in my template, but since the file is actually exported as an
> .html file, it obviously can't do anything dynamic.
>
> So, do I have to make all of my pages .jsp pages, or is there a better way?
> Ultimately, I want to implement some degree of access control over which
> pages can be viewed by Guest and which pages can be viewed only by
> logged-in users.
>
> Thanks again for your help.
>
> Regards,
> Philip
>
> -----Original Message-----
> From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
> On Behalf Of Arian Abrahantes Quintana
> Sent: Monday, July 26, 2004 3:45 PM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Can't find params in request object
>
> 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
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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