File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Http 404, type - status message and resource not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Http 404, type - status message and resource not found" Watch "Http 404, type - status message and resource not found" New topic
Author

Http 404, type - status message and resource not found

Itz Me
Greenhorn

Joined: Jul 16, 2009
Posts: 3
Hello All,

I am trying to develop a rich faces application in tomcat 7.0.11. My xhtml page is a search page comes up right the first time with the search filters. When I enter the search criteria, and hit the a4j:commandButton to fetch the results, I get a 404, type - status message and resource not found. I dont see any errors in my log and I find that the search rows have been fetched from the database and also set in the VO but still not shown on screen.

The following is my web.xml:

<?xml version="1.0"?>
<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">
<display-name>myTc</display-name>
<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>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>

<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>

<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>

<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<login-config>
<auth-method>BASIC</auth-method>
</login-config>

<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>


<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>



</web-app>

The following is my 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>mySearchBean</managed-bean-name>
<managed-bean-class>com.my.search.bean.mySearchBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/pages/mySearch.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/pages/mySearch.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>fr</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
</application>
<application>
<view-handler>org.ajax4jsf.application.AjaxViewHandler</view-handler>
</application>


</faces-config>

I have the following jars in my Web-Inf/lib

commons-beanutils-1.8.0.jar
commons-collections-3.2.jar
commons-digester-1.8.1.jar
commons-logging-1.1.1.jar
jhighlight-1.0.jar
jsf-api-2.0.2.jar
jsf-facelets-1.1.15.B1.jar
jsf-impl-2.0.2.jar
jstl-1.1.2.jar
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar

I have done my application as a dynamic web project in eclipse for apache tomcat 7.0.11 server. And added the project in eclipse and start the server in eclipse too.

Please help me resolve this issue.
Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Http 404, type - status message and resource not found
 
Similar Threads
In Rich Faces rich:panelMenu a4j:commandButton action not called
javax.servlet.ServletException
a4j is not found
message /.jsp not found in JSF2.0+RichFaces3.3.3+Tomcat6.0.29
Session managing in JSF