wood burning stoves 2.0*
The moose likes JSF and the fly likes The requested resource () is not available Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "The requested resource () is not available" Watch "The requested resource () is not available" New topic

The requested resource () is not available

shashibabu kiran

Joined: Mar 04, 2010
Posts: 6
Hi friends,

my bean

package roseindia;

public class SimpleLogin {
String loginname;
String password;

public SimpleLogin(){}

public String getLoginname(){
return loginname;

public void setLoginname(String loginname){
this.loginname = loginname;

public String getPassword(){
return password;

public void setPassword(String password){
this.password = password;

public String CheckValidUser(){
if(loginname.equals("chandan") && password.equals("chand")){
return "success";
return "fail";

my index.jsp

<% response.sendRedirect("login.jsf"); %>

my login.jsp

<%@ page contentType="text/html"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

<head><title>JSF Simple Login Example</title></head>

<td><hutputText value="Enter Login ID: " /></td>
<td><h:inputText id="loginname" value="#{SimpleLogin.loginname}" /></td>
<td><hutputText value="Enter Password: " /></td>
<td><h:inputSecret id="password" value="#{SimpleLogin.password}" /></td>
<td> </td>
<td><h:commandButton value="Login" action="#{SimpleLogin.CheckValidUser}" /></td>

my face-config.xml

<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"


my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


<servlet-name>Faces Servlet</servlet-name>
<load-on-startup> 1 </load-on-startup>

<!-- Faces Servlet Mapping -->
<servlet-name>Faces Servlet</servlet-name>



please help in this i m new to JSF

Thanks in advance


Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
What's the URL you typed in the address bar?

Please use [code] tag when you post your code
samir vasani
Ranch Hand

Joined: Nov 24, 2010
Posts: 59
Davie Lin wrote:What's the URL you typed in the address bar?

Please use [code] tag when you post your code

I have the same problem and i entered http://localhost:8080/MyFirstJsfApp/faces/HelloWorld.jsp this url.

Please find all possible solutions.
Abdul Mohsin
Ranch Hand

Joined: Apr 26, 2007
Posts: 111

It looks you are redirecting the response to "login.jsf" but actual file is login.jsp , is it just the typo error in the post ?

Regards, Abdul Mohsin
wood burning stoves
subject: The requested resource () is not available
Similar Threads
newbie null reference exception
commandLink param problem
inputText tag not working properly
Field display problem
Error while accessing hibernate session through JSF