Posted on 2010-09-21
Last Modified: 2013-11-24
I am new to jsf.
Creating sample application of spring with jsf.
I have following code in jsp
<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>

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

when I see view source it is showing  following output
<form id="UserEntryForm" name="UserEntryForm" method="post" action="/inputname.jsf" enctype="application/x-www-form-urlencoded">

I am not gettting how action is coming as  inputname.jsf?

Question by:Manish
  • 2
LVL 20

Expert Comment

ID: 33724979
action is coming as  inputname.jsf -> This is so that the form postbacks to itself

Accepted Solution

afibarra earned 75 total points
ID: 33726589
<h:commandButton type="submit" action="welcome" value="OK" />

You are not specifying an action method. So JSF does a form postback.
LVL 11

Author Comment

ID: 33726976
so what it should be?
LVL 20

Assisted Solution

a_b earned 50 total points
ID: 33731435
It should be a method in your backing bean.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
linearIn  challenge 23 81
Return ZipOutputStream using Servlet 2 41
strCount chalenge 3 69
couple of eclipse 5 19
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now