RES: [opencms-dev] NullPointerException in include tag with html page

rvc_one at mizar.com.br rvc_one at mizar.com.br
Mon Mar 7 06:20:10 CET 2005


Hi people,

  The problem has already solved. Now (v. 6 beta1) is necessary to specify
the element to be included (look at line4):

1) <%@ page session="false" import="org.opencms.jsp.*" %>
2) <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
3) <cms:include property="template" element="head" />
4)    <cms:include page="box_links.html" element="body"/>
5) <cms:include property="template" element="foot" />

-----Mensagem original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
Em nome de rvc_one at mizar.com.br
Enviada em: segunda-feira, 7 de março de 2005 00:29
Para: 'The OpenCms mailing list'
Assunto: [opencms-dev] NullPointerException in include tag with html page

Hi all,

  I'm trying to include a html page in a jsp file just like a portlet. But
when i put the following include tag (line 4) in the jsp bellow, the
following exception occurs. When I point the include tag to another jsp file
it works well.

Thanks in advance,

Rommel

Environment
-------------------
  Operating System: Windows XP SP2 (5.1 build 2600)
  Database: MySQL 4.0.18
  App Server: Tomcat 4.1.31
  JDK: 1.4.2_03-b02

JSP file
---------------------
1) <%@ page session="false"
import="java.util.*,java.sql.*,org.opencms.jsp.*" %>
2) <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
3) <cms:include property="template" element="head" />
4)    <cms:include page="box_links.html" />
5) <cms:include property="template" element="foot" />

Exception occurred
--------------------------
java.lang.NullPointerException
at org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:138)
at org.opencms.xml.A_CmsXmlDocument.getLocales(A_CmsXmlDocument.java:214)
at org.opencms.loader.CmsXmlPageLoader.service(CmsXmlPageLoader.java:205)
at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava:293)
at
org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:210)
at org.opencms.jsp.CmsJspTagInclude.doEndTag(CmsJspTagInclude.java:344)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
62)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
......




_______________________________________________
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