Custom Login Page

From OpenCms Wiki
Revision as of 00:05, 11 June 2007 by Ip8Riy (Talk | contribs)
Jump to: navigation, search

cheap diazepam cheap xenical nokia ringtones qwest ringtones zanaflex online diazepam online verizon ringtones free motorola ringtones order lortab prozac online ericsson ringtones but ortho cheap cyclobenzaprine cheap celexa free ringtones phentermine free cool ringtones cheap prozac free qwest ringtones cialis online sprint ringtones nexium online real ringtones sagem ringtones tracfone ringtones free nokia ringtones free punk ringtones mp3 ringtones sony ringtones ativan online but hgh free midi ringtones alltel ringtones cheap flexeril sony ericsson ringtones motorola ringtones vicodin online free tracfone ringtones buy soma levitra online free motorola ringtones cheap didrex cheap sildenafil pharmacy online online zoloft online hydrocodone online free sony ringtones cingular ringtones viagra buy paxil ambien online buy lortab order hydrocodone vigrx online cheap ativan hgh online sildenafil online buy viagra ortho online nextel ringtones lisinopril free funny ringtones free sony ericsson ringtones buy vicodin hydrocodone order ativan mono ringtones clonazepam levitra free sprint ringtones cialis online sony ringtones cheap levitra zanaflex online phentermine celexa online ultracet online wwe ringtones free sharp ringtones buy norco soma online cheap ultracet free cingular ringtones cheap adipex cheap xenical cheap albuterol cheap tenuate cheap ortho free music ringtones sagem ringtones cheap lisinopril meridia online cheap propecia cheap vigrx cheap diethylpropion cheap albuterol mp3 ringtones meridia online free ringtones cheap ultram soma online cheap lortab cheap sildenafil free nextel ringtones cheap lorazepam free funny ringtones diethylpropion online free ringtones funny ringtones cingular ringtones cheap soma nokia ringtones clonazepam online zyban online clomid online buy prozac online valium order lisinopril meridia online buy tramadol sharp ringtones free midi ringtones flexeril online real ringtones celexa online zoloft online free nextel ringtones ericsson ringtones free music ringtones mtv ringtones order ultram buy valium viagra online lorazepam online cheap cialis cheap phentermine buy nexium samsung ringtones cheap norco meridia online sprint ringtones buy rivotril order carisoprodol carisoprodol online cyclobenzaprine online free qwest ringtones free qwest ringtones cheap fioricet verizon ringtones punk ringtones cheap hoodia pharmacy online online tracfone ringtones tramadol cheap rivotril tramadol online didrex online cheap fioricet music ringtones cheap albuterol free nokia ringtones buy viagra buy alprazolam buy xenical pharmacy online online free funny ringtones order zanaflex free ericsson ringtones cyclobenzaprine online adipex online cheap xanax free alltel ringtones free qwest ringtones ultram online sonyericsson ringtones free samsung ringtones cheap lortab free mono ringtones free samsung ringtones zyban online cheap celexa free funny ringtones wwe ringtones cheap rivotril but clomid buy fioricet buy hgh cheap lipitor cheap hoodia clonazepam online cool ringtones tenuate online cheap vicodin real ringtones free sonyericsson ringtones buy hoodia buy tramadol nextel ringtones cheap alprazolam ambien online == Frontend login == A usual requirement for extension is to add an additional login form that allows for "frontend login". Frontend login means, that a user can login directly on the website without being brought to the OpenCms workplace. This is usually combined with Frontend Editing, where the user can edit pages directly from the website view, without having to enter the workplace.

A login form for this purpose will ask for login information, log the user into the system and bring him or her back to the page where they were before.


Sample Jsp Login File

The following JSP file will ask a user to log in.

If the form is submitted, the JSP code will attempt to log the user into the system. If that has been successful, the current project of that user is set to the "Offline" project and the site of the user is set to the default site ("/sites/default"). If all of this has been successful the user will be directed to a URL which was handed over to the login form by a URL parameter called url. If such a parameter was not handed over to the login form, then the user will be redirected to the index page.

frontendlogin.jsp

<%@ 
  page session="true" 
  import="org.opencms.main.*, org.opencms.jsp.*,org.opencms.file.*, java.lang.String" 
%><%
        CmsJspActionElement cms = new CmsJspActionElement(pageContext,request,response);
 
        String user = request.getParameter("user");
        String password = request.getParameter("password");
        String url = request.getParameter("url");
 
        if( url==null || url.length()==0 || url.equalsIgnoreCase("null") )
          url = "/index.html";
 
        boolean loginFailed = false;
 
        //form was submitted => try to log in and redirect to given URl
        if((user!=null)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox