- This topic has 4 replies, 3 voices, and was last updated 14 years, 10 months ago by monu.mannu.
-
AuthorPosts
-
amir55Participanthi dear all
I have downloaded a recommended program of jsf-struts project from internet.
I have an error to insert a navigation.jsp inside a template.
[ServletException in:/common/navigation.jsp] javax.servlet.jsp.JspException: java.lang.IllegalStateException’
my simple code
myTiles.xml file
<tiles-definitions>
<definition name=”layout.example” path=”/template1.jsp” >
<put name=”body” value=”/navigation.jsp” />
</definition>
</tiles-definitions>navigation.jsp
<body>
<f:view>
<h:form>
<h:outputText value=”This is page1.jsp.” />
<h:panelGrid columns=”1″ >
<h:commandLink action=”target”>
<h:outputText value=”Page1″ />
</h:commandLink>
</h:panelGrid>
</h:form>
</f:view>
</body>Note : if I remove the f:view I get no error but the link does not respond.
when I use a full url on the browser to access the navigation.faces, it is fine but only the error in the insert.
if I remove the </h:commandLink> the program is fine but to use the </h:commandLink>
then I need f:view then the error occurs.so many thnaks
yours and cheers
Amir
Loyal WaterMemberI have downloaded a recommended program of jsf-struts project from internet.
Which example are you referring to?
amir55Participantthanks a lot
I found the answer thait is todo with <f:view> should be removed as the caller jsp has it already in it
cheers
Amir
amir55Participanthi all
problem
jsf – struts tiles error of faces-config not responding to a return from a bean.I have the problem now in jsf – struts tiles in myeclipse 6 as the bean returns a string say loginSuccess to the faces-config.xm that should forard to a jsp as a naviagation-case.
the forward to jsp is not done and no error shown even when I put any jsp file or even false name
this jsf program works perfect without the use of tiles. the strange is no error is thrown which means myeclispe does not provide an exception to such a case.
so if anyone has a program link or is ready to look at my simpleast program which allows a link in jsp to go a bean to return a succes to a faces-config.
as I said only when tiles is used otherwise is fine.
so many thanks
monu.mannuMemberHello, I have the same problem of the Command link, If your problem is resolved please help me out.
I just want to navigate on another JSP after clicking on that command linkface-config file is:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE faces-config PUBLIC “-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN” “http://java.sun.com/dtd/web-facesconfig_1_1.dtd”><faces-config>
<application>
<view-handler>
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl
</view-handler>
</application><managed-bean>
<managed-bean-name>book</managed-bean-name>
<managed-bean-class>com.corejsf.Book</managed-bean-class>
<managed-bean-scope>none</managed-bean-scope>
</managed-bean><navigation-rule>
<from-view-id>/pages/bookHeader1.jsp</from-view-id>
<navigation-case>
<from-outcome>news</from-outcome>
<to-view-id>/pages/user/News.jsp</to-view-id>
</navigation-case></navigation-rule>
</faces-config>
header.jsp from where i want to navigate:
<%@ taglib uri=”http://struts.apache.org/tags-html” prefix=”html” %><%@ taglib uri=”http://java.sun.com/jsf/core” prefix=”f” %>
<%@ taglib uri=”http://java.sun.com/jsf/html” prefix=”h” %><h:form>
<h:commandLink id=”link” action=”news”>
<h:outputText>News</h:outputText>
</h:commandLink>
</h:form>tiles.xml is:
<!DOCTYPE tiles-definitions PUBLIC
“-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN”
“http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd”><tiles-definitions>
<definition name=”book” path=”/layout/headerMenuContentLayout.jsp”>
<put name=”header” value=”/pages/bookHeader1.jsp”/>
<put name=”menu” value=”/pages/bookMenu.jsp”/>
<put name=”content” value=”/”/>
</definition><definition name=”testbook” extends=”book”>
<put name=”content” type=”template” value=”/pages/MyJsp1.jsp”/>
</definition><definition name=”caseStudy” extends=”book”>
<put name=”content” type=”template” value=”/pages/caseStudyBodyContent.jsp”/>
</definition><definition name=”news” extends=”book”>
<put name=”content” type=”template” value=”/pages/newsBodyContent.jsp”/>
</definition></tiles-definitions>
-
AuthorPosts