Hello All,
I am trying to follow Hello World 2 Tutorial. I added News.ftl, Sports.ftl,
Weather.ftl, Horoscope.ftl
I am getting Following error.
************************************************************
Error:
org.ofbiz.webapp.control.RequestHandlerException: Unknown request [news];
this request does not exist or cannot be called directly.
************************************************************
************************************************************
Following is my conrtoller.xml
**********************************************************
<?xml version="1.0" encoding="UTF-8" ?>
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd">
<description>Second Hello World Site Configuration File</description>
<owner>Open For Business Project (c) 2005 </owner>
<errorpage>/error/error.jsp</errorpage>
<handler name="java" type="request"
class="org.ofbiz.webapp.event.JavaEventHandler"/>
<handler name="soap" type="request"
class="org.ofbiz.webapp.event.SOAPEventHandler"/>
<handler name="service" type="request"
class="org.ofbiz.webapp.event.ServiceEventHandler"/>
<handler name="service-multi" type="request"
class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>
<handler name="simple" type="request"
class="org.ofbiz.webapp.event.SimpleEventHandler"/>
<handler name="ftl" type="view"
class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
<handler name="jsp" type="view"
class="org.ofbiz.webapp.view.JspViewHandler"/>
<handler name="screen" type="view"
class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
<handler name="http" type="view"
class="org.ofbiz.webapp.view.HttpViewHandler"/>
<preprocessor>
<!-- Events to run on every request before security (chains exempt) -->
<!-- <event type="java" path="org.ofbiz.webapp.event.TestEvent"
invoke="test"/> -->
<event type="java" path="org.ofbiz.securityext.login.LoginEvents"
invoke="checkExternalLoginKey"/>
</preprocessor>
<postprocessor>
<!-- Events to run on every request after all other processing (chains
exempt) -->
<!-- <event type="java" path="org.ofbiz.webapp.event.TestEvent"
invoke="test"/> -->
</postprocessor>
<!-- Request Mappings -->
<request-map uri="main">
<response name="success" type="view" value="main"/>
</request-map>
<!-- end of request mappings -->
<!-- View Mappings -->
<view-map name="error" type="jsp" page="/error/error.jsp"/>
<view-map name="main" type="screen"
page="component://hello2/widget/HelloScreens.xml#main"/>
<view-map name="news" type="screen"
page="component://hello2/widget/HelloScreens.xml#news"/>
<view-map name="weather" type="screen"
page="component://hello2/widget/HelloScreens.xml#wheather"/>
<view-map name="sports" type="screen"
page="component://hello2/widget/HelloScreens.xml#sports"/>
<view-map name="horoscope" type="screen"
page="component://hello2/widget/HelloScreens.xml#horoscope"/>
<!-- end of view mappings -->
</site-conf>
****************************************************************************************
And Following is my header.ftl
****************************************************************************************
<html>
<head>
<link rel="stylesheet" href="../images/main.css" type="text/css">
<title>Second Hello World!</title>
</head>
<body>
<p align = "right"> It is now
${Static["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}!</p>
"<@ofbizUrl /main</@ofbizUrl>">Main
"<@ofbizUrl /news</@ofbizUrl>">News
"<@ofbizUrl /sports</@ofbizUrl>">Sports
"<@ofbizUrl /weather</@ofbizUrl>">Weather
"<@ofbizUrl /horoscope</@ofbizUrl>">Horoscope
<hr>
*****************************************************************************************
And following is my HelloScreens.xml
****************************************************************************************
<?xml version="1.0" encoding="UTF-8"?>
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="
http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="main">
<section>
<widgets>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/header.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/main.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/footer.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="news">
<section>
<widgets>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/header.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/news.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/footer.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="wheather">
<section>
<widgets>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/header.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/wheather.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/footer.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="sports">
<section>
<widgets>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/header.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/sports.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/footer.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
<screen name="horoscope">
<section>
<widgets>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/header.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/horoscope.ftl"/></html></platform-specific>
<platform-specific><html><html-template
location="component://hello2/webapp/hello2/includes/footer.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
</screens>
**************************************************************************************
Thank you for the help in advance!
--
View this message in context:
http://www.nabble.com/Error%3A-RequestHandlerException-tp24291782p24291782.html
Sent from the OFBiz - User mailing list archive at Nabble.com.