Marco-
Here's is my understanding of your current situation. Correct me if I'm wrong.
1) When you hit main.xhtml directly, the webserve does return the xhtml page, with no processing of tags. That's good. That's what you want to happen. By going directly to the xhtml page, you are going around the JSF Servlet and just requesting a static page from your webserver.
2) When you hit main.jsf, you get an error saying resource cannot be found. That indicates that you don't have your FacesServlet configured properly (I think).
When main.jsf fails to load, look for any errors in the console or error logs. Perhaps something is throwing an exception.
As far as I can tell, your web.xml file looks okay, but very complex. One small detail is there is an extra space character in the <?xml version=" 1.0"...?> - you should probably remove the space before 1.0. I also see things in web.xml that are specific to Sun's JSF reference implementation (anything with com.sun.faces.xxx) - I would recommend you remove all of those if you're using MyFaces.
You have a lot of different frameworks configured all at once. I would recommend paring them back to see if you can get things working. Since main.xhtml is pretty simple, try removing all of the Spring, Acegi and Tiles configuration from your web.xml. You also might want to make sure that the facelets hangman demo runs okay in your web container. You should be able to deploy that with no problems. Basically, start with a webapp that is much simpler and work your way up adding new frameworks one at a time once you know the app is deployed okay.
Also, make sure your faces-config.xml file has Facelets properly configured to handle the views. E.g.:
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
HTH,
Adam Brod
Product Development Team
| "Marco Mistroni"
<[EMAIL PROTECTED]>
02/21/2006 11:45 AM
|
|
Hello Adam,
when i access main.xhtml, INternet explorer does not 'recongnize' it and ask me if i want to open the page.....
so, yes, something is not configured properly, but i can' tfigure out what...
it looks like it does not recongize facelets tags at all.. since the text that is not supposed to be shown
instead it is shown..
here's my main.xhtml
<!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:ui="http://java.sun.com/jsf/facelets"
>
<body>
<ui:composition template="/layout/verticalClassicLayout.xhtml"
>
This text will not be displayed.Wrong! iw till be..
<ui:define name="title"
>
BudgetApp version 1.3 - Budget Queries
</ui:define>
This text will also not be displayed.
<ui:define
name="body">
Simple Test for entry
</ui:define>
</ui:composition>
</body>
</html>
here' s again my wbe.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 >
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/core-context.xml
/WEB-INF/web-context.xml
/WEB-INF/aop-context.xml
/WEB-INF/applicationContext-acegi-security.xml
/WEB-INF/applicationContext-common-authorization.xml
/WEB-INF/applicationContext-common-business.xml
/WEB-INF/faces-context.xml
/WEB-INF/dataSourcePopulator.xml
</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext </param-name>
<param-value>resources.MessageResources</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces- config.xml,/WEB-INF/faces-managed-beans.xml,/WEB-INF/faces-navigation.xml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
<description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to verify that all of the application
objects you have configured (components, converters,
renderers, and validators) can be successfully created.
Default value is false.
</description>
</context-param>
<!-- Acegi filters -->
<filter>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value> net.sf.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
</filter>
<filter>
<filter-name>contextHolderAwareFilter</filter-name>
<filter-class> net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value>net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter </param-value>
</init-param>
</filter>
<filter>
<filter-name>anonymousProcessingFilter</filter-name>
<filter-class>net.sf.acegisecurity.util.FilterToBeanProxy </filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value>net.sf.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
</filter>
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
</description>
</init-param>
<!-- <init-param>
<param-name>uploadRepositoryPath</param-name>
<param-value>/temp</param-value>
<description>Set the path where the intermediary files will be stored.
</description>
</init-param>-->
</filter>
<!-- JSF-Spring filters -->
<filter>
<filter-name>RequestHandled</filter-name>
<filter-class>de.mindmatters.faces.spring.support.RequestHandledFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>contextHolderAwareFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>anonymousProcessingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>RequestHandled</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<!--
To use non XDoclet filter-mappings, create a filter-mappings.xml file that
contains the additional filter-mappings and place it in your
project's merge dir.
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class> org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<listener>
<listener-class>de.mindmatters.faces.spring.support.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>net.sf.acegisecurity.ui.session.HttpSessionEventPublisher</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!--
<servlet>
<servlet-name>TilesServet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles- defs.xml</param-value>
</init-param>
<init-param>
<param-name>definitions-parser-validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
-->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<!--
To specify mime mappings, create a file named mime-mappings.xml, put it in your project's mergedir.
Organize mime-mappings.xml following this DTD slice:
<!ELEMENT mime-mapping (extension, mime-type)>
-->
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<!--
To specify error pages, create a file named error-pages.xml , put it in your project's mergedir.
Organize error-pages.xml following this DTD slice:
<!ELEMENT error-page ((error-code | exception-type), location)>
-->
<!-- Struts-EL Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://worldcorp.co.uk/jsf/component/tags</taglib-uri>
<taglib-location>/WEB-INF/tld/jsfapp.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location>
</taglib>
<!--
To set up security settings for your web app, create a file named web-security.xml, put it in your project's mergedir.
Organize web-security.xml following this DTD slice:
<!ELEMENT security-constraint (display-name?, web-resource-collection+, auth-constraint?, user-data-constraint?)>
<!ELEMENT web-resource-collection (web-resource-name, description?, url-pattern*, http-method*)>
<!ELEMENT web-resource-name (#PCDATA)>
<!ELEMENT url-pattern (#PCDATA)>
<!ELEMENT http-method (#PCDATA)>
<!ELEMENT user-data-constraint (description?, transport-guarantee)>
<!ELEMENT transport-guarantee (#PCDATA)>
<!ELEMENT login-config (auth-method?, realm-name?, form-login-config?)>
<!ELEMENT auth-method (#PCDATA)>
<!ELEMENT realm-name (#PCDATA)>
<!ELEMENT form-login-config (form-login-page, form-error-page)>
<!ELEMENT form-login-page (#PCDATA)>
<!ELEMENT form-error-page (#PCDATA)>
-->
<security-role>
<role-name>root</role-name>
</security-role>
</web-app>
hope you can still help me out....
thanks and regards
marco

