| | |
faces-config not working
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2007
Posts: 238
Reputation:
Solved Threads: 0
Topic
The topic of this question is: faces-config not working.
Hello and Thank you in advance for any assistance. ………………………………………………………………………………………………………………………………………………………………………………………………System:
System info:netbeans6.7.1,jsf1.2
………………………………………………………………………………………………………………………………………………………………………………………………
Purpose:
The purpose of this post is: understand why the model.java and the controller.java are collecting data from my jukebox.jsp and the searchResults.jsp is capturing the results fine. But the commandButton is not redirecting the jukebox.jsp to the searchResults.jsp
………………………………………………………………………………………………………………………………………………………………………………………………
Functionality:
The functionality of this code is: I have a jukdbox.jsf that directly passes variables to the doSomething() of the controller.java and the controller returns “success”. Then the controller.java calls a method from the model object and it performs a routine using
The received param and returns the result.
………………………………………………………………………………………………………………………………………………………………………………………………
Question:
My question concerning this code is: The searchResult.jsp is able to get the results from the model.java so the controller should be returning a string “success” but the jukebox.jsf(input data from client) is not being redirected to the searchResults.jsf.
………………………………………………………………………………………………………………………………………………………………………………………………
errors:
The errors related to this code are:
………………………………………………………………………………………………………………………………………………………………………………………………
Description:faces-config
Code description:
JSP Syntax (Toggle Plain Text)
<faces-config version="1.2" 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"> <managed-bean> <description>set up search </description> <managed-bean-name>jukeboxController</managed-bean-name> <managed-bean-class>jukebox.JukeboxController</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/jukebox.jsp</from-view-id> <navigation-case> <description>set up a stupid string acting like a query</description> <from-outcome>success</from-outcome> <to-view-id>/searchResults.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config>
………………………………………………………………………………………………………………………………………………………………………………………………
Description:
Code Description: jukebox.jsp (the form to be submitted)
………………………………………………………………………………………………………………………………………………………………………………………………
JSP Syntax (Toggle Plain Text)
<%-- Document : jukebox Created on : Sep 2, 2009, 9:03:07 PM Author : depot --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Jukebox Page</title> </head> <body> <h1><h:outputText value="Welcome to the Jukebox!"/></h1> <h:form id="searchForm"> <h:panelGrid columns="5" > <h:outputLabel for="searchTypeSelection" value="Select a type of search" /> <h:selectOneMenu id="searchTypeSelection" title="select one option" value="#{jukeboxController.searchType}"> <f:selectItem id="select" itemLabel="Select one" itemValue="" /> <f:selectItem id="song" itemLabel="Song" itemValue="song"/> <f:selectItem id="artist" itemLabel="Artist" itemValue="artist"/> </h:selectOneMenu> <h:outputLabel for="searchStringTxt" value="Type the artist or song name"/> <h:inputText id="searchStringTxt" required="true" immediate="false" value="#{jukeboxController.searchString}" size="25"> </h:inputText> <h:commandButton id="submitSearch" value="Search" action="#{jukeboxController.buildQuery}" /> </h:panelGrid> </h:form> </body> <br> <hr> <HR> <jsp:include page="footer.jsp" flush="true" /> </html> </f:view>
Thanks again.
-ceyesuma
………………………………………………………………………………………………………………………………………………………………………………………………
Note:
Note: if needed please find attached the jukebox.zip program
………………………………………………………………………………………………………………………………………………………………………………………………
all my web pages are in the Web Pages folder provided when creating the project in netbeans.
………………………………………………………………………………………………………………………………………………………………………………………………
Description:
Code Description:
JSP Syntax (Toggle Plain Text)
![]() |
Similar Threads
- JSF HTTP 500 error (JSP)
- Session problem (PHP)
- JSP Host help (JSP)
- database string in web.config not working (ASP.NET)
- PHP mail() (Sendmail) Problem :( (PHP)
Other Threads in the JSP Forum
- Previous Thread: IE 7 wont delete record however FF does
- Next Thread: java.lang.ClassNotFoundException: sun:jdbc:odbc:JdbcOdbcDriver
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





