- This topic has 9 replies, 7 voices, and was last updated 15 years, 5 months ago by Simon Boulton.
-
AuthorPosts
-
rameshpsgMemberHi,
I am getting the following error when I tried to run the sample JSF application on Tomcat 5.X.
HTTP Status 404 – /JSFLoginDemo/userLogin.faces
type Status report
message /JSFLoginDemo/userLogin.faces
description The requested resource (/JSFLoginDemo/userLogin.faces) is not available.
The application is deployed properly. I checked it in webapps folder. Below is the server console output.
Jan 8, 2008 2:07:17 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 8, 2008 2:07:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 796 ms
Jan 8, 2008 2:07:17 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 8, 2008 2:07:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Jan 8, 2008 2:07:17 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 8, 2008 2:07:19 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
Jan 8, 2008 2:07:19 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun’s JavaServer Faces implementation (1.2_04-b07-FCS) for context ‘null’
Jan 8, 2008 2:07:19 PM com.sun.faces.spi.InjectionProviderFactory createInstance
WARNING: JSF1033: Resource injection is DISABLED.
ContextListener: attributeAdded(‘com.sun.faces.config.WebConfiguration’, ‘com.sun.faces.config.WebConfiguration@1568fb5’)
Jan 8, 2008 2:07:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jan 8, 2008 2:07:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
ContextListener: attributeAdded(‘com.sun.faces.config.WebConfiguration’, ‘com.sun.faces.config.WebConfiguration@1d6747b’)
Jan 8, 2008 2:07:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jan 8, 2008 2:07:20 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jan 8, 2008 2:07:20 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 8, 2008 2:07:20 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jan 8, 2008 2:07:20 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
Jan 8, 2008 2:07:20 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 8, 2008 2:07:20 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3028 ms
Jan 8, 2008 2:07:26 PM com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container.Can someone help me in this regard. Thanks in advance.
Loyal WaterMemberWhat is the url that you are using to run the app ?
Are you able to run http://localhost:8080/ sucessfully after starting the server ?
Matthias ReuschMemberHi
I get the same error too.
>The requested resource (/JSFLoginDemo/userLogin.faces) is not available<
http://localhost:8080 displays the tomcat site.
http://localhost:8080/JSFLoginDemo displays index.jsp content.
The error apears at http://localhost:8080/JSFLoginDemo/userLogin.faces.
Searching for help.
Thanks in advance.
Riyad KallaMemberwebcrax,
Are you also trying to run it on Tomcat 5? Those EOD projects are meant to be used with MyEclipse Tomcat (Tomcat 6) and likely won’t run on Tomcat 5 (they are web 2.5 apps)
Chris LagalyMemberHi,
I’m attempting to run the MyEclipse JSF Tutorial application on the MyEclipse Tomcat 6 server and am seeing the exact same result as webcrax. My configuration details, web.xml and faces-config.xml follow. I’d appreciate it if you could point out the error of my ways. Thanks.
<SNIP, please use MyEclipse > Installation Summary > Installation Details>
Chris LagalyMemberLooks like my first post was truncated. Here are my web.xml and faces-config.xml:
WEB.XML:
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”2.5″ xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd”>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!–Tomcat 5 Workaround: Listener used to initialize JSF on startup–>
<!–Remove comment tags to enable listener.
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
–>
<!–Tomcat 5 Workaround: Listener implementation to handle web application lifecycle event–>
<!–Remove comment tags to enable listener.
<listener>
<listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
</listener>
–>
</web-app>FACES-CONFIG.XML:
<?xml version=”1.0″ encoding=”UTF-8″?>
<faces-config version=”1.2″ xmlns=”http://java.sun.com/xml/ns/javaee”
xmlns:xi=”http://www.w3.org/2001/XInclude”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd”>
<managed-bean>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>com.jsfdemo.bean.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>password</property-name>
<value/>
</managed-property>
<managed-property>
<property-name>userName</property-name>
<value/>
</managed-property>
</managed-bean>
<navigation-rule>
<from-view-id>/userLogin.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/userLoginSuccess.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/userLogin.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/userLoginSuccess.jsp</from-view-id>
</navigation-rule>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>Thanks again in advance for helping me determine the cause of this issue.
Loyal WaterMembercjlagaly,
By MyEclipse Tomcat 6 do you mean the integrated Tomcat server? Did you follow the steps mentioned in the readme doc? I’m not sure what’s going on. Arethere are startup errors with the project in the Tomcat console?
santoshrajMemberI am using Tomcat6 (not integrated with MyEclipse). I exactly followed the JSF tutorial and facing the same issue as cjlagaly.
Loyal WaterMembersantoshraj,
Can you go to MyEclipse > Examples On Demand and grab the JSFLoginf Example from there. Now follow the steps mentioned in the readme file. Do you still face the same issue?
Simon BoultonMemberHmmm. I get a similar problem. I can run the MyEclipse JSF Tutorial either from the downloaded resource or by going through the tutorial. However, I want to run it using JEE 5, and there I come unstuck. The project seems to build OK, but a request for the /userLogin.faces pages gives me a 404. When I build in 1.4, all is OK. Any suggestions? I would prefer to use the more up to date version, and I’m frustrated at my lack of progress getting a simple app like this running 🙁
-
AuthorPosts