[opencms-dev] Export problem

Thomas März thomasmaerz at gmx.de
Mon Jun 23 08:57:02 CEST 2003


"Ivan Jelenic" <ivan.jelenic at nbs.yu> writes:
> I am using JSP template and I have problem with this fragment of my code:
>
> Vector users = cmsObject.getUsers();
> String author = "";
> for (int i=0; i < users.size(); i++) {
>  CmsUser user = (CmsUser) users.elementAt(i);
>  if (user.getName().equals(authorId)) {
>   author = author + user.getFirstname() + " " + user.getLastname();
>  }
> }
>
> After publishing I've got this:
>
> javax.servlet.ServletException: Resource loader error in file '/system/modules/org.opencms.default/jsptemplates/JSPtemplate.jsp'
>
> Root cause:
> org.apache.jasper.JasperException: com.opencms.core.CmsException: [com.opencms.file.mySql.CmsResourceBroker] Guest

> Does anyone has a good idea what's wrong?

Login as Admin-User before executing the code; see the method
CmsObject.loginUser(String username, String password). This is needed
because a Guest-User mustn't use these methods.

Best Regards,
Thomas März




More information about the opencms-dev mailing list