Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [wtp-jsf-dev] WTP/JSF Tutorial Problem

Yay!  I'm now getting an error on the page having to do with missing bundles
for locales.  However that is something I think I can work through.

Thanks for all the help!

Shelli

-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Trimble
Sent: Monday, July 17, 2006 1:06 PM
To: Java Server Faces Tools developer discussion
Subject: RE: [wtp-jsf-dev] WTP/JSF Tutorial Problem

JSP pages (e.g. login.jsp) should not be under the WEB-INF folder, but
should be "one level up", such that the URL requested would be
/JSFTutorial/login.faces.

 - Ian Trimble (Oracle)

-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx]On Behalf Of Shelli D. Orton
Sent: Monday, July 17, 2006 12:00 PM
To: 'Java Server Faces Tools developer discussion'
Subject: RE: [wtp-jsf-dev] WTP/JSF Tutorial Problem


Hi,

Thanks! I then got a NullPointerException on
javax.faces.webapp.FacesServlet.init(FacesServlet.java:165) and modified my
server configuration by removing the check from the "Run modules directly
from the workspace (do not modify the Tomcat installation)" option as per
post #8 at
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=598929.  The
server now starts up without any errors in the console.  However, I get a
404 error on the app:

    HTTP Status 404 - /JSFTutorial/WEB-INF/login.faces

    type Status report
    message /JSFTutorial/WEB-INF/login.faces
    description The requested resource (/JSFTutorial/WEB-INF/login.faces) is
not available.

    Apache Tomcat/5.5.17

If I hit http://localhost:8080/, the Tomcat welcome page displays properly.
Any thoughts on why it can't find the jsp page?


Thanks again,
Shelli


Just in case they might be configured wrong, here's the faces-config.xml and
web.xml from the tutorial project:

----------------------
faces-config.xml
----------------------

<?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>
	<managed-bean>
		<managed-bean-name>
		loginBean</managed-bean-name>
		<managed-bean-class>
		com.tutorial.LoginBean</managed-bean-class>
		<managed-bean-scope>
		session</managed-bean-scope>
	</managed-bean>
	<navigation-rule>
		<display-name>
		WEB-INF/login</display-name>
		<from-view-id>
		/WEB-INF/login.jsp</from-view-id>
		<navigation-case>
			<from-outcome>
			login</from-outcome>
			<to-view-id>
			/WEB-INF/welcome.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>
	<validator>
		<description>
		</description>
		<display-name>
		Validate Password</display-name>
		<validator-id>
		com.tutorial.ValidatePassword</validator-id>
		<validator-class>
		com.tutorial.ValidatePassword</validator-class>
	</validator>

</faces-config>

----------------------
web.xml
----------------------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
<web-app id="WebApp_ID">
	<display-name>JSFTutorial</display-name>
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>
		javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</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.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
</web-app>

-----Original Message-----
From: wtp-jsf-dev-bounces@xxxxxxxxxxx
[mailto:wtp-jsf-dev-bounces@xxxxxxxxxxx] On Behalf Of Cameron Bateman
Sent: Monday, July 17, 2006 12:16 PM
To: Java Server Faces Tools developer discussion
Subject: Re: [wtp-jsf-dev] WTP/JSF Tutorial Problem

You need ensure that the jsf libraries are accessible to your tomcat
instance as well.  One simple way to solve this quickly is to copy
jsf-api.jar and jsf-impl.jar into your tomcat server/lib directory.
While a different strategy may be appropriate for production deployment
of your apps, this should ensure that the Faces dependencies are on
Tomcat's classpath and get you going (don't forget to restart tomcat).

--Cam

Shelli D. Orton wrote:

