[opencms-dev] CmsTemplateBean cannot be resolved to a type

Christian Steinert christian_steinert at web.de
Tue Jul 11 22:13:55 CEST 2006


> -----Ursprüngliche Nachricht-----
> Von: The OpenCms mailing list <opencms-dev at opencms.org>
> Gesendet: 11.07.06 19:21:49
> An: opencms-dev at opencms.org
> Betreff: [opencms-dev] CmsTemplateBean cannot be resolved to a type

Hi,

If you use a class, then you also have to import the package of this class.
Otherwise, how would the compiler know, which class you actually use? At least in theory there could be dozens of classes with the same name in different packages and you don't want the compiler to play guessing games on your code, do you? ;-)

If my google search brought up the right class then this would either be:
   <%@page import="org.opencms.frontend.templateone.*" %>

or - if you want to be more specific you can also do 
   <%@page import="org.opencms.frontend.templateone.CmsTemplateBean" %>

hth
christian

> Hello everybody!!
> 
> We're trying to use the examples from the 
> org.opencms.frontend.templateone, in order to create a new module.
> After the modifications for adapting the files to our new module, we've 
> launched the /system/modules/es.alcatelmsd.aww/templates/main that 
> starts with: <%@page buffer="none" session="false" import="java.util.*, 
> es.alcatelmsd.aww.*" %><%
> 
> // initialize action element to access the API
> CmsTemplateBean cms = new CmsTemplateBean(pageContext, request, response);
> 
> if (cms.template("head")) {
>    
>     String resPath = cms.getResourcePath();
>    
>     // fill property Map with parameters for included navigation elements
>     cms.putNavigationProperties();   
>    
>     String headImgUri = "";
>     String headImgHeight = "";
>     String headImgLinkHeight = "0";
> 
> 
> But it fails at the first line saying:
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> An error occurred at line: 1 in the jsp file: 
> /WEB-INF/jsp/offline/system/modules/es.alcatelmsd.aww/templates/main.jsp
> Generated servlet error:
> CmsTemplateBean cannot be resolved to a type
> 
> 
> Any idea about this problem?
> 
> Thanks and best regards,
> Maria
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193




More information about the opencms-dev mailing list