Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5994009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:45:24+00:00 2026-05-22T23:45:24+00:00

My inputname.jsp file <%@ taglib uri=http://java.sun.com/jsf/html prefix=h %> <%@ taglib uri=http://java.sun.com/jsf/core prefix=f %> <html>

  • 0

My inputname.jsp file

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

<html> 
<head> 
<title>enter your name page</title> 
</head> 
<body> 
<f:view> 
<h1> 
<h: outputText value="JSF 1.2 Tutorial"/> 
</h1> 
<h:form id="UserEntryForm"> 
<h: outputText value="Enter Your Name:"/> 
<h:inputText value="#{UserBean.userName}" /> 
<h:commandButton action="welcome" value="OK" /> 
</h:form> 
</f:view> 
</body> 
</html> 

My welcome.jsp file 
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> 
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<html> 
<head> 
<title>Welcome</title> 
</head> 
<body> 
<f:view> 
<h3> 
<h: outputText value="Welcome" />, 
<hutputText value="#{UserBean.userName}" /> to JSF 1.2 World! 
</h3> 
</f:view> 
</body> 
</html> 

my web.xml file

<?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> 

<!-- 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> 

</web-app> 

my faces-config file

<?xml version='1.0' encoding='UTF-8'?> 

<!DOCTYPE faces-config PUBLIC 
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" 
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> 

<faces-config> 

<navigation-rule> 
<from-view-id>/user/inputname.jsp</from-view-id> 
<navigation-case> 
<from-outcome>welcome</from-outcome> 
<to-view-id>/user/welcome.jsp</to-view-id> 
</navigation-case> 
</navigation-rule> 
<managed-bean> 
<managed-bean-name>UserBean</managed-bean-name> 
<managed-bean-class>net.roseindia.UserNameBean</managed-bean-class> 
<managed-bean-scope>request</managed-bean-scope> 
</managed-bean> 

</faces-config> 

my UserNameBean.java file

package net.roseindia; 

public class UserNameBean { 

String userName; 

/** 
* @return User Name 
*/ 
public String getUserName() { 
return userName; 
} 

/** 
* @param User Name 
*/ 
public void setUserName(String name) { 
userName = name; 
} 
} 

when i open inputname.jsf i get

Enter your name: #{UserBean.userName} 

instead of evaluating userbean.username it is just printing it
same happens at welcome.jsf
i get Welcome, #{UserBean.userName} to JSF 1.2 World!

what am i doing wrong
Please help
Krishan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:45:25+00:00Added an answer on May 22, 2026 at 11:45 pm

    Using JSF 1.2 on JSP requires a minimum of Servlet 2.5 container because of the changes in EL (EL has been moved from JSF 1.1 to JSP 2.1, which is part of Servlet 2.5). You need to ensure that you’re running your JSF 1.2 webapp on a Servlet 2.5 compatible container with a web.xml which is declared conform the Servlet 2.5 specification (or better, the maximum whatever your container supports). Your web.xml is declared as per Servlet 2.3 which implies a different EL version and hence EL expressions won’t be evaluated.

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 
        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"
        version="2.5">
    
        <!-- Config here. -->
    
    </web-app>
    

    Note that your faces-config.xml is incorrectly declared as JSF 1.1. You’d like to redeclare it as JSF 1.2 to fully utilize the JSF 1.2 features.

    <?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">
    
        <!-- Config here. -->
    
    </faces-config>
    

    Last, but not least, Roseindia.net is one of the WORST learning resources for Java EE. You should really put that site in your blacklist. Look for a different learning resource. Check the “Resources” section of https://stackoverflow.com/tags/jsf/info

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning JSF and got help from Exadel.com . I followed the steps
void fileNameProcess(char * inputName){ int size =strlen(inputName); bool change=false; char * name=inputName; for(int i
I'm trying to create a strongly type html helper extension for a date picker
input: name <hui.li@xxx.ch>; hans@dhdfhgdfgh <hans.dampf@xxxx>; Output: e1@mail.com, e2@mail.com, e3@mail.com,e@mail.com I want to erase the
In a JSP page, I created a <h:form enctype=multipart/form-data> with some elements: <t:inputText> ,
How do I pass a parameter from a page's useBean in JSP to a
I'm developing word automation application and I'm facing serious issue with unexpected RPC/COM cast
I'm using Struts2, Spring, and Hibernate. I have written a simple Excel file called
I've got a tiny webapp with index.jsp that forwards (it mostly only contains): <jsp:forward
Just doing a text area, and for inputs we can use placeholder text: name=inputname

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.