[opencms-dev] Web User Authentication Failing

Millo Magnocavallo millo_magno at yahoo.com
Wed Sep 15 23:16:36 CEST 2004


Don't worry, have this sorted now.

Was testing this on the same browser that I was running the opencms
system and I was already logged in as Admin.

When I tried on opera which wasn't logged into opencms (and therefore
capable of being considered a web user) then it worked.

something to watch out for.
m



 --- Millo Magnocavallo <millo_magno at yahoo.com> wrote: 
> Hi,
> 
> I've got my registration page working and saving data to the db using
> CmsObject.addWebUser() method but I'm having problems with the page
> which authenticates user logins. I've cut the code down to the very
> basic in order to test and also to demonstrate here but it seems that
> it's the cmsObj.loginWebUser(user,pass) method which keeps throwing a
> nullpointer exception but i don't know why. Can anyone give me any
> clues? Here is the code with hardcode values for testing: 
> 
> <%@ page session="false" %>
> <%
> 	com.opencms.flex.jsp.CmsJspActionElement cmsJspAE = new
> com.opencms.flex.jsp.CmsJspActionElement(pageContext, request,
> response);
> 	com.opencms.file.CmsObject cmsObj = new
> com.opencms.file.CmsObject();
> 	
> 	// hard coded - these values definitely exist in db
> 	String user = "johnny"; 
> 	String pass = "johnny";
> 	
> 	if (request.getMethod().equals("POST")) {
> 		try {
> 			cmsObj.loginWebUser(user,pass);
> 		} catch (com.opencms.core.CmsException cmsE) {
> 			out.print(cmsE.getMessage());
> 		}
> 	}
> %>
> 
> Any help appreciated,
> Thanks,
> Millo
> 
> 
> 
> 
> 
> _______________________________________________
> 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