- This topic has 7 replies, 2 voices, and was last updated 16 years, 2 months ago by Loyal Water.
-
AuthorPosts
-
jwwarnerMemberI am evaluating MyEclipse and I like the various designer improvements over just Eclipse alone. However, I haven’t been able to get any of the JSF tutorials to work. First, each tutorial is lacking a bit and none of them tell you to change the welcome-files of web.xml.
Anyway, I tried to run just a simple JSF page as close to out-of-the-box as possible.
When I try to run the project the closest I can get is the internal tomcat server starts up fine with no errors. Then when the internal browser comes up with the page it just reads and reads and never returns so it basically is hung at that point.Incidently, I’ve gotten JSF to work with just eclipse. However, internationalization doesn’t seem to work very well.
web.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app version=”2.5″ xmlns=”http://java.sun.com/xml/ns/javaee”
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-app_2_5.xsd”>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<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>*.jsp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>MyJsp.jsp</welcome-file>
</welcome-file-list>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>faces-config.xml
<?xml version=’1.0′ encoding=’UTF-8′?><faces-config xmlns=”http://java.sun.com/xml/ns/javaee”
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”
version=”1.2″></faces-config>
I shouldn’t need anything else in faces-config if all I am doing is running the default JSF page. There are no beans or navigation to do.
When testing all my Firewall, Virus Protection, etc… are all off. So the port can’t be blocked.
I’m using JDK 1.6.0_10 set to level 5.0.
At this point I have no idea what the problem is. Can you guys help me out or provide me a finished example that I can compare to or something. I’d buy a license if I could get a tutorial working but right now its holding me back.
Thanks
– John
Loyal WaterMemberCan you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
If you go to MyEclispe > Examples On Demand, you will have a couple of JSF examples listed there. Are you able to get those to work without issues?
jwwarnerMemberFrom MyEclipse > Installation Summary > Installation Details…
*** Date:
Thursday, September 11, 2008 9:44:45 PM EDT** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_11*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 6.5.1 GA
Build id: 6.5.1-GA-20080715*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 6.5.1 GA
Build id: 6.5.1-GA-20080715Eclipse Graphical Editing Framework
Version: 3.3.2.v20080129
Build id: 20080221-1602Eclipse Platform
Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
Build id: M20080221-1800Eclipse RCP
Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc
Build id: M20080221-1800Eclipse Java Development Tools
Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7
Build id: M20080221-1800Eclipse Plug-in Development Environment
Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL
Build id: M20080221-1800Eclipse Project SDK
Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO
Build id: M20080221-1800Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\MyEclipse 6.5\eclipse\eclipse.exe
-name
Eclipse
–launcher.library
C:\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
-startup
C:\MyEclipse 6.5\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-exitdata
338_7c
-clean
-vm
C:\MyEclipse 6.5\jre\bin\javaw.exeI’ll try loading the examples on demand as you suggested and see if I can get that to work. I’ll post again.
Thanks
– John
jwwarnerMemberOk, I installed the login examlple on demand and it worked fine. So I must be doing something wrong.
I’ll take a closer look at it.
Thanks,
John
Loyal WaterMemberYour welcome.
jwwarnerMemberNipun,
In trying to get my example working I found the only difference seems to be from index.jsp the userLogin.jsp is called using “userLogin.faces”.
If I replace that link with MyJsp.jsp file as in the following;
<a href=”MyJsp.faces”>Click here</a> to begin testing this
example</b> <!– userLogin.faces originally in href attribute value –>
then it works.
So, what do I need to do to get MyJsp.jsp to be called from the start instead of index.jsp.
If I put MyJsp.jsp in the web.xml file as the only welcome-file as in the following;
<welcome-file-list>
<welcome-file>MyJsp.jsp</welcome-file>
</welcome-file-list>
I get “Cannot find FacesContext”.
I apprecaite your help.
– John
jwwarnerMemberOk, I got it… When using multiple directories for JSF files, it’s probably better to use an extension url pattern rather than that based on a directory.
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
Loyal WaterMemberGlad you got it to work.
-
AuthorPosts