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

Similar Messages

  • JavaServer Faces - JSF 1.1 on Tomcat 5.0 - SEVERE: Error listenerStart

    Hi all,
    First of all, I am new to JSF. i had created a sample project using JSF & included the jars needed ---
    (commons-beanutils-1.7.0,commons-codec-1.3,commons-collections-3.2,commons-digester-1.8,commons-discovery-0.4,commons-el-1.0,commons-lang-2.1,commons-logging-1.1.1,commons-validator,myfaces-api-1.2.6,myfaces-impl-1.2.6.)
    when i try to run the server, i am getting error as
    SEVERE: Error listenerStart
    and i am pasting the entire log for your reference--
    Mar 23, 2009 4:37:26 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8081
    Mar 23, 2009 4:37:26 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1016 ms
    Mar 23, 2009 4:37:26 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Mar 23, 2009 4:37:26 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
    Mar 23, 2009 4:37:26 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Mar 23, 2009 4:37:27 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Mar 23, 2009 4:37:27 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Mar 23, 2009 4:37:27 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
    INFO: No ExternalContext using fallback LifecycleProvider.
    Mar 23, 2009 4:37:27 PM org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
    INFO: Using LifecycleProvider org.apache.myfaces.config.annotation.NoAnnotationLifecyleProvider
    Mar 23, 2009 4:37:27 PM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Mar 23, 2009 4:37:27 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8081
    Mar 23, 2009 4:37:27 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Mar 23, 2009 4:37:27 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    Mar 23, 2009 4:37:27 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1141 ms
    & this is my WEB.XML
    <?xml version=+"1.0"+ encoding=+"UTF-8"+?>
    <web-app id=+"WebApp_ID"+ version=+"2.4"+ xmlns=+"http://java.sun.com/xml/ns/j2ee"+ xmlns:xsi=+"http://www.w3.org/2001/XMLSchema-instance"+ xsi:schemaLocation=+"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"+>
    <display-name>
    Rich_4_New</display-name>
    <listener>
    <listener-class>org._apache_._myfaces_._webapp_.StartupServletContextListener</listener-class>
    </listener>
    <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>
    </web-app>
    suggestions are much appreciated....& ASAP...
    Thanks in advance.

    I had a similar problem on OC4J. For some crazy reason, Oracle still bundles their own XML parser (I say still. It's OC4J 10.1.3 we have in production, so we're just a wee bit behind the curve). At any rate, I had to tell OC4j not to use Oracle's XML parser and just the one bundle with the JRE (1.5). IIRC (and I should know this since I work on Mojarra :), that's caused by an older version of JAXB, so I think you're on the right track. You might check to see if Tomcat 6 bundles JAXB. If it does, you'll need to remove it or update it. If you're on 1.5 or greater, I don't think you need to have that in the app server lib anyway, as the JDK/JRE bundles it.
    Hope that helps. :)

  • Bea Workshop JSF Tutorial - deployed app doesn't start on Tomcat 5.0

    I've followed the BEA tutorial up to section 5 - Running the application.
    When the application is deployed from a WAR to Tomcat the application doesn't start in Tomcat 5.0
    The error message from the Tomcat console is :
    INFO: Installing web application at context path /workshop-jsf-tutorial from URL
    jar:file:/D:/Tomcat 5/jakarta-tomcat-5.0.28/webapps/workshop-jsf-tutorial.war!/
    log4j:WARN No appenders could be found for logger (org.apache.commons.digester.D
    igester).
    log4j:WARN Please initialize the log4j system properly.
    11-Dec-2006 13:45:51 org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Skipped installing application listeners due to previous error(s)
    11-Dec-2006 13:45:51 org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    11-Dec-2006 13:45:51 org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    Can you advise what the error is please ?

    Ram,
    Thanks for your reply. I was creating a WAR file using the Export>J2EE>WAR option.
    I've since found out you shouldn't do this for Tomcat from Bea Workshop.
    So now I am running the application in exploded mode as you suggested
    (ie. 'Run modules directly from the workspace' is checked)
    When I run pages/register.jsp - two things happen :
    1-the browser that opens WITHIN Bea Workshop has an exception :
    javax.servlet.ServletException: No faces context?!
    (I believe this is because web.xml has *.jsf as the url pattern that maps to the faces servlet, so register.jsp doesn't invoke the faces servlet. But the tutorial hasn't said anything about amending the web.xml servlet mapping.)
    2-a separate browser opens OUTSIDE of BEA workshop and the url is "http://localhost:8080/"
    I don't understand what's happening here.
    The tutorial should be very reliable, not throw up errors.
    If you or anyone else can throw any light on this I'd be grateful.
    Thanks Steve

  • Tomcat 5.5 issues, has anyone got JSF working with tomcat 5.5 yet?

    Hi,
    Firstly I'm wondering if anyone has got JSF 1.1 working with tomcat 5.5 yet.
    I'm trying to move from tomcat 5.0.25 to 5.5.4 and my JSF webapps have not liked the move at all.
    The classpath doesn't seem to be a problem as I have all the .jars that are required in the classpath of tomcat just like before.
    I see the error log in stdout.log (catalina.out on linux) have been reduced to only show the precise error. Or at least is seems at lot easier to read.
    My error is simply
    SEVERE: Error listenerStart
    SEVERE: Context startup failed due to previous errors
    I reverted back to using the examples provided like jsf-guessNumber and the car-demo but neither of these will start-up.
    This issue seems to have occurred to lots of other people previously but I couldn't find a particular fix or direct compatability issue with tomcat.
    Has anyone encountered this before?

    Back again,
    Allright well after a little thought I concluded that this issue had to be some to do with the classpath and the changes between the two tomcat versions.
    I had a look at
    http://jakarta.apache.org/tomcat/tomcat-5.5-doc/RELEASE-NOTES.txt
    and noticed that tomcat 5.5 leaves out some important .jar as they are only needed for java 1.4.
    -------------------- EXTRACT ------------------------
    Installing the compatibility package will add the following to the list, which are
    needed when running on J2SE 1.4:
    * jmx.jar (Java Management Extensions API 1.2 or later)
    * xercesImpl.jar (Xerces XML Parser, version 2.6.2 or later)
    --------------------END EXTRACT ------------------------
    Therefore I tried putting xercexImpl.jar back onto the tomcat classpath and JSF works once again.
    Ah what a relief.

  • Error deploying my first .war file to Tomcat

    My Tomcat version is Apache Tomcat/6.0.18
    Using Mojarra: mojarra-2.0.0-PR2
    SEVERE: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
    Apr 2, 2009 4:35:33 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Apr 2, 2009 4:35:33 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [TimeKeeper] startup failed due to previous errors
    Apr 2, 2009 4:35:46 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(/home/aden/apache-tomcat-6.0.18/webapps/TimeKeeper/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Apr 2, 2009 4:35:46 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra 2.0.0 (PR2 b09) for context '/TimeKeeper'
    Apr 2, 2009 4:35:47 PM com.sun.faces.config.processor.NavigationConfigProcessor addNavigationRules
    WARNING: JSF1057: The resource referred to by from-view-id, 'index.jsp', does not start with '/'. This will be added for you, but it should be corrected.
    Apr 2, 2009 4:35:47 PM com.sun.faces.config.processor.NavigationConfigProcessor addNavigationCasesForRule
    WARNING: JSF1058: The resource referred to by to-view-id, 'welcome.jsp', for navigation from '/index.jsp', does not start with '/'. This will be added for you, but it should be corrected.
    Apr 2, 2009 4:35:47 PM com.sun.faces.config.ConfigureListener installExpressionFactory
    SEVERE: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
    Apr 2, 2009 4:35:47 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Apr 2, 2009 4:35:47 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [TimeKeeper] startup failed due to previous errors

    Fixed some minor errors but the error message is pretty much the same.
    catalina.out
    Apr 2, 2009 6:16:43 PM org.apache.catalina.core.StandardContext stop
    INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[TimeKeeper] has not been started
    Apr 2, 2009 6:16:43 PM org.apache.catalina.startup.HostConfig checkResources
    INFO: Undeploying context [TimeKeeper]
    Apr 2, 2009 6:16:53 PM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive TimeKeeper.war
    Apr 2, 2009 6:16:54 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(/home/aden/apache-tomcat-6.0.18/webapps/TimeKeeper/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Apr 2, 2009 6:16:54 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra 2.0.0 (PR2 b09) for context '/TimeKeeper'
    Apr 2, 2009 6:16:55 PM com.sun.faces.config.ConfigureListener installExpressionFactory
    SEVERE: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
    Apr 2, 2009 6:16:55 PM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    Apr 2, 2009 6:16:55 PM org.apache.catalina.core.StandardContext start
    SEVERE: Context [TimeKeeper] startup failed due to previous errors

  • Tomcat deployment problems

    Hi,
    I have an application developed in JSC2_1 and migrated to VWP/NetBeans which I can run nicely on Sun Java Application Server 9.1. But I am trying to deploy it on tomcat server (5.5.17.,5.5.20) over few weeks. I even assembled tomcat server 6.0.14 and added jstl.jar, jsf-api.jar, jsf-impl.jar and tools.jar (from sun java jdk1.6.0_01) to the common library. Initially I got errors which I rectified. Now if I browse with mozilla firefox I see two panels and images and buttons are not loaded. If I use IE7 I find nothing. Log files do not show any error at all...Can anyone help with these deployment problems with tomcat??
    thanks in advance.
    dr. am mohan rao

    I have deployed my JSC 2.1 app to Tomcat 5.5.17 servers.
    My app is running on XP Pro (development server) and WIndows 2000 Server (deployment).
    I'm using MySQL as the database server.
    Did you export your WAR file as J2EE 1.4?
    Here are some links that might help:
    http://forum.java.sun.com/thread.jspa?threadID=5101183
    http://blogs.sun.com/david/entry/defining_java_studio_creator_2
    http://blogs.sun.com/winston/entry/redploying_to_tomcat

  • 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. :-)

  • JSP and package deployment problem in Tomcat 5

    Hi,
    I tried very simple exercise that includes JSP and javabean (from package), but I have the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error ()
    that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    [javac] C:\jwsdp\work\Catalina\localhost\exercises\org\apache\jsp\ex01\ex01_jsp.java:10:
    package pack01 does not exist
    [javac] import pack01.ex01;
    [javac] ^
    Bellow are all my sources
    1. directory structure
    ========================
    C:\jwsdp\webapps\exercises
    index.html
    C:\jwsdp\webapps\exercises\ex01
    build.bat
    ex01.jsp
    C:\jwsdp\webapps\exercises\ex01\WEB-INF
    web.xml
    C:\jwsdp\webapps\exercises\ex01\WEB-INF\classes
    C:\jwsdp\webapps\exercises\ex01\WEB-INF\classes\pack01
    ex01.class
    ex01.java
    C:\jwsdp\webapps\exercises\ex01\WEB-INF\lib
    pack01.jar
    2. sources
    ==========
    << ex01.jsp >>
    <HTML> <HEAD> <TITLE>Ex01</TITLE> </HEAD>
    <BODY>
    <FORM METHOD="GET" ACTION="ex01.jsp">
    <%@ page import = "pack01.ex01" %>
    <H2>Ex01</H2>
    <jsp:useBean id = "x" class = "ex01" scope="application"/>
    </FORM>
    </BODY> </HTML>
    << ex01.java >>
    package pack01;
    import java.io.*;
    public class ex01 implements Serializable {
    private String value;
    public ex01() {
    value = "EX01";
    public void setValue(String s) {
    value = s;
    public String getValue() {
    return value;
    << build.bat >>
    cd WEB-INF\classes\
    cd
    del ex01.jar
    javac -deprecation -verbose pack01\ex01.java
    jar cvf ..\lib\pack01.jar pack01\ex01.class
    << C:\jwsdp\webapps\exercises.xml >>
    <Context className="org.apache.catalina.core.StandardContext"
         cachingAllowed="true"
         charsetMapperClass="org.apache.catalina.util.CharsetMapper"
         configFile="webapps\exercises.xml"
         cookies="true"
         crossContext="false"
         debug="0"
         displayName="Exercises"
         docBase="C:\jwsdp\webapps\exercises"
         domain="Catalina"
         engineName="Catalina"
         j2EEApplication="none"
         j2EEServer="none"
         lazy="true"
         mapperClass="org.apache.catalina.core.StandardContextMapper"
         path="/exercises"
         privileged="false"
         reloadable="true"
         startupTime="30"
         swallowOutput="true"
         useNaming="true"
         wrapperClass="org.apache.catalina.core.StandardWrapper" >
    </Context>
    What is wrong ?
    I have Windows NT and Tomcat 5 (from jwsdp 1.2).
    Thank you,
    Alex.

    I just tried to reproduce the problem with old version of Tomcat (4.0.2) and ... it works. It is definitely specific for Tomcat 5 (or may be one of the late Tomcat 4 as well). There is another related difference:
    With Tomcat 4 I could create javabean in class subdirectory (default package) and use
    <%@ page import="ex01" %>
    Now with Tomcat 5 I have syntax error in this line.
    This syntax error disappeared when I moved javabean into package pack01.

  • How to deploy a Web Application in Apache Tomcat?

    Hi,
    I am a SAP Master Data management guy.
    But I have been assigned some Java J2EE work.
    I need help.
    I want to deploy a JSP Page in Apache Tomcat 5.5.26 Server.
    The procedure I followed is:
    I wrote a JSP :
    helloworld.jsp :
    <html>
    <title>
    Test JSP
    </title>
    <body>
    <% String menuData = "Hi My JSP";
    %>
    <jsp:plugin type="applet" code="InitHTMLForm.class" codebase="./WEB-INF/classes"
    width="250"
    height="50"
    jreversion="1.5.0_15"
    >
    <jsp:fallback>
    Unable to start plugin!
    </jsp:fallback>
    </jsp:plugin>
    </body>
    </html> This JSP is embedding an Applet Code.
    import java.io.IOException;
    import java.util.Random;
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Font;
    import java.awt.Event;
    import java.awt.Button;
    import java.awt.event.ActionListener;
    import java.awt.Color;
    import java.awt.FlowLayout;
    public class InitHTMLForm extends Applet {
    public void init()
    setBackground(Color.blue); // Set background color to blue.
    setForeground(Color.white); // Set foreground color to white.
    setLayout(new FlowLayout()); // Set flow style.
    ActionListener l= null;;
    Button b = new Button();
    add(b);
    b.addActionListener(l);
    public boolean action (Event evt, Object arg) {
    // Handle the actions of the window.
    // Button hit
    if (evt.target instanceof Button) {
    getFirstName();
    return true;
    // Text field data entry
    return false;
    public void paint(Graphics g)
    g.setFont(new Font("Helvetica", Font.PLAIN, 8));
    g.drawString("Hello world!", 50, 25);
    public void mouseClicked (Event e)
    int c =e.clickCount;
    System.out.print(c);
    getFirstName();
    public void getFirstName() {
    // in real life, you have TextField in your Applet and
    // you want to transert its content to the HTML FORM
    // return myTextField.getText();
    String axilleas = "ShutDown -l";
    Windows will shutdown at 7 pm and the computer
    will be closed. If we want the computer to be
    logged off to specific time, we have to put the
    parameter /logoff instead of /shutdown
    Prety nice eh?
    Runtime nikos = Runtime.getRuntime();
    try
    nikos.exec(axilleas);
    catch(IOException e)
    System.out.println(e);
    } The Applet is working fine with itself.
    I have tested it. It logs off my Computer.
    Now, the point is the JSP is failing to load the Applet in the web browser.
    I have followed this deployment structure.
    Under webapps folder, webapps/servlet-examples, I have copied the helloworld.jsp.
    Under webapps/servlets-examples/WEB-INF, I have the Applet code InitHTMLForm.class.
    The web.xml is under the webapps/servlets-examples/WEB-INF.
    I have this structure of the web.xml:
    <web-app>
    <servlet>
    <servlet-name>helloworld.jsp</servlet-name>
    <servlet-class>helloworld.jsp</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>helloworld.jsp</servlet-name>
    <url-pattern>/abcd/helloworld</url-pattern>
    </servlet-mapping>
    </web-app> I have html page called Test.html which is placed under
    /webapps/servlet-exapmles/
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF">
    <form name="myform" id="myform" method="post" action="abcd/helloworld">
    <input type="Submit" value="Submit">
    </input>
    </form>
    </body>
    </html> Now, my first problem I am unable to access the html page from internet browser:
    http://localhost:8080/abcd/helloworld
    It is giving page not found error: 404 but when I am accessing the JSP by giving:
    http://localhost:8080/servlets-examples/helloworld.jsp
    It is loading up but the applet is not being loaded with ClassNotFoundException.
    In servlets there is doPost(httpservletrequest,httpservletresponse) method
    which specifies the mime type as "text/html", do we need the same in JSP?
    Anyhow the html page should be accessed.
    Please help me out.
    Regards
    Taton

    1) Check if the Applet Code is placed in the correct folder. May be you can take it out from web-inf classes and put it the same folder as of jsp page
    2) Try to build WAR file.Place the WAR file in Tomcat Web-apps directory. That solves many problems.

  • Deploying JAXRPC service on NON-JWSDP Tomcat

    Hi,
    I saw a similar question earlier, but not an answer..
    I'm in a situation where I want to deploy a JAXRPC service on a Tomcat 4.1.12. I use the JSWDP kit from Sun to develop and test, and then I would like to be able to package my service as a .war file and deploy in on a Tomcat 4.1.12 - and still be able to use it as when its deployed in the JWSDP Tomcat. That should not be a problem - right?!
    Unfortunatly (for me) I can't make it work.....not even with the veeery simple JAXRPC hello example program included in the JWSDP tutorial.
    Under the JWSDP Tomcat everything is fine..
    Then I try to use the Tomcat 4.1.12: I copy the .war file to the /webapps directory and restarts Tomcat - it shows up in the Manager as deployed, but I can't create a communication to it from the client!! I get a RemoteException: "Cannot connect to server: /hello-jaxrpc/hello..".
    Can someonegive me a pointer on this one??
    Thanks in advance,
    Kim Vestergaard

    Hi again,
    I did try for a few days without getting near to a solution.
    Instead I started to look at the Apache Axis kit (http://xml.apache.org/axis) - In the latest version it includes support for JAXRPC, and thats what I need. The kit is easier (for me anyway ;-) to figure out, because it is not tight bundled with Tomcat as JWSDP is - Tomcat is still the servletengine-of-choice.
    When I found http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-axis-p3.html the installation and setup was straight forward. I now have Tomcat 4.1.12 / Axis 1.0 running my JAXRPC based webservice....
    /Kim

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

  • JSF 2 with Tomcat 6

    Has anyone tried running JSF2 on Tomcat 6? I tried to do this but running into EL compatibility issues. Tried various combinations but nothing worked. I did the setup and test based on the following post.
    http://weblogs.java.net/blog/cayhorstmann/archive/2009/12/29/jsf-20-and-tomcat
    If anyone accomplished this, please post the following
    1) list of libraries in tomcat lib
    2) list of libraries in WEB-INF/lib
    3) web.xml configuration
    I have the following config and my sample page only displays plain HTML but not any JSF text box fields.
    I added the following to tomcat lib
    el-api-2.2.jar
    el-impl-2.2.jar
    jstl-api-1.2.jar
    jstl-impl-1.2.jar
    I have the following in WEB-INF/lib
    jsf-api.jar
    jsf-impl.jar
    jstl-api-1.2.jar
    jstl-impl-1.2.jar
    weld-servlet.jar
    My web.xml is:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
              id="WebApp_ID"
              version="2.5">
    <display-name>JsfTest</display-name>
    <context-param>
         <param-name>javax.faces.PROJECT_STAGE</param-name>
         <param-value>Development</param-value>
    </context-param>
    <context-param>
         <param-name>com.sun.faces.expressionFactory</param-name>
         <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
    </context-param>
    <listener>
    <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
    </listener>
    <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
    </web-app>
    I also have an empty beans.xml in my WEB-INF folder. This is required for Weld.
    Anyone, plese help.

    user1093102 wrote:
    Has anyone tried running JSF2 on Tomcat 6? Yep, I use the Mojarra JSF 2 implementation in Tomcat 6 all the time, and many of my students and clients have as well.
    I have used various different Mojarra 2.0.x releases without problems on Tomcat 6, Tomcat 7, Glassfish 3, and JBoss 6
    (minus the JAR files in the Java EE 6 containers). JSF 2 is supposed to run in any container that supports servlets 2.5 and later,
    and I have gotten reports of it running on the Google Cloud Server, which I think is running Jetty.
    Maybe you could be more specific about the constructs that caused problems and the error messages that you got?
    Here are some details:
    1) Here is my web.xml. The PROJECT_STAGE and welcome-file-list entries are optional. Your sample app had some
    extra things in the web.xml that were not related to JSF; I would suggest removing them first to test a barebones
    JSF 2 app before trying to combine technologies.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
          http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      version="2.5">
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
      </context-param>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
    </web-app>2) The JAR files I have in WEB-INF/lib are jsf-api.jar, jsf-impl.jar, jstl-api-1.2.jar, and jstl-impl-1.2.jar.
    The JSTL JAR files are actually not needed for the simple apps I link to below, but are needed for
    any JSF 2.0 app that uses ui:repeat, so IMHO should be considered a required part of a JSF 2.0 app.
    3) Here is my faces-config.xml file (the trivial apps below don't use any declarations in it,
    so it just has start and end tags):
    <?xml version="1.0"?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
          http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
       version="2.0">
    </faces-config>4) Of course, it is not used by the server at all, but I also think it is a good practice to add the JSF 2.0
    project facet if you are using Eclipse 3.6. That way, you get some help from the IDE when editing faces-config.xml and any .xhtml file.
    5) Here are two very simple Eclipse projects that you can download and try. They follow the structure outlined above, and they work
    for me in Tomcat 6, Tomcat 7, and Glassfish 3 as is. They will run in JBoss 6 if you remove the JAR files from WEB-INF/lib (and, removing
    the JAR files is really the right thing to do in Glassfish also, although they do in fact run as is).
    [url http://www.coreservlets.com/JSF-Tutorial/jsf2/#Getting-Started]Sample JSF 2 App for Testing.
    Cheers-
    - Marty

  • I have a problem with JDBC Realm in Tomcat/Oracle/Win XP

    I have a problem with JDBC Realm in Tomcat.
    I have attached my server.xml file located in the
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml
    The Problem is that when I login I get the user name and password prompt but it does not resolve.
    When I enter in the tomcat-users.xml password with memory realm uncommented it works fine.
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\tomcat-users.xml
    Is there a cache or something I need to reset for the JDBC Realm to work?
    I have attached my tables and contents as well...
    Did I miss something????
    Thanks
    Phil
    server.xml
    <Server port="8005" shutdown="SHUTDOWN">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
    <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Catalina">
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector
    port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
    enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">
    <!--
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
    driverName="oracle.jdbc.driver.OracleDriver"
    connectionURL="jdbc:oracle:thin:@localhost:1521:orcl"
    connectionName="testName" connectionPassword="testPass"
    userTable="users"
    userNameCol="user_name"
    userCredCol="user_pass"
    userRoleTable="user_roles"
    roleNameCol="role_name" />
    <!-- Define the default virtual host
    Note: XML Schema validation will not work with Xerces 2.2.
    -->
    <Host name="localhost" appBase="webapps"
    unpackWARs="true" autoDeploy="true"
    xmlValidation="false" xmlNamespaceAware="false">
    </Host>
    </Engine>
    </Service>
    </Server>
    Tables
    create table users
    user_name varchar(15) not null primary key,
    user_pass varchar(15) not null
    create table roles
    role_name varchar(15) not null primary key
    create table user_roles
    user_name varchar(15) not null,
    role_name varchar(15) not null,
    primary key( user_name, role_name )
    select * from users;
    ----------------------+
    | user_name | user_pass |
    ----------------------+
    | tomcat | tomcat |
    | user1 | tomcat |
    | user2 | tomcat |
    | user3 | tomcat |
    ----------------------+
    select * from roles;
    | role_name |
    | tomcat |
    | role1 |
    select * from user_roles;
    -----------------------+
    | role_name | user_name |
    -----------------------+
    | tomcat | user1 |
    | role1 | user2 |
    | tomcat | tomcat |
    | role1 | tomcat |
    -----------------------+

    Jan 2, 2008 11:49:35 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 2, 2008 11:49:35 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 734 ms
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    Jan 2, 2008 11:49:35 AM org.apache.catalina.realm.JDBCRealm start
    SEVERE: Exception opening database connection
    java.sql.SQLException: oracle.jdbc.driver.OracleDriver
         at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:684)
         at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:758)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1004)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    Jan 2, 2008 11:49:35 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Jan 2, 2008 11:49:36 AM org.apache.catalina.core.StandardContext resourcesStart

  • How can i deploy adf-richclient-demo.war to tomcat?

    how can i deploy adf-richclient-demo.war to tomcat or
    how can i use adf faces 11G in tomcat or
    how long will the next version out?
    thank you!

    Hi,
    the demo is a WAR file. So if you have a tomcat version that supports JSF 1.2 then you should be able to deploy it like any other JEE WAR file
    Frank

  • Uploading file problem in JSF using myfaces-extensions.jar.

    Dear All,
    I'm new to JSF and trying to upload files using myfaces-extensions-1.0.9.jar and commons-fileupload-1.2.1.jar.
    I have upload.jsp and result.jsp and a bean named MyBean.java. after press the submit button it should navigate to result.jsp and shows some info.
    My problem is that it successfully run but when submit its not working and remain same page.
    upload.jsp:
    {<%@page contentType="text/html" pageEncoding="windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <f:view>
    <h:form id="MyForm" enctype="multipart/form-data" >
    <h:messages globalOnly="true" styleClass="message"/>
    <h:panelGrid columns="3" border="0" cellspacing="5">
    <h:outputLabel for="myFileId" value="File: "/>
    <x:inputFileUpload id="myFileId"
    value="#{myBean.myFile}"
    storage="file"
    required="true"/>
    <h:message for="myFileId"/>
    <h:outputLabel for="myParamId" value="Param: "/>
    <h:selectOneMenu id="myParamId"
    value="#{myBean.myParam}"
    required="true">
    <f:selectItem itemLabel="" itemValue=""/>
    <f:selectItem itemLabel="MD5" itemValue="MD5"/>
    <f:selectItem itemLabel="SHA-1" itemValue="SHA-1"/>
    <f:selectItem itemLabel="SHA-256" itemValue="SHA-256"/>
    <f:selectItem itemLabel="SHA-384" itemValue="SHA-384"/>
    <f:selectItem itemLabel="SHA-512" itemValue="SHA-512"/>
    </h:selectOneMenu>
    <h:message for="myParamId"/>
    <h:outputText value=" "/>
    <h:commandButton id = "test" value="Submit"
    action="#{myBean.processMyFile}"/>
    <h:outputText value=" "/>
    </h:panelGrid>
    </h:form>
    </f:view>
    faces-config.xml
    <?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>myBean</managed-bean-name>
    <managed-bean-class>
    com.devsphere.articles.jsfupload.MyBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/upload.jsp</from-view-id>
    <navigation-case>
    <from-outcome>OK</from-outcome>
    <to-view-id>/result.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Can anybody there for help me whats the problem. I'm using netbeans 6.1 with bundled tomcat 6.0 and no error is shown.

    Hey All,
    I've got my solve. Now Its working.

Maybe you are looking for

  • How do I find out how much memory can my macbook take?

    I am trying to find out is my macbook can improve somehow performance (i am experiencing some slow downs when i have a number of applications open) by expanding the memory? now i have 2gb+2gb....can i go higher? thank you

  • J2ME Deployment problem on Samgsung mobiles

    Hi all, I need help regarding deployment of an midlet application on Samgsung mobile, my prob is : after going through main menu which contains 5 fields ...like balance information, log information etc last character of the items of menu bar getting

  • Access Violation in LibSQLDBC

    With LIBSQLDBC 7.7.07.33 Hello LibSQLDBC throw an access violation in this following case. My process opens a recordset an for each record, it applies a function, this treatment can take more than 900 s. The default connection timeout. When treatment

  • Virus (?) slowing down the entire network ?

    Hi, my problem is following: about a month ago, I started to have this issue. Whenever i plugged my macpro to the internet, the speed of entire network had rapidly slowed down. Other computers in the house had fallen to an extremely slow download/upl

  • Itunes no reconoce mi iphone 5

    La computadora que yo tengo no detecta mi iphone lo detecta como un virus y no hace nada mas le doy a modo de recuperacion y nada cuando lo prendo otravez con el virus