[opencms-dev] some exceptions in the dev-doc examples

Manfred Pruntsch manfred.pruntsch at ifcos.com
Wed Mar 6 23:49:09 CET 2002


Hi everybody,

I'm playing around with the examples in the documentation.
I met some exceptions.

1) Chapter 2, module development, method tag, page 79/80
Example 9:
      ...
	{"spider","eagle","lion","cheetah","scorpion","snake"};
      CmsXmlTemplateFile template = (CmsXmlTemplate)doc;
      String list = "";
    for (int i=0; i < animals.length; i++) {
	...
"CmsExample9.java": Error #: 364 : cannot cast
com.opencms.template.A_CmsXmlContent to com.opencms.template.CmsXmlTemplate
at...

2) Chapter 2, example using session management, page 105/106
    //get the query string from the link
    colorValue =
""+((HttpServletRequest)cms.getRequestContext().getRequest().
      getOriginalRequest()).getQueryString();

"CmsExample23.java": Error #: 300 : class HttpServletRequest not found in
class com.opencms.template.CmsExample23 at line 30, column 23

3)  Chapter 2, session history, page 108/109
the same as above:
    //get query string from link
    colorValue =""+((HttpServletRequest)cms.getRequestContext()
      .getRequest().getOriginalRequest()).getQueryString();

"CmsExample25.java": Error #: 300 : class HttpServletRequest not found in
class com.opencms.template.CmsExample25 at line 32, column 22

The following packages were imported:
import com.opencms.template.*;
import com.opencms.file.*;
import com.opencms.core.*;
import java.util.*;

Under 'required libraries' I've entered opencms.jar in the web-inf/oclib
dir.
Any ideas?

Manfred

----------------------------------------------
IFCOS Institut für Zell- und Organsimulation GmbH
Friedrich-Barnewitz-Strasse 3
18119 Rostock
phone: +49 (0)381.5196-190
fax: +49 (0)381.5196-137
email: manfred.pruntsch at ifcos.com




More information about the opencms-dev mailing list