Log4j problem in JSF

I'm trying to use log4j in my bean, but not work and prompt error messages,
then I change Log4j to commons-logging, it's working.
My container is Tomcat 5.0, Any suggestions?
Thanks for any help!

Hi,
Can you give the steps or configuration involnved in making JSF work with Common-loging/Log4j,
I am using sun studio creator,But I am not able to get any loggin message ,
I have put log4j.properties in WEB-INF folder,then also my log file is not getting created,
Please guide me with configuaration steps,
Thanks in advance,
Vani

Similar Messages

  • 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

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

  • DATE field problem in JSF code

    Hi,
    I am a newbie on JSF and working with a JSF application development. I have a problem with a data type: DATE. Here is what had happened; I tried to write a new record to a table, in my "write" paragraphs I have the following codes:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();
    The problem is when I was running the program to write a record, I got the following error:
    Cannot append new tableOne data: java.lang.RuntimeException: Number of conflicts while synchronizing: 1 SyncResolver.INSERT_ROW_CONFLICT row 1 Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.
    At that point, I was trying to write a DATE value from a "calendar' component (joinDate1 field with MM/dd/yyyy format) into a field name: "joindate' (data type is DATE) in tableOne file.
    Any advice on resolving this problem? Please help me to get more knowledge on this. Thanks!

    Hi,
    You must use sql type. So instead of:
    tabelOneDataProvider.setValue("joindate", rowKey, joinDate1.getSelectedDate());
    tableOneDataProvider.commitChanges();try something like:
    java.util.Date date = joinDate1.getSelectedDate();
    java.sql.Date dateToInsert = new java.sql.Date(date.getTime());
    tabelOneDataProvider.setValue("joindate", rowKey, dateToInsert);
    tableOneDataProvider.commitChanges();best regards
    Grzegorz

  • Getting a problem in JSF - Spring Integration

    Hi,
    We have a web application in which we are working on JSF using MyEclipse. I am now trying to integrate spring framework into the project for having IOC for middle layer.
    well I am getting problem in setting class attribute through Spring.
    How I did is I added a class First.java initialized by application.xml The code is
    <beans>
         <bean id="first" class="com.model.service.impl.first"
              abstract="false" singleton="false" >
         <property name="name">
              <value type="java.lang.String">to enter</value>
         </property></bean>
    </beans>In web.xml I did the following change for Spring
         <servlet>
                 <servlet-name>SpringContextServlet</servlet-name>
                 <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>      
                <load-on-startup>1</load-on-startup>
         </servlet>I added this first class in backing bean as a property. My faces-config.xml code is
              <managed-bean>
              <managed-bean-name>EducInfo</managed-bean-name>
              <managed-bean-class>
                   com.view.beans.StudentEducInfo
              </managed-bean-class>
                    <managed-property>
                   <property-name>ft</property-name>
                   <value>#{first}</value>
              </managed-property>and I called it from jsp(JSF) page as
    <h:outputText value="#{EducInfo.tstFirst}" />the function tstFirst in EducInfo (backing bean) is
         private first ft;
         public String getTstFirst() {
              tstFirst=ft.getName();
              return tstFirst;
    I am getting error 'Expression Error: Named Object: 'first' not found.'
    Any idea? Any workaround would also be appreciated.
    Thanks,
    Arsalan

    Your server is not able to find anything matching the requested file.
    Well, just explore your archive file (possibly your .war file) and look at the path of the index file.
    Please post your url. If pro11 is your project name (the root) then ensure that the index file is by itself ie the path should be shown as blank in your war file.
    Or mention the exact path of your index file in the url.

  • File Upload Problem in JSF

    Hi all,
    I have a problem in file upload. I have a file upload third party component which uploads the file with the filter action depending on the url. My requirement is to trace the uploaded filename for addressing it with the database record. So I need the filename in my backing bean to store it in the database. Ho can i get the filename from view page to backing bean. Any Ideas and help please.
    Many thanx,
    vijaycanaan

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • User athentication problem in jsf

    Hi all,
    Upto to now i used filters for user authentication by placing the protected pages in the folder from the remaining the pages which are on root. The filter will come into action by the url detection of the foldername. But actually my problem here is different I should not have to place in separate folders and have to provide authentication for particular files which are in sample root. This is I used to solve in normal jsp programming with the help of session. But whereareas in JSF how cleanly to solve this problem. Also iam new to JSF. Please any help regarding this. I am at urgent for the solution.
    many thanks,
    vijaycanaan
    Message was edited by:
    vijaycanaan

    Required help regarding this topic please.

  • Performance Problem in JSF

    HI folks,
    My application is written using ADF Faces. This is a oracle framwork which intern uses JSF only.
    I wrote a small app with just single page and trying to see how well the application will scale. From my observations I found that application is not scaling after some number of users.
    I profiled the application with JProfile for single user and single iteration and found that 95% of the time is spent on Faces Servlet only.
    So please help me out with some tuning tips for Faces servlet if any?
    I will post furthur data soon with exact method and places where the time spending.... Please try to contribute...
    Thanks in advance ....

    HI Folks,
    Here is the perfect data for the problem that I mentioned....
    50% of the time is spent in javax.faces.webapp.UICompenentTag.doStartTag
    and other 50 % percent is in javax.faces.webapp.UICompenentTag.doEndTag
    Could you please tell me what exectly these methods do.
    Is it this thier natural behaviour? Please help me out...

  • Navigation problem in jsf

    i have created a simple login page in which two label and two text box for inter usename and password but after clicking submit button it does not navigate to the specified page as i have given in the facesconfig.xml file.here is my code.this page is welcomeJSF.jsp
    <%@page 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">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <f:view>
                <h:form id="loginForm">
                <table align="left" border="1" cellspacing="1" cellpadding="1">
                        <tr>
                            <td>
                                <h:outputText id="label1" rendered="true" value="Login Name"/>
                                <h:inputText id="text1" rendered="true" value=""/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <h:outputText id="label2" rendered="true" value="Password"/>
                                <h:inputText id="text2" rendered="true" value=""/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <h:commandButton id="button1" action="#{test.checkLogin}" value="Submit"/>
                                <h:commandButton id="button2" type="reset" value="Reset"/>
                            </td>
                        </tr>
                </table>
                </h:form>
            </f:view>
        </body>
    </html>
    and here is my facesconfig.xml file
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <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>
            <managed-bean-name>test</managed-bean-name>
            <managed-bean-class>com.test.Test</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
         <navigation-rule>
        <navigation-case>
          <from-outcome>login</from-outcome>
          <to-view-id>/Login.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
    </faces-config>
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Try this:
    page_1.jsp
    <%@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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Page 1</title>
    </head>
    <body>
    <f:view>
    <h:form id="loginForm">
    <h1>Page 1</h1>
    <table align="left" border="1" cellspacing="1" cellpadding="1">
    <tr>
    <td>
    <h:outputText id="label1" value="Login Name"/>
    <h:inputText id="text1" value="#{test.name}"/>
    </td>
    </tr>
    <tr>
    <td>
    <h:outputText id="label2" value="Password"/>
    <h:inputText id="text2" value="#{test.password}"/>
    </td>
    </tr>
    <tr>
    <td>
    <h:commandButton id="button1" action="#{test.checkLogin}" value="Submit"/>
    <h:commandButton id="button2" type="reset" value="Reset"/>
    </td>
    </tr>
    </table>
    </h:form>
    </f:view>
    </body>
    </html>
    page_2.jsp
    <%@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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Page 1</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h1>Page 2</h1>
    <h:outputText id="label1" value="#{test.name}"/>
    <h:outputText id="label2" value="#{test.password}"/>
    </h:form>
    </f:view>
    </body>
    </html>
    com.test.Test.java
    package com.test;
    public class Test {
    private String name;
    private String password;
    /** Creates a new instance of Test */
    public Test() {
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String checkLogin(){
    return "page_2";
    faces-config.xml
    <managed-bean>
    <managed-bean-name>test</managed-bean-name>
    <managed-bean-class>com.test.Test</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <navigation-case>
    <from-outcome>page_2</from-outcome>
    <to-view-id>/page_2.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    You need to be careful when refering to a jsp files, remember that is case sensitive, that could be your problem.

  • Navigation Problem in JSF - Urgent, pls help

    hi,
    I have a problem while navigating into a popup using a custom commandLink which opens the popup.The problem is that when i close the popup and return to the parent JSF and click any button or link in the parent, the page navigates to the page that was shown in the popup. This is my custom component:
    <hl:helplink id="alternateIdHelpLink" rendered="true" actionListener="#{helpBean.handleEvent}" value="Help" action="helpNeeded" target="NewWin" onclick="javascript:openPopup();"></hl:helplink>I have specified the navigation 'helpNeeded' inside the faces-config file which navigates to the page that is shown in the popup. So the problem is that i am unable to navigate to any other page after i open the popup(even after closing it).Can anyone pls find a solution for this problem.
    thanks and regards
    soorejkumar

    Thanks Sergey.Smirnov for the code..but its not working :-(...
    This is my javascript for opening the popup in my help.js file:
    function openPopup() {
        var windowDefn = "width=800, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes";
        win=window.open('',"NewWin", windowDefn);
    }On clicking the Custom Command Link the popup is opened. But then when i return back to the parent and click any other link or button the contents inside the popup is being displayed.
    <hl:helplink id="alternateIdHelpLink" rendered="true"  value="Help"  onclick="openPopup()" action="#{helpBean.execute}" target="NewWin" actionListener="#{helpBean.handleEvent}" ></hl:helplink>I tried to hard code the path of the jsf file into the popup but that gave an error that 'Page Cannot be Displayed'.
    I tried to get the path of the JSF using the contectPath as follows:
    var path= <%= renderResponse.encodeURL(renderRequest.getContextPath() + "/pages/epsHelp.jsp" %>;
    window.open('"+path+"','helpPopup','height=200,width=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');",null);When i viewed the source of the parent page the javascript was showing the correct context path ie "/help/pages/myjsf.jsp". What might be the issue.Can you please help..
    Thanks
    soorejkumar

Maybe you are looking for

  • How do I delete songs from Ipod Touch using Itunes?

    When I sync my ipod touch in itunes it adds songs that are already on the ipod. I need to be able to delete these duplicate songs on the ipod but cant seem to be able to detele songs from the ipod in Itunes. Help please.

  • Help with initial settings in Adobe Premier Elements 7

    I recently bought a Sony DSC-T500 camera which can shoot 720P MPEG4 AVC/H.264.  This week I purchased the Premier Elements 7 in hopes to edit video.  My question concerns the very first screen that shows up when you open a new project.  I'm unsure wh

  • HOW to update real time data from sap to other application?

    We have two option of passing data from sap to other system. 1. web service 2. through idoc. can anyone tell me advantages & disadv. of these two options. Which scenario shd we use web service & idoc. How is idoc triggerred.? Is it only through user

  • Apex LE/D 4088 Assistance

    I saw that there was a group of users who had the Apex 40" LE 4088 television on an earlier post and wanted to follow up with those users as this information doesn't seem to exist anywhere else and customer service with Apex is non-existent. Does any

  • Black screen when transition slides in published SWF file

    Hi there I have published a SWF file and when viewing it in IE, after a couple of slide transition, there is a particular slide that goes black. I checked the slide properties within captivate and there is no transition associated with it. Does anyon