Problem In JSF compilation

Hi,
This is velrajan from MindTree consultiong Bangalore India.I am new to JSF.When i try to compile my ActionListerner file i got the following error.
MyActionListener.java:9: package javax.faces.tree does not exist
import javax.faces.tree.Tree;
^
MyActionListener.java:26: cannot resolve symbol
symbol : method getComponentId ()
location: class javax.faces.component.UIComponent
+ component.getComponentId());
^
MyActionListener.java:28: cannot resolve symbol
symbol : method getActionCommand ()
location: class javax.faces.event.ActionEvent
String actionCommand = event.getActionCommand();
^
MyActionListener.java:32: cannot resolve symbol
symbol : class Tree
location: class ch02a.MyActionListener
Tree tree = facesContext.getTree();
^
MyActionListener.java:32: cannot resolve symbol
symbol : method getTree ()
location: class javax.faces.context.FacesContext
Tree tree = facesContext.getTree();
^
MyActionListener.java:45: cannot resolve symbol
symbol : method getComponentId ()
location: class javax.faces.component.UIComponent
System.out.println(component.getComponentId());
^
MyActionListener.java:46: incompatible types
found : java.util.List
required: java.util.Iterator
Iterator children = component.getChildren();
I have the following jar files in my JDK lib folder
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-impl.jar
standard.jar
I hope i have missed out the jsf-ri.jar and jstl_el.jar.
I am not able to find out the jsf-ri.jar in my JSF download.Where can i get this?.
Please suggest me.
This is My Listener:
===============
package ch02a;
import java.util.Iterator;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.faces.event.PhaseId;
import javax.faces.tree.Tree;
public class MyActionListener implements ActionListener {
public PhaseId getPhaseId() {
System.out.println("getPhaseId called");
return PhaseId.APPLY_REQUEST_VALUES;
public void processAction(ActionEvent event) {
System.out.println("processAction called");
// the component that triggered the action event
     System.out.println("Before GetComponent");
UIComponent component = event.getComponent();
     System.out.println("After GetComponent");
System.out.println(
"The id of the component that fired the action event: "
+ component.getComponentId());
// the action command
String actionCommand = event.getActionCommand();
System.out.println("Action command: " + actionCommand);
FacesContext facesContext = FacesContext.getCurrentInstance();
Tree tree = facesContext.getTree();
UIComponent root = tree.getRoot();
System.out.println("----------- Component Tree -------------");
navigateComponentTree(root, 0);
System.out.println("----------------------------------------");
private void navigateComponentTree(
UIComponent component, int level) {
// indent
for (int i=0; i<level; i++)
System.out.print(" ");
// print component id
System.out.println(component.getComponentId());
Iterator children = component.getChildren();
// navigate children
while (children.hasNext()) {
UIComponent child = (UIComponent) children.next();
navigateComponentTree(child, level + 1);
Please guide me.
Thanks and Regards,
Velrajan T.

I'am having the same problem of compiling the MyActionListener class.
Not able to find the jsf-ri.jar in jwsdp-1.6 installation directory also.
Please let me know if any body knows from where to get this jar.
Thanks in Advance

Similar Messages

  • Problem in Servlet Compilation & Deployment

    Hi Friends,
    I have problem regarding Servlet Compilation & Deployment.
    At the time of compilation gives error message "import javax.servlet.* is not a recognize package.
    My J2ee Server gives FATAL Error it says it should be work on JDK1.2 or later.
    My JDK is :-j2sdk1.4.2_04
    MY J2EE Server is:-j2sdkee1.2.1
    My Servlet Runner is:-JSDK2.0
    My Java Enviorment is:- Version 1.5.0 (build 1.5.0_04-b05)
    Path setting is:-
    Class Path=C:\j2sdk1.4.2_04\lib;C:\j2sdkee1.2.1\lib\j2ee.jar;C:\JSDK2.0\lib
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=DCL-04
    ComSpec=C:\WINNT\system32\cmd.exe
    Please help me and give the desired result as soon as you all can
    Your's Harish
    Thanks

    At the time of compilation gives error message "import javax.servlet.* is not a recognize package.You have to include servlet.jar or j2ee.jar in the classpath when compiling.
    My JDK is :-j2sdk1.4.2_04
    My Java Enviorment is:- Version 1.5.0 (build 1.5.0_04-b05)Why are the versions of your JDK and Java runtime environment different? Why are you not using Java 5 to compile and run everything?
    Class Path=C:\j2sdk1.4.2_04\lib;C:\j2sdkee1.2.1\lib\j2ee.jar;C:\JSDK2.0\libIf this is an environment variable, it should be "classpath", not "Class Path" with a space in between.

  • Problems in JSF t:commandlink

    Hello,
    I am facing a problem with JSF Command link
    I have three JSP pages with one backing bean in session scope.The property defined in the backing bean is an Object type which contains fields mapped to the database.
    The navigation between pages is through hyperlinks.
    I enter data on page 1 and move to page 2.Again due to some reasons if I come back to first page I dont see values restored on the textfields on page 1.It is again reset when page 1 loads.I have to restore values and I have to do it using command links.I do not want button to navigate between two pages.
    How can I restore data
    I set the data on textfields as #{BackingBean.property.property_field}
    I am new to JSF.can anyone suggest how to restore values while navigating.
    [email protected]
    Thankyou,
    Pankaj Shirke

    on the commandLink tag are you using the immediate = "ture" if so remove it or set it to false

  • Very big problem with JSF about FORM and "id=" for HTML form's elements and

    I have discovered a very big problem with JSF about FORM and "id=" for HTML form's elements and java instruction "request.getParameterNames()".
    Suppose you have something like this, to render some datas form a Java Beans :
    <h:dataTable value="#{TablesDb2Bean.myDataDb2ListSelection}" var="current" border="2" width="50%" cellpadding="2" cellspacing="2" style="text-align: center">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:outputText id="nameTableDb2" value="#{current.db2_name_table}"/>
    </h:column>
    </h:dataTable>
    Everything works fine...
    Suppose you want to get the name/value pairs for id="nameTableDb2" and #{current.db2_name_table} to process them in a servlet. Here is the HTML generated :
    <td><span <span class="attribute-name">id=<span class="attribute-value">"j_id_jsp_1715189495_22:0:nameTableDb2">my-table-db2-xxxxx</span></td>
    You think you can use the java instructions :
    Enumeration NamesParam = request.getParameterNames();
    while (NomsParam.hasMoreElements()) {
    String NameParam = (String) NamesParam.nextElement();
    out.println("<h4>"++NameParam+ "+</h4>);
    YOU ARE WRONG : request.getParameterNames() wants the syntax *name="nameTableDb2" but JSF must use id="nameTableDb2" for "<h:outputText"... So, you can't process datas in a FORM generated with JSF in a Servlet ! Perhaps I have made an error, but really, I wonder which ?
    Edited by: ungars on Jul 18, 2010 12:43 AM
    Edited by: ungars on Jul 18, 2010 12:45 AM

    While I certainly appreciate ejb's helpful responses, this thread shows up a difference in perspective between how I read the forum and how others do. Author ejb is correct in advising you to stay inside JSF for form processing if form processing is what you want to do.
    However, I detect another aspect to this post which reminds me of something Marc Andreesen once said when he was trying to get Netscape off the ground: "there's no such thing as bad HTML."
    In this case, I interpret ungar's request as a new feature request. Can I phrase it like this?
    "Wouldn't it be nice if I could render my nice form with JSF but, in certain cases, when I REALLY know what I'm doing" just post out to a separate servlet? I know that in this case I'll be missing out on all the nice validation, conversion, l10n, i18n, ajax, portlet and other features provided by JSF".
    If this is the case, because it really misses the point of JSF, we don't allow it, but we do have an issue filed for it
    https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=127
    If you can't wait for it to be fixed, you could decorate the FormRenderer to fix what you want.
    I have an example in my JSF book that shows how to do this decoration. http://bit.ly/edburnsjsf2
    Ed

  • Problem with a compiled program

    Hello,
    I have a problem with a compiled program on labview 6i.
    This program used a serial port (COM1 or COM2).
    During the launching of the ".exe ", a fatal error occurs.
    Here this error:
    => APPLICATION caused an invalid page fault in
    => module LVRT.DLL at 0167:30164426.
    Can somebody help me?
    Regards
    Cedric

    Cedric,
    This problem was fixed in the LabVIEW 6.0.2 update. You can download this update (along with the updated runtime engine) from our website.
    Good luck with your application, and have a pleasant day.
    Sincerely,
    Darren N.
    NI Applications Engineer
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Problems with JSF and included subviews

    Hi everybody,
    I' ve got a problem with JSF and included subviews which makes me going
    crazy. I've got no clue why my web-pages are represent wrongly. The only
    tip I've got is that it must be connected with the kind I do include my JSF-pages.
    When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
    my pages are represent wrongly.
    The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
    I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
    My environment is the following:
    JAVA JDK 1.5 Update 4
    Tomcat 5.5.9
    JSLT 1.1
    Sun JSF 1.1
    Win 2K
    Here's my code:
    Main.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
              String path = request.getContextPath();
              String basePath = request.getScheme() + "://" + request.getServerName()
                        + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <f:view>
              <h:form>
                   <div class="table">
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 1"/>
                             <h:outputText styleClass="tdinfo" value="value 2"/>
                        </div>
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 3"/>
                             <h:outputText styleClass="tdinfo" value="value 4"/>
                        </div>
                   </div>
              </h:form>     
              <jsp:include page="Sub.jsp" />
         </f:view>
    </body>
    </html>Sub.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <f:subview id="subview">
         <h:form>
              <div class="table">
                   <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 11"/>
                             <h:outputText styleClass="tdinfo" value="value 22"/>
                   </div>
                   <div class="tr">
                        <h:outputText styleClass="tdleft" value="value 33"/>
                        <h:outputText styleClass="tdinfo" value="value 44"/>
                   </div>
              </div>
         </h:form>
    </f:subview>stil.jsp
    <%@page contentType="text/css"%>
    <%
        String  schwarz     = "#000000",
                grau1       = "#707070",
                grau2       = "#c0c0c0",
                grau3       = "#e0e0e0",
                grau4       = "#e8e8e8",
                grau5       = "#fdfdfd",
                blau        = "#0000dd",
                tuerkis     = "#00cfff";
        String  liniendicke = "1px",
                linienart   = "solid";
        String allgemeineTextFarbe           = schwarz;
        String allgemeineHintergrundFarbe    = grau3;
        String infoTextFarbe                 = blau;
        String fieldsetRandFarbe             = blau;
        String fieldsetRandDicke             = liniendicke;
        String fieldsetRandArt               = linienart;
        String hrLinienFarbe                 = blau;
        String hrLinienDicke                 = liniendicke;
        String hrLinienArt                   = linienart;
        String inputAktivHintergrundFarbe    = grau5;
        String inputReadonlyHintergrundFarbe = grau4;
        String inputPassivHintergrundFarbe   = grau4;
        String inputPassivFarbe              = schwarz;
        String inputRandFarbe1               = grau1;
        String inputRandFarbe2               = grau5;
        String inputRandDicke                = liniendicke;
        String inputRandArt                  = linienart;
        String inputButtonHintergrundFarbe   = grau3;
        String legendenFarbe                 = blau;
        String linkFarbe                     = blau;
        String linkAktivFarbe                = tuerkis;
        String linkBesuchtFarbe              = blau;
        String linkFocusFarbe                = tuerkis;
        String objectGitterFarbe             = grau5;
        String objectGitterDicke             = liniendicke;
        String objectGitterArt               = linienart;
        String tabellenGitterFarbe           = grau5;
        String tabellenGitterDicke           = liniendicke;
        String tabellenGitterArt             = linienart;
    %>
    <%-- ----------------------------------------------- --%>
    <%-- Textdarstellung mittels der Display-Eigenschaft --%>
    <%-- in den Tags div und span                        --%>
    <%-- ----------------------------------------------- --%>
    *.table {
        display:table;
        border-collapse:collapse;
    *.tbody {
        display:table-row-group;
    *.tr {
        display:table-row;
    *.td,*.tdright,*.tdleft,*.tdinfo,*.th {
        display:table-cell;
        padding:3px;
        vertical-align:middle;
    *.td,*.th {
        text-align:center;
    *.tdright {
        text-align:right;
    *.tdleft {
        text-align:left;
    *.tdinfo {
        color:<%=infoTextFarbe%>;
        text-align:right;
    *.th {
        color:<%=infoTextFarbe%>;
        font-weight:bold;
    }thanks in advance
    benjamin

    Hello Zhong Li,
    many thanks for your post, but it didn't work.
    My problem is that the JSF-Components im my included or imported
    JSP-Pages does not accept any kind of style or styleClass for
    designing. The components take over the informations for colors
    but not for alignment.
    When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
    it seems that the resulting HTML-page would be presented correctly.
    But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
    In my example I create a simple grid with 2 rows and 2 columns.
    Both columns contains JSF-Outtext-Components and are included with div-tags.
    The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
    Any clue?
    Many thanks Benjamin
    Here is the html-code from Firefox:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="http://polaris21:8080/webtest/">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
              <div class="table">
                   <div class="tr">
                        <span class="tdleft">value 1</span>
                        <span class="tdinfo">value 2</span>
                   </div>
                   <div class="tr">
                        <span class="tdleft">value 3</span>
                        <span class="tdinfo">value 4</span>
                   </div>
              </div>
              <input type="hidden" name="_id0" value="_id0" />
         </form>     
          <form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
               <span class="tdleft">value 11</span>
              <span class="tdinfo">value 22</span>
              <span class="tdleft">value 33</span>
              <span class="tdinfo">value 44</span>
              <input type="hidden" name="SUB:_id5" value="SUB:_id5" />
         </form>
         <div class="table">
              <div class="tr">
              </div>
              <div class="tr">
              </div>
         </div>
    </body>
    </html>

  • Problem with jsf DataTable

    when data is fetch using user criteria:
    i have a problem with jsf DataTable. I use e request bean to populate the datatable and i insert a commandButton column. The data dispay successfully into the datatable, but when a push the button on the row...the page simply refresh and notinhg else
    when data is fetch using constants:
    The data dispay successfully into the datatable, when a push the button on the row...the action execute OK

    Hi,
    I don't think that with this description only anybody on this list is able to help you.
    I use e request bean to populate the datatable and i insert a commandButton column
    What is a command button column and what does it do ?
    but when a push the button on the row...the page simply refresh and notinhg else
    What did you do to debug the problem ?
    when data is fetch using constants
    What does this mean ?
    Frank

  • Problem with JSF 1.2 and Tomcat 6

    Hello guys,
    I have here:
    Tomcat 6.0.10
    JSF 1.2_04_b10_p01
    I followed these steps without success:
    http://forum.java.sun.com/thread.jspa?threadID=787962
    http://forum.java.sun.com/thread.jspa?threadID=5156242
    Here what I did:
    1) Removed the following line in $TOMCAT_HOME/conf/server.xml
    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />2) Add the following lines to $TOMCAT_HOME/conf/web.xml
         <context-param>
         <param-name>com.sun.faces.expressionFactory</param-name>
         <param-value>org.apache.el.ExpressionFactoryImpl</param-value>
         </context-param>3) Add the following libs to $TOMCAT_HOME/lib
    jsf-api.jar
    jsf-impl.jar
    jstl-1.2.jar
    4) Add the following lines to $MYAPP/WEB-INF/web.xml
         <listener>
              <listener-class>
                   com.sun.faces.config.ConfigureListener
              </listener-class>
         </listener>
         <listener>
              <listener-class>
                   com.sun.faces.application.WebappLifecycleListener
              </listener-class>
         </listener>And here is "the final product":
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/protocolo'
    10/04/2007 08:18:47 com.sun.faces.config.ConfigureListener registerELResolverAndListenerWithJsp
    SEVERE: Error Instantiating ExpressionFactory
    java.lang.ClassCastException: org.apache.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory
         at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1563)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:419)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
         at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)What I need to do? Someone can help me?
    Thank you.

    Thank you for the answer rlubke,
    Well this happened because I had compiled the project with the jstl-1.1
    The workaround to make jsf 1.2 run on tomcat 6 really works.
    But now I have a problem because the JNDI tree in tomcat is read-only ( ro )
    and I need to bind a object in the JNDI so an exception happens:
    WARNING: Ocorreu um erro inexperado:
    javax.naming.NamingException: Context is read only
             at org.apache.naming.NamingContext.checkWritable(NamingContext.java:903)
             at org.apache.naming.NamingContext.bind(NamingContext.java:831)
             at org.apache.naming.NamingContext.bind(NamingContext.java:171)
             at org.apache.naming.NamingContext.bind(NamingContext.java:187)
             at org.apache.naming.SelectorContext.bind(SelectorContext.java:171)
             at javax.naming.InitialContext.bind(InitialContext.java:400)Here is the code:
    try{
         Context newContext = new InitialContext();
         newContext.bind( dataSourceWrappedID, wrappedDs );
         newContext.close();
    }catch(NameAlreadyBoundException nabe){
         // ok no problem..
    }catch(NamingException ne){
         if ( log.isWarnEnabled() ){
              log.warn("Ocorreu um erro inexperado:", ne);
    }You know how to make the JNDI tree in tomcat read-write ?
    Thank you a ton. :-)

  • Problem with JSF Tutorial in CE Tutorial Center

    Hi,
    I am referring to the tutorial "[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30016ca9-f786-2b10-1fa4-8dffb880d2a3|How to Call an Enterprise Service from JSF]" from the CE Tutorial Center.
    After generating theJava Proxy Client and write the code in my search method - I get design time errors because the compiler does not recognize the following Classes in the code:
    EmployeeID
    EmployeeBasicDataSelectionByEmployee
    EmployeeBasicDataByEmployeeQueryMessage
    ...and a few more.
    My search() code is:
    EmployeeID employeeID = new EmployeeID();
    employeeID.setValue(this.employeeID);
    EmployeeBasicDataSelectionByEmployee employeeByEmployee = new EmployeeBasicDataSelectionByEmployee();
    employeeByEmployee.setEmployeeID(employeeID);
    EmployeeBasicDataByEmployeeQueryMessage input = new EmployeeBasicDataByEmployeeQueryMessage();
    input.setEmployeeBasicDataSelectionByEmployee(employeeByEmployee);
    // Invoke the business methods
    EmployeeBasicDataByEmployeeResponseMessage output = port.employeeBasicDataByEmployeeQueryResponseIn(input);
    Employee employee = output.getEmployee();
    Please help.
    Thanks.
    p256960
    Edited by: p256960 on Feb 2, 2009 11:04 AM

    Hi,
    The problem seems to be that the "Generate Client" wizard is not generating classes like EmployeeID, etc.
    How do I get these classes in my Project?
    Please help.
    Thanks.
    p256960.

  • Problem with JSF tags, org.apache.jasper.JasperException: Exception in JSP:

    I am a beginner to JSF , I am getting the following error when I try to invoke using the following URL
    http://localhost:8080/Loginjsf/
    I have copied web.xml,faces-config.xml,index.jsp, userLogin.jsp and also the list of jars I am using.
    java version I am using jdk1.5.0_14
    tomcat version 5.5.25
    JSF Version 1.1_01
    ---------------------------------------------------------------------this is the error------------------------------------------------------------------
    exception
    org.apache.jasper.JasperException: Exception in JSP: /index.jsp:7
    4: </head>
    5: <body>
    6: </body>
    7: <jsp:forward page="userLogin.jsp"></jsp:forward>
    8: </html>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    org.apache.jasper.JasperException: Exception in JSP: /userLogin.jsp:15
    12: </head>
    13:
    14: <body>
    15:      <f:view>
    16:           <h:form id="UserName">
    17:           <f:loadBundle basename ="com.demo.MessageBundle" var="bundle"/> <br>
    18:                     <h:inputText></h:inputText>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: Cannot find FacesContext
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
         org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:92)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.jsp.JspException: Cannot find FacesContext
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:399)
         com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)
         org.apache.jsp.userLogin_jsp._jspx_meth_f_005fview_005f0(userLogin_jsp.java:107)
         org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:82)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:50)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    THE WEB.XML FILE I AM USING IS
    The web.xml, faces-config.xml files which I am using ,
    <?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>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    <description>
    Set this flag to true if you want the JavaServer Faces
    Reference Implementation to validate the XML in your
    faces-config.xml resources against the DTD. Default
    value is false.
    </description>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!--Tomcat 5 Workaround: Listener used to initialize JSF on startup-->
         <listener>
              <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
         </listener>
    </web-app>
    THE FACES-CONFIG.XML I AM USING
    <?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 >
         <application>
              <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
         </application>
         <managed-bean>
              <managed-bean-name>UserBean</managed-bean-name>
              <managed-bean-class>com.demo.bean.UserBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
              <managed-property>
                   <property-name>userName</property-name>
                   <property-class>java.lang.String</property-class>
                   <value></value>
              </managed-property>
              <managed-property>
                   <property-name>password</property-name>
                   <property-class>java.lang.String</property-class>
                   <value></value>
              </managed-property>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/userLogin.jsp</from-view-id>
              <navigation-case><from-outcome>failure</from-outcome>
                   <to-view-id>/loginForm.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-action>success</from-action>
                   <to-view-id>/userLoginSuccess.jsp</to-view-id>
              </navigation-case></navigation-rule>
         <navigation-rule>
              <from-view-id>/userLoginSuccess.jsp</from-view-id>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/loginForm.jsp</from-view-id>
         </navigation-rule>
         </faces-config>
    THE INDEX.JSP I AM USING
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html>
    <head>
    </head>
    <body>
    </body>
    <jsp:forward page="userLogin.jsp"></jsp:forward>
    </html>
    THE USERLOGIN.JSP is
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h"%>
    <%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f"%>
    <html>
    <head>
    <title>My JSF 'userLogin' starting page</title>
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
    </head>
    <body>
    <f:view>
    <h:form id="UserName">
         <f:loadBundle basename ="com.demo.MessageBundle" var="bundle"/> <br>
              <h:inputText></h:inputText>
              <h:outputLabel value="UserName"></h:outputLabel>
              <h:inputText></h:inputText>
              <h:outputLabel for="Password" value="Password" id="Password"></h:outputLabel>
    </h:form>
    </f:view>
    </body>
    </html>
    THE JAR FILES LOCATED AT tomcat-5.5\webapps\Loginjsf\WEB-INF\lib
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-logging.jar
    el-api.jar
    el-ri.jar
    jsf-api.jar
    jsf-facelets.jar
    jsf-impl.jar
    jstl.jar
    standard.jar
    It would be great if you could help me in resolving this problem, what is that I am doing wrong?

    Thanks for your suggestions, I updated the web.xml and index.jsp accordingly but this time I am getting a different kind of error as below
    org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
    3: <head>
    4: </head>
    5: <body>
    6: <jsp:forward page="userLogin.faces"></jsp:forward>
    7: </body>
    8: </html>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: Error Parsing /userLogin.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:202)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    com.sun.facelets.FaceletException: Error Parsing /userLogin.jsp: Error Traced[line: 1] The markup in the document preceding the root element must be well-formed.
         com.sun.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:234)
         com.sun.facelets.compiler.Compiler.compile(Compiler.java:105)
         com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:197)
         com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:144)
         com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:95)
         com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:496)
         com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:546)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:49)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Deploy problem of JSF WebApp on Tomcat 5.5.17 SEVERE: Error listenerStart

    Hi there,
    My installation configuration is as followed:
    Tomcat5.5.17 using the following connector:
        <Connector
          port="8083"
          maxHttpHeaderSize="8192"
          maxThreads="150"
          minSpareThreads="25"
          maxSpareThreads="75"
          enableLookups="true"
          redirectPort="8080"
          acceptCount="100"
          debug="1"
          connectionTimeout="20000"
          disableUploadTimeout="true" />tomcat-user.xml defines:
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
      <role rolename="manager"/>
      <role rolename="admin"/>
      <user username="tomcat" password="tomcat" roles="manager,admin"/>
    </tomcat-users>Tomcat starts up correctly with the following url and is runs while deploying:
    http://localhost:8083/manager/html
    My WebApp is a simple Test App and is the following:
    index.html:
    <html>
       <head>
          <meta http-equiv="Refresh" content= "0; URL=index.faces"/>
          <title>Start Web Application</title>
       </head>
       <body>
          <p>Please wait for the web application to start.</p>
       </body>
    </html>
    index.jsp:
    <html>
       <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
       <f:view>
          <head>                 
             <title>A Simple JavaServer Faces Application</title>
          </head>
          <body>
             <h:form>
                <h3>Please enter your name and password.</h3>
                <table>
                   <tr>
                      <td>Name:</td>
                      <td>
                         <h:inputText value="#{user.name}"/>
                      </td>
                   </tr>            
                   <tr>
                      <td>Password:</td>
                      <td>
                         <h:inputSecret value="#{user.password}"/>
                      </td>
                   </tr>
                </table>
                <p>
                   <h:commandButton value="Login" action="login"/>
                </p>
             </h:form>
          </body>
       </f:view>
    </html>welcome.jsp:
    <html>
       <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
       <f:view>
          <head>              
             <title>A Simple JavaServer Faces Application</title>
          </head>
          <body>
             <h:form>
                <h3>
                   Welcome to JavaServer Faces,
                   <h:outputText value="#{user.name}"/>!
                </h3>
             </h:form>
          </body>     
       </f:view>
    </html>
    UserBean.java:
    package com.jsfcore;
    public class UserBean {
         private String name;
         private String password;
         public UserBean() {
              super();
         private String getName() {
              return this.name;
         private void setName(String name) {
              this.name = name;
         private String getPassword() {
              return this.password;
         private void setPassword(String password) {
              this.password = password;
    web.xml:
    <?xml version="1.0"?>
    <!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>
       <display-name>Simple Login Applications</display-name>
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>  
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>/faces/*</url-pattern>
       </servlet-mapping> 
       <welcome-file-list>
          <welcome-file>index.html</welcome-file>
       </welcome-file-list>
    </web-app>
    faces-config.xml:
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
       <navigation-rule>
          <from-view-id>/index.jsp</from-view-id>
          <navigation-case>
             <from-outcome>login</from-outcome>
             <to-view-id>/welcome.jsp</to-view-id>
          </navigation-case>
       </navigation-rule>
       <managed-bean>
          <managed-bean-name>user</managed-bean-name>
          <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
    </faces-config>I have downloaded jsf-1_1_01.zip and installed it.
    I have downloaded java_ee_sdk-5-windows.exe and installed it too.
    Path login/WEB-INF/lib contains the following jars:
    jsf/lib/jsf-api.jar
    jsf/lib/jsf-impl.jar
    tomcat/servler/lib/commons-digester.jar (fr. tomcat 4.1.3)
    tomcat/server/lib/commons-beanutils.jar (fr. tomcat 4.1.3)
    tomcat/webapps/jsp-examples/lib/jstl.jar (fr. tomcat 5.5.17)
    tomcat/webapps/jsp-examples/lib/standard.jar (fr. tomcat 5.5.17)
    The compilation and deployment was successful.
    With my build.xml, I have deployed the login.war file into path
    tomcat/webapps
    The login.war file was unpacked into the normal web application directory structure.
    That is where the problem appeared with the output display on the consol:
    Jul 27, 2006 11:10:39 AM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8083
    Jul 27, 2006 11:10:39 AM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8082
    Jul 27, 2006 11:10:39 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 750 ms
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jul 27, 2006 11:10:41 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive login.war
    Jul 27, 2006 11:10:41 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Jul 27, 2006 11:10:41 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [login] startup failed due to previous errors
    Jul 27, 2006 11:10:42 AM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8083
    Jul 27, 2006 11:10:42 AM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8082
    Jul 27, 2006 11:10:42 AM org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    Jul 27, 2006 11:10:43 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3047 ms
    I am unable to start the login application on the Tomcat Web Application Manager.
    The following Message appears on top:
    FAIL - Application at context path /login could not be started
    Let me say, that I have already continued developing more code for this application up to this point and wanted to test in the meantime. Since I had this failure I mentioned above, I have stripped down the application to the code above and I still have no success. I cannot go further until I am getting this very small application up and running on the server.
    Is anybody out there who could give me a hint to solve this problem?
    I really appreciate any hints, since I am circeling around the problem for guit a while.
    Thanks very much
    Markus

    Hi there,
    My installation configuration is as followed:
    Tomcat5.5.17 using the following connector:
        <Connector
          port="8083"
          maxHttpHeaderSize="8192"
          maxThreads="150"
          minSpareThreads="25"
          maxSpareThreads="75"
          enableLookups="true"
          redirectPort="8080"
          acceptCount="100"
          debug="1"
          connectionTimeout="20000"
          disableUploadTimeout="true" />tomcat-user.xml defines:
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
      <role rolename="manager"/>
      <role rolename="admin"/>
      <user username="tomcat" password="tomcat" roles="manager,admin"/>
    </tomcat-users>Tomcat starts up correctly with the following url and is runs while deploying:
    http://localhost:8083/manager/html
    My WebApp is a simple Test App and is the following:
    index.html:
    <html>
       <head>
          <meta http-equiv="Refresh" content= "0; URL=index.faces"/>
          <title>Start Web Application</title>
       </head>
       <body>
          <p>Please wait for the web application to start.</p>
       </body>
    </html>
    index.jsp:
    <html>
       <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
       <f:view>
          <head>                 
             <title>A Simple JavaServer Faces Application</title>
          </head>
          <body>
             <h:form>
                <h3>Please enter your name and password.</h3>
                <table>
                   <tr>
                      <td>Name:</td>
                      <td>
                         <h:inputText value="#{user.name}"/>
                      </td>
                   </tr>            
                   <tr>
                      <td>Password:</td>
                      <td>
                         <h:inputSecret value="#{user.password}"/>
                      </td>
                   </tr>
                </table>
                <p>
                   <h:commandButton value="Login" action="login"/>
                </p>
             </h:form>
          </body>
       </f:view>
    </html>welcome.jsp:
    <html>
       <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
       <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
       <f:view>
          <head>              
             <title>A Simple JavaServer Faces Application</title>
          </head>
          <body>
             <h:form>
                <h3>
                   Welcome to JavaServer Faces,
                   <h:outputText value="#{user.name}"/>!
                </h3>
             </h:form>
          </body>     
       </f:view>
    </html>
    UserBean.java:
    package com.jsfcore;
    public class UserBean {
         private String name;
         private String password;
         public UserBean() {
              super();
         private String getName() {
              return this.name;
         private void setName(String name) {
              this.name = name;
         private String getPassword() {
              return this.password;
         private void setPassword(String password) {
              this.password = password;
    web.xml:
    <?xml version="1.0"?>
    <!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>
       <display-name>Simple Login Applications</display-name>
       <servlet>
          <servlet-name>Faces Servlet</servlet-name>
          <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
       </servlet>  
       <servlet-mapping>
          <servlet-name>Faces Servlet</servlet-name>
          <url-pattern>/faces/*</url-pattern>
       </servlet-mapping> 
       <welcome-file-list>
          <welcome-file>index.html</welcome-file>
       </welcome-file-list>
    </web-app>
    faces-config.xml:
    <?xml version="1.0"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
       <navigation-rule>
          <from-view-id>/index.jsp</from-view-id>
          <navigation-case>
             <from-outcome>login</from-outcome>
             <to-view-id>/welcome.jsp</to-view-id>
          </navigation-case>
       </navigation-rule>
       <managed-bean>
          <managed-bean-name>user</managed-bean-name>
          <managed-bean-class>com.corejsf.UserBean</managed-bean-class>
          <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
    </faces-config>I have downloaded jsf-1_1_01.zip and installed it.
    I have downloaded java_ee_sdk-5-windows.exe and installed it too.
    Path login/WEB-INF/lib contains the following jars:
    jsf/lib/jsf-api.jar
    jsf/lib/jsf-impl.jar
    tomcat/servler/lib/commons-digester.jar (fr. tomcat 4.1.3)
    tomcat/server/lib/commons-beanutils.jar (fr. tomcat 4.1.3)
    tomcat/webapps/jsp-examples/lib/jstl.jar (fr. tomcat 5.5.17)
    tomcat/webapps/jsp-examples/lib/standard.jar (fr. tomcat 5.5.17)
    The compilation and deployment was successful.
    With my build.xml, I have deployed the login.war file into path
    tomcat/webapps
    The login.war file was unpacked into the normal web application directory structure.
    That is where the problem appeared with the output display on the consol:
    Jul 27, 2006 11:10:39 AM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8083
    Jul 27, 2006 11:10:39 AM org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8082
    Jul 27, 2006 11:10:39 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 750 ms
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    Jul 27, 2006 11:10:40 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jul 27, 2006 11:10:41 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive login.war
    Jul 27, 2006 11:10:41 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Jul 27, 2006 11:10:41 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context [login] startup failed due to previous errors
    Jul 27, 2006 11:10:42 AM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8083
    Jul 27, 2006 11:10:42 AM org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8082
    Jul 27, 2006 11:10:42 AM org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    Jul 27, 2006 11:10:43 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3047 ms
    I am unable to start the login application on the Tomcat Web Application Manager.
    The following Message appears on top:
    FAIL - Application at context path /login could not be started
    Let me say, that I have already continued developing more code for this application up to this point and wanted to test in the meantime. Since I had this failure I mentioned above, I have stripped down the application to the code above and I still have no success. I cannot go further until I am getting this very small application up and running on the server.
    Is anybody out there who could give me a hint to solve this problem?
    I really appreciate any hints, since I am circeling around the problem for guit a while.
    Thanks very much
    Markus

  • Problem in JSF with Swing in a web application

    hi
    i am using jsf for my online projects.my problem is that when i use Swing concept ,the server is closed automatically when i click the swing dialog option 'OK', how can i protect server being closed automatically when user click the the options of Swing dialog box.it is so tedious because my application is going to integrate
    with online server?
    my swing java file is
    * FileExistsDialog.java
    package com.obs.ftw.util.alert;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.Rectangle2D;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.plaf.metal.MetalLookAndFeel;
    * FileExistsDialog: A JOptionPane-like dialog that displays the message
    * that a file exists.
    public class FileExistsDialog extends JDialog {
    * The component that gets the focus when the window is first opened
    private Component initialFocusOwner = null;
    * Command string for replace action (e.g., a button).
    * This string is never presented to the user and should
    * not be internationalized.
    private String CMD_REPLACE = "OK"/*NOI18N*/;
    * Command string for a cancel action (e.g., a button).
    * This string is never presented to the user and should
    * not be internationalized.
    private String CMD_CANCEL = "CANCEL"/*NOI18N*/;
    // Components we need to access after initialization
    private JButton replaceButton = null;
    private JButton cancelButton = null;
    public FileExistsDialog(){
         System.out.println("INSIDE THE FILE EXIST DIALOG");
         JFrame frame = new JFrame() {
         public Dimension getPreferredSize() {
         return new Dimension(200,100);
         frame.setTitle("Debugging frame");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.pack();
         frame.setVisible(false);
    FileExistsDialog dialog = new FileExistsDialog(frame, true);
         dialog.addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent event) {
         System.exit(0);
         public void windowClosed(WindowEvent event) {
         System.exit(0);
         dialog.pack();
         dialog.setVisible(true);
    * Creates a new FileExistsDialog
    * @param parent parent frame
    * @param modal modal flag
    public FileExistsDialog(Frame parent,boolean modal) {
    super(parent, modal);
         //initResources();
         System.out.println("INSIDE THE FILE EXIST DIALOG CONSTRUCTOR");
    initComponents();
    pack();
    * Determines the locale, loads resources
    /* public void initResources() {
         Locale locale = Locale.getDefault();
    resources = ResourceBundle.getBundle(
              "samples.resources.bundles.FileExistsDialogResources", locale);
    imagePath = resources.getString("images.path");
    }*/ // initResources()
    * Sets all of the buttons to be the same size. This is done
    * dynamically after the buttons are created, so that the layout
    * automatically adjusts to the locale-specific strings.
    private void equalizeButtonSizes() {
         System.out.println("INSIDE THE equalizeButtonSizes()");
    String[] labels = new String[] {
    replaceButton.getText(),
         cancelButton.getText()
         // Get the largest width and height
         Dimension maxSize= new Dimension(0,0);
         Rectangle2D textBounds = null;
         Dimension textSize = null;
    FontMetrics metrics =
              replaceButton.getFontMetrics(replaceButton.getFont());
         Graphics g = getGraphics();
         for (int i = 0; i < labels.length; ++i) {
         textBounds = metrics.getStringBounds(labels, g);
         maxSize.width =
         Math.max(maxSize.width, (int)textBounds.getWidth());
         maxSize.height =
         Math.max(maxSize.height, (int)textBounds.getHeight());
    Insets insets =
         replaceButton.getBorder().getBorderInsets(replaceButton);
    maxSize.width += insets.left + insets.right;
    maxSize.height += insets.top + insets.bottom;
    // reset preferred and maximum size since BoxLayout takes both
         // into account
    replaceButton.setPreferredSize((Dimension)maxSize.clone());
    cancelButton.setPreferredSize((Dimension)maxSize.clone());
    replaceButton.setMaximumSize((Dimension)maxSize.clone());
    cancelButton.setMaximumSize((Dimension)maxSize.clone());
    } // equalizeButtonSizes()
    * This method is called from within the constructor to
    * initialize the dialog.
    private void initComponents() {
         System.out.println("INSIDE THE initComponents()");
         // Configure the window, itself
    Container contents = getContentPane();
    contents.setLayout(new GridBagLayout ());
    GridBagConstraints constraints = null;
    setTitle("Waring");
         // accessibility - all applets, frames, and dialogs should
         // have descriptions
         this.getAccessibleContext().setAccessibleDescription("Descriptions");
         addWindowListener(new WindowAdapter() {
         public void windowOpened(WindowEvent event) {
              // For some reason the window opens with no focus owner,
              // so we need to force the issue
         if (initialFocusOwner != null) {
              initialFocusOwner.requestFocus();
              // Only do this the 1st time the window is opened
              initialFocusOwner = null;
         public void windowClosing(WindowEvent event) {
         System.out.println("INSIDE THE windowClosing");     
         // Treat it like a cancel
              windowAction(CMD_CANCEL);
         // image
    JLabel imageLabel = new JLabel();
    imageLabel.setIcon(
    new ImageIcon("/images/degraded_large.gif"));
    // accessibility - set name so that low vision users get a description
    imageLabel.getAccessibleContext().setAccessibleName("OK");
    constraints = new GridBagConstraints ();
    constraints.gridheight = 2;
    constraints.insets = new Insets(12, 33, 0, 0);
    constraints.anchor = GridBagConstraints.NORTHEAST;
    contents.add(imageLabel, constraints);
    // header
    JLabel headerLabel = new JLabel ();
    headerLabel.setText("SAMPLE");
    headerLabel.setForeground(
         new Color(MetalLookAndFeel.getBlack().getRGB()));
    constraints = new GridBagConstraints ();
    constraints.insets = new Insets(12, 12, 0, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(headerLabel, constraints);
         // Actual text of the message
         JTextArea contentTextArea = new JTextArea();
    contentTextArea.setEditable(false);
    contentTextArea.setText("SAMPLE");
    contentTextArea.setBackground(
              new Color(MetalLookAndFeel.getControl().getRGB()));
    // accessibility -- every component that can have the
         // keyboard focus must have a name. This text area has no
         // label, so the name must be set explicitly (if it had a
         // label, the name would be pulled from the label).
    contentTextArea.getAccessibleContext().setAccessibleName(
              "CONTENTNAME");
    constraints = new GridBagConstraints ();
    constraints.gridx = 1;
    constraints.gridy = 1;
    constraints.insets = new Insets(0, 12, 0, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(contentTextArea, constraints);
         // Buttons
         JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout (new BoxLayout(buttonPanel, 0));
         replaceButton = new JButton();
         replaceButton.setActionCommand(CMD_REPLACE);
    replaceButton.setText("OK");
    replaceButton.setToolTipText("TO OK");
         replaceButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent event) {
         windowAction(event);
    buttonPanel.add(replaceButton);
    // spacing
    buttonPanel.add(Box.createRigidArea(new Dimension(5,0)));
         cancelButton = new JButton();
         cancelButton.setActionCommand(CMD_CANCEL);
    cancelButton.setText("CANCEL");
    cancelButton.setNextFocusableComponent(replaceButton);
         cancelButton.setToolTipText("TO CANCEL");
         cancelButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent event) {
         windowAction(event);
    buttonPanel.add(cancelButton);
    constraints = new GridBagConstraints ();
    constraints.gridx = 1;
    constraints.gridy = 2;
    constraints.insets = new Insets(12, 12, 11, 11);
    constraints.anchor = GridBagConstraints.WEST;
    contents.add(buttonPanel, constraints);
         // Equalize the sizes of all the buttons
         equalizeButtonSizes();
         // For some reason, the dialog appears with no input focus.
         // We added a window listener above to force the issue
         initialFocusOwner = replaceButton;
    } // initComponents()
    * The user has selected an option. Here we close and dispose the dialog.
    * If actionCommand is an ActionEvent, getCommandString() is called,
    * otherwise toString() is used to get the action command.
    * @param actionCommand may be null
    private void windowAction(Object actionCommand) {
         System.out.println("INSIDE THE WINDOW ACTION");
         String cmd = null;
    if (actionCommand != null) {
         if (actionCommand instanceof ActionEvent) {
         cmd = ((ActionEvent)actionCommand).getActionCommand();
         } else {
         cmd = actionCommand.toString();
         if (cmd == null) {
         // do nothing
         } else if (cmd.equals(CMD_REPLACE)) {
         System.out.println("your replace code here...");
         } else if (cmd.equals(CMD_CANCEL)) {
         System.out.println("your cancel code here...");
         setVisible(false);
         dispose();
    } // windowAction()
    * This main() is provided for debugging purposes, to display a
    * sample dialog.
    // main()
    } // class FileExistsDialog
    and calling java function is
    public String fileDialog(){
         return "Success";
    public void processFile(ActionEvent event){
         System.out.println("INSIDE THE FILE DIALOG");
         FileExistsDialog file     = new FileExistsDialog();
         System.out.println("SUCCESS");
    called from
         <h:commandButton action="#{userLogin.fileDialog}" actionListener="#{userLogin.processFile}"></h:commandButton>
    pls help me as soon
    advance thanks
    rgds
    oasisdeserts

    Swing is GUI library for use in desktop applications.
    JSF is a web application framework which runs on an application server and is accessed by clients via web browsers.
    To fully understand what you have done, try accessing your application from a different machine than the server.
    To answer your question, don't invoke System.exit() if you would like the process to continue. But that is the least of your problems.

  • Problem in JSF action mapping for ZOHOwrter

    Hello Every one,
    I am struggling with a problem by using zohowriter in JSF Frame work, my problem is..
    I have developed an application to open and edit a Document which resides in server and save it in server in another path, for this purpose we are using ZohoWriter. For this application the Struts frame work is working fine.
    I have designed xhtml page by using struts framework as bellow,
    <body>
    <form method="POST" action="http://export.writer.zoho.com/remotedoc.im?apikey=ad40de81a92f4d644b474276c7ac1640&output=editor" target="_self">
    <input type="hidden" name="url" value="http://customers.info-sun.com/itrack/templateDocuments/TestPlan.doc">
    <input type="hidden" name="saveurl" value="http://localhost:8080/Struts/zoho.do">
    <input type="hidden" name="filename" value="mydocument.doc">
    <input type="hidden" name="id" value="12345678">
    <input type="hidden" name="format" value="doc">
    <input type="hidden" name="persistence" value="true">
    <input type="submit" value="Edit" class="divbutton" name="submit">
    </form>
    By using above code that editor is calling the "saveurl" attribute value while saving the document, that is automatically executing the Action class and saving the Document in specified server path.
    But,
    In my application we are following JSF framework,
    In my application I have written the xhtml page like,
    <form id="myform" method="post" enctype="multipart/form-data" action="http://export.writer.zoho.com/remotedoc.im?apikey=ad40de81a92f4d644b474276c7ac1640&output=editor">
         <h:commandButton value="Edit" />
         <h:inputHidden id="url" value="http://customers.info-sun.com/itrack/templateDocuments/TestPlan.doc" />
         <h:inputHidden id="filename" value="TestPlan.doc" />
         <h:inputHidden id="id" value="12345678" />
         <h:inputHidden id="saveurl" value="http://customers.info-sun.com/itrack/zoho.fileDownload" />
         <h:inputHidden id="format" value="doc" />
    </form>
    in the page designing if I use <h:form> this tag is not containing action attribute , so I am giving by command button but it is not working.
    So, I continued with html form.
    also, if I specify the "saveurl" attribute mapped with backing been , it is executing in page load only , So My actual intention means after editing it needs to call but it is not happening, while loading this method is calling so other problems are raising.
    Can any one please guide me that, what is my mistake and how to over come.
    Thanks and Regards
    N.Sailaja
    Edited by: SailajaN on Jun 9, 2009 7:37 AM

    Hi,
    I got solution for the above problem.
    I am calling a servlet instead of calling jsf flow, I got that, the zohowriter calling only lifecycle method for saveurl attribute.
    Thanks and Regards
    N.Sailaja
    Edited by: SailajaN on Jun 12, 2009 6:32 AM

  • Datatable rendering problem in jsf 1.2!

    Hi,
    I want to display a table populated with some data and My approach is the simplest.....
    I am using a h:datatable in my jsf page.The table has got value binding with backing bean
    list which I am populating inside getter method. I am using jsf 1.2 in tomcat 6.
    <h:dataTable id="table1" value="#{bb_test.myList}"
                   binding="#{bb_test.table1}" var="user">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText value="User Id" />
                        </f:facet>
                        <h:outputText value="#{user.userId}" />
                   </h:column>
              </h:dataTable>And backing bean method
    public List<MyObject> getMyList(){
              List<MyObject> myObjectList = myService.getMyObjectList(1, 12);
              return myObjectList ;
         }But I am getting following exception
    Caused by: org.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 17 in the jsp file: /pages/test.jsp
    The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
    14:      <h:form>
    15:           
    16:           <h:commandButton value="-->" action="#{bb_test.showNextPage}" />
    17:           <h:dataTable id="table1" value="#{bb_test.loginList}"
    18:                binding="#{bb_test.table1}" var="user">
    19:                <h:column id="column1">
    20:                
    I spent good amount of time behind googling..but all in vain...
    Please do respond if u have any idea about what is happening here and what could be the possible solution.
    Thanks.
    Ghosh

    Hmm, [one more|http://forums.sun.com/thread.jspa?threadID=5344554]? You're using JSF 1.2_09?
    There's a bugfix related to the 'var' attribute of the datatable in JSF 1.2_10. Upgrade your JSF version.

  • Problem with NOCOPY compiler hint in form library

    When compiling the following code in a package as part of a PL/SQL library attached to my version 6 form, I get the error below.
    The error does not occur if I remove the "NOCOPY" compiler hint. Anyone know what the problem is?
    TYPE duplicate_id_tab IS TABLE OF duplicate_id_rec;
    PROCEDURE find_duplicate_ids (pidm_dupes IN OUT NOCOPY duplicate_id_tab, LName_in IN VARCHAR2,FName_in IN VARCHAR2);
    Error 103 at line 13, column 59
    Encountered the symbol "DUPLICATE_ID_TAB" when expecting one of the following:
    :=,),@ % default character
    The symbol ":=" was substituted for "DUPLICATE_ID_TAB" to continue.

    I posted an answer to this but it seems to have failed, so I'll send it again.
    The NOCOPY reserved word appeared in PL/SQL 8.1.x. Forms 6i uses PL/SQL 8.0.6. Therefore, you can't use NOCOPY in Forms 6i.
    Oracle9i Forms uses a later version of PL/SQL, so it works. I already tested in Oracle9i Forms for you.
    We do not change the RSFs except in a major release. Therefore, no version of Forms 6i will support NOCOPY.
    Regards,
    Robin Zimmermann
    Forms Product Management.

Maybe you are looking for

  • How to create a verification pop-up message for queries executed on Web

    I have implemented the function RRMS_MESSAGE_HANDLING in my customer exit variable code for step 2  in the customer include ZXRSRU01.  I am able to get warning and error messages to appear in Bex Excel queries, but not queries executed on the Web.  I

  • Oracle Drive, dav_portal and accents

    Hi everyone. I am using the DAV protocol to have access to some of my documentation in Portal. The thing is when I use some accent in the archives names like "documentaciónuno.doc" and try to access to the DAV with Oracle Drive, the archive is listed

  • I recently updated to OS X and now my iphoto (version 9.1.1) won't open

    After updating to OS X Mavericks 10.9.1 my iphoto won't open saying that I can't use this application of iphoto (version 9.1.1) with this version of OS X. Now I'm not sure if to update iphoto or revert back to an older operating system. Of course, I

  • Printer not working since installing Mac OS X v 10.7 Lion

    Since updating, Epson XP-400 printer unable to print. Message says the printer is offline and the printer is not connected yet printed a test page but unable to print a Pages document. I reinstalled the printer software and checked for updated softwa

  • What Happen into Tablespace, when Drop Any Object??

    Hi people. I have a question about the store into tablespace, What happen when you make the follow taks into database:ç When you drop a table??? Change the size into tablespace?? Reduce the Size on tablespace..?? What are the diferents between Delete