Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Sunny Greenhorn

Greenhorn
+ Follow
since Feb 02, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sunny Greenhorn

Found the thorn atlast ! Issue with faces-config.xml file and the error is in here

where as this is supposed to be


This ofcourse makes huge difference...
if 1.2 is used, resource bundles and beans wont come up and when servlet url mapping and DEFAULT_SUFIX matches, it runs out of stack, like infinite loop.
with 2.0, these are resolved.

Thanks for all, Again, thanks for warm welcome Tim.
10 years ago
JSF
This is quite similar to the QuizProgram demo that comes with mojarra-2.0.4-FCS, not able to figure out where is the issue.
any thoughts anyone!
10 years ago
JSF
response status is as shown...
10 years ago
JSF
Directory structure is here
10 years ago
JSF
Thanks, still the same issue, when I run it, I just see #{msgs.title} in the source (as-is xhtml) and empty in browser window.
another issue it seems that if we give same .xhtml extension for URL mapping is eating away stack, not sure how, but I have other app (quiz program demo)
that works fine....so scary ! where am I doing wrong (I hope so :-) )
10 years ago
JSF
Not sure why this doesn't work, a basic simple setup thought, trying to have it run on Tomcat6 with JSF 2.0 jars. Any clues please ???

web.xml (under WEB-INF folder)
-------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<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>
</web-app>

faces-config.xml (under WEB-INF folder)
-----------------
<?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">

<application>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
<resource-bundle>
<base-name>my.messages</base-name>
<var>msgs</var>
</resource-bundle>
</application>
</faces-config>

index.xhtml (under WebContent folder)
------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>#{msgs.title}</title>
</h:head>
<h:body></h:body>
</html>

messages.properties (under src, my package)
--------------------
title=Hello There!

No deployment errors and no issues with folder structures...
just URL doesn't respond:http://localhost:8080/T2/faces/index.xyz
http://localhost:8080/T2/faces/index.xhtml - gives the XHTML as is dump.

THanks.
10 years ago
JSF