[opencms-dev] Problem with scriptlets

Alexander Langer al at al-arenal.de
Wed Jul 9 20:11:01 CEST 2003


The Code

<jsp:useBean id="cms" class="com.opencms.flex.jsp.CmsJspActionElement">
<% cms.init(pageContext, request, response); %>
</jsp:useBean>

in my OpenCMS jsp (taken from the scriptlet documentation) seems to do
nothing at all. The resulting jsp in my filesystem which gets executed
by tomcat shows no difference, no additional code, nothing.

So it's okay, that java can't resolve the symbol 'cms', but what is
going wrong and how am I gonna get this to work?


> Nope.. had the <%! %> around my code and just forgot to paste it into
> my mail.

>> Try this...

>> -----
>> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>> <jsp:useBean id="cms" class="com.opencms.flex.jsp.CmsJspActionElement" />

>> <%
>> private String Punkt() {
>>   com.opencms.flex.jsp.CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response);
>>   String title = cms.property("Title");

>>   return title;
>> }
%>>>
>> -----



>> Alexander Langer wrote:

>>>Hi!
>>>
>>>I'm still new to JSP and got a problem. My JSP looks something like
>>>this:
>>>
>>>-----
>>><%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>>><jsp:useBean id="cms" class="com.opencms.flex.jsp.CmsJspActionElement" />
>>>
>>>private String Punkt() {
>>>  com.opencms.flex.jsp.CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response);
>>>  String title = cms.property("Title");
>>>
>>>  return title;
>>>}
>>>-----
>>>
>>>It gets include by a template to do some stuff. Problem is, I get this
>>>error:
>>>
>>>-----
>>>Generated servlet error:
>>>    [javac] Since fork is true, ignoring compiler setting.
>>>    [javac] Compiling 1 source file
>>>    [javac] Since fork is true, ignoring compiler setting.
>>>    [javac] /opt/tomcat/work/Standalone/localhost/opencms/WEB-INF/jsp/online/system/modules/org.leaderspoint.site/jsptemplates/test_jsp_jsp.java:72: cannot resolve symbol
>>>    [javac] symbol  : class CmsJspActionElement 
>>>    [javac] location: class org.apache.jsp.test_jsp_jsp
>>>    [javac]   com.opencms.flex.jsp.CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); 
>>>    [javac]   
>>>-----
>>>    
>>>I just used the code from the documentation, so didn't expect any
>>>problems here.
>>>    
>>>al
>>>  
>>>

>> _______________________________________________
>> 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



> al




al

-- 
Alexander Langer
homepage: http://www.al-arenal.de
mailto: langer at al-arenal.de





More information about the opencms-dev mailing list