AW: [opencms-dev] OpenCMS and News 2.0 - URGENT

Mark Miller mark.miller at hema.ch
Mon Oct 20 12:00:05 CEST 2003


Are you sure it is not called
/default/vfs/system/modules/MyModule/templates/newsTemplate.jsp

rather than 

/default/vfs/system/modules/MyModule/templates/newsTemplate.

?

-----Ursprüngliche Nachricht-----
Von: opencms-dev-admin at opencms.org
[mailto:opencms-dev-admin at opencms.org] Im Auftrag von Trevor Lee
Gesendet: 20 October 2003 08:07
An: opencms-dev at opencms.org
Betreff: [opencms-dev] OpenCMS and News 2.0 - URGENT

Hi,

I'm just reposting this - as a matter of some urgency... if any one can
assist that would be great.

Thanks to Sarah and Paolo for your prompt responses.

I did what Sarah suggested and i am able to create and edit news items.
Thank you!

1. I've also edited the
/system/modules/com.opencms.modules.homepage.news/templates/NewsStandard
and
/system/modules/com.opencms.modules.homepage.news/templates/ChannelStand
ard
files to have:
<ELEMENTDEF name="frametemplate">
        <CLASS>com.opencms.template.CmsXmlTemplate</CLASS>
 
<TEMPLATE>/system/modules/MyModule/templates/newsTemplate</TEMPLATE>
</ELEMENTDEF>

However when i try to load
/system/moduledemos/com.opencms.modules.homepage.news/ChannelOverview.ht
ml,
I get the following error message:
[frametemplate] ??? com.opencms.core.CmsException: 2 Not found. Detailed
error: [com.opencms.file.mySql.CmsDbAccess]
/default/vfs/system/modules/MyModule/templates/newsTemplate.

newsTemplate is an empty file and is available in the offline project
view
not the online view.
What should i do?

2. I also tried modifying the <TEMPLATE></TEMPLATE> to point to a
published
xml template and on this ocasion I get a page that returns the header
and
footer as defined in the published xml template. No news item is
displayed
when ChannelOverview is loaded.
What do i do?


3. I've followed the instructions in NewsHack/readme.rtf and created a
/systems/modules/pages directory where news.jsp, news-nav.jsp and
NewsItem.jsp reside.
The only line i changed in my news.jsp is as follows:
out.print("<p><a
href=\"/system/modules/pages/NewsItem.jsp?id="+newsItem.getID()+"\">"+ne
wsIt
em.getHeadline()+"</a></p>");
Is the above correct? Do i need to change the other two files?


4. The other thing i'm confused about is how the instructions in
NewsHack/readme.rtf (part of news-stuff.zip) relates to the moduledemo.
I'm
trying to write a page that retrieves the current articles and
subsequently
displaying messages users selects on.
How should i do this? Is there a file that gives an example of this?


5. I've created a file -
/system/modules/MyModule/jsptemplates/default_news.jsp that contains:
<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<!doctype html public "-//W3C//DTD HTML 4.01 Translational//EN">
<html>
<head>

<title><cms:property name="title" escapeHtml="true" /></title>

<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" />
<!-- Test News -->
<h1>News</h1>
<cms:include file="/system/modules/pages/news.jsp">
   <cms:param name="id">1</cms:param>
</cms:include>
</div>

</body>
</html>

The above file generates the following error:
javax.servlet.ServletException: Resource loader error in file
'/system/modules/MyModule/jsptemplates/default_news.jsp'
Root cause:
org.apache.jasper.JasperException: FlexDispatcher: Dectected inclusion
loop
for target /system/modules/MyModule/jsptemplates/default_news.jsp
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:2
48)
		:
		:
		:

What does the "Detected inclusion loop for target" mean?

6. Can i use "default_news.jsp" as the "template" property in my own jsp
files related to displaying news items?

My apologies if the questions seem stupid, as i am new to opencms and
content management in general. It's all abit overwhelming.

I just basically need help to get the news module going, so i can view
articles and have something to start on.

Thank you in advance for any help you can give.

Cheers

Trevor

_______________________________________________
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