>Hello,
>
>I'm new to JSF and thought the best place to start would be the JSF Tools
>tutorial
>(http://www.eclipse.org/webtools/jsf/dev_resource/JSFTutorial-RC3/JSFTools_
t
>utorial.html).  I am running Tomcat5.5 and have the latest WTP plugins for
>Eclipse 3.2.  I am also using the jsf-1.1_02-b08 JSF implementation.  I
have
>gone through the tutorial and am now trying to run it.  I get a
>ClassNotFoundException on FacesServlet.  I believe I have set up the JSF
>libraries properly in Eclipse (Window -> Preferences -> Web and XML -> JSF
>Libraries).  Does anyone have a suggestion as to what I may be doing wrong?
>
>
>All help is greatly appreciated,
>Shelli
>
>
>
>Console Output
>---------------
>
>Jul 17, 2006 11:42:50 AM org.apache.catalina.core.AprLifecycleListener
>lifecycleEvent
>INFO: The Apache Tomcat Native library which allows optimal performance in
>production environments was not found on the java.library.path: C:\Program
>Files\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Oracle\produ
c
>t\10.1.0\Client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wb
e
>m;C:\Program Files\ATI Technologies\ATI Control
>Panel;C:\J2SDK1~1.2_0\bin;C:\Apple\Library\Executables;C:\Apple\bin;C:\Appl
e
>\Library\JDK\bin;C:\Nokia\Update_Manager\bin;C:\Program
>Files\cvsnt;C:\Program Files\QuickTime\QTSystem\;C:\xmlbeans-2.1.0\bin;
>Jul 17, 2006 11:42:51 AM org.apache.coyote.http11.Http11BaseProtocol init
>INFO: Initializing Coyote HTTP/1.1 on http-8080
>Jul 17, 2006 11:42:51 AM org.apache.catalina.startup.Catalina load
>INFO: Initialization processed in 1360 ms
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.StandardService start
>INFO: Starting service Catalina
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.StandardEngine start
>INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.StandardHost start
>INFO: XML validation disabled
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.ApplicationContext log
>INFO: Marking servlet Faces Servlet as unavailable
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.ApplicationContext log
>SEVERE: Error loading WebappClassLoader
>  delegate: false
>  repositories:
>    /WEB-INF/classes/
>----------> Parent Classloader:
>org.apache.catalina.loader.StandardClassLoader@872380
> javax.faces.webapp.FacesServlet
>java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
>	at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
v
>a:1352)
>	at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
v
>a:1198)
>	at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1
0
>34)
>	at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>	at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java
:
>3917)
>	at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
>	at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>	at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>	at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at
>org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9
>)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l
>.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>Jul 17, 2006 11:42:51 AM org.apache.catalina.core.StandardContext
>loadOnStartup
>SEVERE: Servlet /JSFTutorial threw load() exception
>java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
>	at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
v
>a:1352)
>	at
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.ja
v
>a:1198)
>	at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1
0
>34)
>	at
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
>	at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java
:
>3917)
>	at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
>	at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>	at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
>	at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
>	at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
>	at
>org.apache.catalina.core.StandardService.start(StandardService.java:450)
>	at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9
>)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l
>.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>Jul 17, 2006 11:42:52 AM org.apache.coyote.http11.Http11BaseProtocol start
>INFO: Starting Coyote HTTP/1.1 on http-8080
>Jul 17, 2006 11:42:52 AM org.apache.jk.common.ChannelSocket init
>INFO: JK: ajp13 listening on /0.0.0.0:8009
>Jul 17, 2006 11:42:52 AM org.apache.jk.server.JkMain start
>INFO: Jk running ID=0 time=0/31  config=null
>Jul 17, 2006 11:42:52 AM org.apache.catalina.storeconfig.StoreLoader load
>INFO: Find registry server-registry.xml at classpath resource
>Jul 17, 2006 11:42:52 AM org.apache.catalina.startup.Catalina start
>INFO: Server startup in 1062 ms
>
>_______________________________________________
>wtp-jsf-dev mailing list
>wtp-jsf-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev
>
>

_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev

_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev

_______________________________________________
wtp-jsf-dev mailing list
wtp-jsf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-jsf-dev



Back to the top