[opencms-dev] NewsHack.zip Help!!!!

Trevor Lee Trevor.Lee at 4Loop.com.au
Wed Oct 22 02:46:01 CEST 2003


Hi,

I've installed the new News Module 2.1 and noticed the following:

1. When adding a new item the Release and Expire Dates are "0000-00-00" for
the item even though the dates entered when creating the item are valid.

2. When editing a news item, the release and expire dates are always
"0000-00-00" and you can't update this.

4. Is there a way to change the locale so that it's not US by default when
displaying the dates?

5. I've copied news.jsp to the root directory of my site. I've also created
another jsp file called myNews.jsp in the root directory of my site that
contains the contents of jsptemplate_include.txt.
Could you please explain the significance of index.html in the file?

6. Is there a javadoc for the new classes (Eg NewsContentDefinition) that
describes the methods and objects contained?

7. When I run myNews.jsp, I get the following error message....
Root cause:
org.apache.jasper.JasperException: FlexDispatcher: Dectected inclusion loop
for target /myProj/myNews.jsp
Any ideas? I seem to get this alot....
Is there a general fix or things to consider?

Here's the contents of myNews.jsp:
<%@ page session="false" import="java.util.*, com.opencms.flex.jsp.*"
%><?xml version="1.0" encoding="UTF-8"?>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=<cms:property
name="content-encoding" default="ISO-8859-1" />">
</head>
<body>
<!-- Begin Page Content -->
<div id="content">
<cms:include element="body" />
<%
  java.util.HashMap includeParameters = new java.util.HashMap();

  com.opencms.flex.jsp.CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
  String filename = cms.getRequestContext().getUri();
//  if (filename.equals("/news.html")) {
      includeParameters.clear();
      includeParameters.put("channel", "30");
      out.print("<table width=\"100%\"
border=\"0\"><tr><td><h2>News</h2></td><td></td></tr>");
      out.print("<tr><td valign=\"top\">");
      cms.include("/myProj/news.jsp",null,includeParameters);
      out.print("</td><td valign=\"top\">");
      out.print("</td></tr></table>");
//  }
%>
</div>
</body>
</html>


Cheers
Trevor





More information about the opencms-dev mailing list