MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
amir55
Post subject: jsf - struts tiles error in inserting a file  PostPosted: Aug 02, 2008 - 03:53 AM
Registered Member
Registered Member


Joined: Oct 15, 2005
Posts: 216

hi 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
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: jsf - struts tiles error in inserting a file  PostPosted: Aug 04, 2008 - 04:19 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 8012

Quote:

I have downloaded a recommended program of jsf-struts project from internet.

Which example are you referring to?

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
amir55
Post subject: answer found  PostPosted: Aug 05, 2008 - 04:03 AM
Registered Member
Registered Member


Joined: Oct 15, 2005
Posts: 216

thanks 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
 
 View user's profile Send private message  
Reply with quote Back to top
amir55
Post subject: jsf - struts tiles error of faces-config not responding  PostPosted: Aug 14, 2008 - 02:45 AM
Registered Member
Registered Member


Joined: Oct 15, 2005
Posts: 216

hi 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
 
 View user's profile Send private message  
Reply with quote Back to top
monu.mannu
Post subject: Re: jsf - struts tiles error of faces-config not responding  PostPosted: Mar 18, 2010 - 02:41 AM



Joined: Mar 18, 2010
Posts: 1

Hello, 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 link

face-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>
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits