[opencms-dev] Login issues

KDK kkhipple at gmail.com
Sat Aug 27 10:49:45 CEST 2005


Alex

I was wondering if you could help me debug this.  Here is the URL
http://64.34.105.84/opencms/opencms/English/Login/

I tried inserting your code and this is how my index.html page looks



<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ page import="org.opencms.jsp.*, org.opencms.file.*,
org.opencms.mail.*, java.util.*, java.text.*,
org.opencms.jsp.CmsJspLoginBean.*" %>

<% 
  CmsJspActionElement cms = new CmsJspActionElement(pageContext,
request, response);
  
  CmsJspLoginBean cmsLogin = new CmsJspLoginBean(pageContext, request,
response);

  String locale = cms.property("locale", "search"); 				// language - EN/FR
  String sectionMain = cms.property("sectionMain", "search"); 			//
main section user is in
  String sectionSub = cms.property("sectionSub", "search"); 			// sub
section user is in
  CmsUser user =
(CmsUser)request.getSession().getAttribute("diva_user");	// DIVA
USERNAME

  String errMsg = request.getParameter("error");				// ERROR message

  if ( errMsg == null ) { errMsg = ""; } 


  if ( cmsLogin.isLoggedIn() )  { 
	response.sendRedirect( cms.link("login.html") );
  } 
%>


<!--- template  --->



anything you can suggset?


On 8/26/05, Alexander Wallace <aw at avatartechnology.com> wrote:
> try this:
> 
> <%@ page import="org.opencms.jsp.CmsJspLoginBean" %>
> CmsJspLoginBean cmsLogin = new CmsJspLoginBean(pageContext, request,
> response);
> if (cmsLogin.isLoggedIn()) {
> 
> }
> 
> hope it helps...
> 
> On Friday 26 August 2005 02:52 pm, KDK wrote:
> > I'm currently developing a website that is having problems with the
> > login feature.
> >
> > User visits index.html and logs in.
> > Gets redirected to login.html
> >
> > However if a user clicsk on index.html again, they are shown the login form.
> >
> > Even though I have code to check it the user exists
> >
> > <% if (user != null) {  %>
> >
> > // perform redirect
> >
> > <% } %>
> >
> >
> > This does not seem to work. Can anyone help me out ?
> >
> >
> > _______________________________________________
> > 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