File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF1.1 and shale-tiles-1.0.4 integration problem

 
amsha Kumar
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get shale-tiles-1.0.4 work with JSF 1.1.

These are the steps that I have followed

I have included shale-core-1.0.4.jar and shale-tiles-1.0.4.jar in /WEB-INF/lib

I have included the following entry in web.xml

<servlet>
<servlet-name>Tiles Servlet</servlet-name>
<servlet-class>org.apache.tiles.servlets.TilesServlet;/servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml;/param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<context-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml;/param-value>
</context-param>
<listener>
<listener-class>
org.apache.tiles.listener.TilesListener
</listener-class>
</listener>

My tiles-defs.xml:
<tiles-definitions>
<definition name="/siteMainLayout" path="/tiles/layout.jsp";>
<put name="header" value="/tiles/header.jsp";/>
<put name="menu" value="/tiles/menu.jsp";/>
<put name="content" value=""/>
</definition>

<definition name="/systemLogon" extends="/siteMainLayout">
<put name="content" type="template" value="/welcome.jsp";/>
</definition>

<definition name="/systemChangePwd" extends="/siteMainLayout">
<put name="content" type="template" value="/application/changePassword.jsp";/>
</definition>

<definition name="/systemMain" extends="/siteMainLayout">
<put name="content" type="template" value="/application/mainPage.jsp";/>
</definition>

<definition name="/systemFailue" extends="/siteMainLayout">
<put name="content" type="template" value="/failue.jsp";/>
</definition>

<definition name="/systemMain" extends="/siteMainLayout">
<put name="content" type="template" value="/application/mainPage.jsp";/>
</definition>

<definition name="/systemCancel" extends="/siteMainLayout">
<put name="content" type="template" value="/application/Misc.jsp";/>
</definition>
</tiles-definitions>

My layout.jsp:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>

<h:panelGrid columns="2">
<f:facet name="header">
<f:subview id="header">
<tiles:insert name="header" flush="false"/>
</f:subview>
</f:facet>
<f:subview id="menu">
<tiles:insert name="menu" flush="false"/>
</f:subview>
<f:subview id="content">
<tiles:insert name="content" flush="false"/>
</f:subview>

</h:panelGrid>

My faces-config.xml:

<faces-config xmlns="http://java.sun.com/JSF/Configuration">
<managed-bean>
<managed-bean-name>backing_Welcome</managed-bean-name>
<managed-bean-class>state.mn.mdh.mrc.login.Welcome;/managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<!--oracle-jdev-comment:managed-bean-jsp-link:1Welcome.jspx-->
</managed-bean>

<application>
<view-handler>
org.apache.shale.tiles.TilesViewHandler
</view-handler>
</application>

<navigation-rule>
<from-view-id>/systemLogon.jsp;/from-view-id>
<navigation-case>
<from-outcome>ChangePassword</from-outcome>
<to-view-id>/systemChangePwd</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>LoginSuccess</from-outcome>
<to-view-id>/systemMain</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>Others</from-outcome>
<to-view-id>/systemCancel</to-view-id>
<redirect/>
</navigation-case>
<navigation-case>
<from-outcome>Failure</from-outcome>
<to-view-id>/systemFailue</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>

My systemLogon.jsp:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>
<html>
<f:view>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
<title>System Logon</title>
</head>
<body>
<f:subview id="content">
<h:form>
<tiles:insert name="content" flush="false">
</tiles:insert>
</h:form>
</f:subview>
</body>
</f:view>
</html>

I am using OC4J server embedded with JDeveloper.

When I try http://10.21.31.170:8988/Test-ViewController-context-root/faces/systemLogon.jsp getting the page cannot be displayed error.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the 10.21.31.170:8988 home page, and then look for links to the information you want.
Click the Refresh button, or try again later.

Click Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer

--------------------------------------------------------------------------------------------------



Please assist in what I am missing.

Thanks,
Ambika
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic