facebook

[Closed] Servlet action is not available

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #257457 Reply

    rdawe
    Member

    I’m migrating an existing project to another machine and I’m having problems. I can run Tomcat from Eclipse and deploy the application but I’m getting a Tomcat error Servlet action is not available. I keep comparing the two configurations and they seem identical to me yet I can’t get it running on the new machine, code is identical. I’m running Eclipse 3.2 with myEclipse 5.0. I’m new to struts and am getting hung up on configuration issues…frustrating.

    Any help would be appreciated.

    RD

    #257459

    Riyad Kalla
    Member

    RD,
    What URL are you using to access your page? Or does the page access fine, it’s just when you submit something to an action you get this failure?

    #257462

    rdawe
    Member

    Hi Riyad, thanks for the quick response. I’m accessing the page at http://localhost:8080/IWIC/Logon.do. Tomcat is running fine because if I leave off the Logon.do I can access the project directory structure that was deployed from ME. Its only when i try to submit something to an action.

    #257499

    Riyad Kalla
    Member

    Sounds like your StrutsServlet is not being registered correctly, when you start Tomcat, look at your startup Log, it should show you startup failures if there are any. If you don’t see any, paste the tomcat startup log here and your web.xml file. Please use code tags (code button at bottom) to wrap the source code, so it keeps it’s formatting.

    #257500

    rdawe
    Member

    Here is the tomcat startup log:

    Aug 23, 2006 4:25:51 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Aug 23, 2006 4:25:51 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1000 ms
    Aug 23, 2006 4:25:52 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Aug 23, 2006 4:25:52 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
    Aug 23, 2006 4:25:52 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Aug 23, 2006 4:25:52 PM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    Aug 23, 2006 4:25:52 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\conf\Catalina\localhost\admin.xml
    Aug 23, 2006 4:25:53 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config=’org.apache.struts.util.LocalStrings’, returnNull=true
    Aug 23, 2006 4:25:53 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config=’org.apache.struts.action.ActionResources’, returnNull=true
    Aug 23, 2006 4:25:53 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config=’org.apache.webapp.admin.ApplicationResources’, returnNull=true
    Aug 23, 2006 4:25:55 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\conf\Catalina\localhost\balancer.xml
    Aug 23, 2006 4:25:55 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\conf\Catalina\localhost\manager.xml
    Aug 23, 2006 4:25:55 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /IWIC from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\IWIC
    log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
    log4j:WARN Please initialize the log4j system properly.
    Aug 23, 2006 4:25:56 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /jsp-examples from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\jsp-examples
    Aug 23, 2006 4:25:57 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /Riddler from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\Riddler
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    Aug 23, 2006 4:25:57 PM org.apache.catalina.startup.ContextConfig applicationConfig
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Riddler]
    Aug 23, 2006 4:25:57 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\ROOT
    Aug 23, 2006 4:25:57 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /servlets-examples from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\servlets-examples
    Aug 23, 2006 4:25:57 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /tomcat-docs from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\tomcat-docs
    Aug 23, 2006 4:25:57 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /webdav from URL file:C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\webapps\webdav
    Aug 23, 2006 4:25:57 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Aug 23, 2006 4:25:57 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    Aug 23, 2006 4:25:57 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/63 config=C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28\conf\jk2.properties
    Aug 23, 2006 4:25:58 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 6063 ms

    Here is my web.xml:

    
     <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>3</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>3</param-value>
        </init-param>
        <load-on-startup>5</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>
    
    
    #257502

    Riyad Kalla
    Member

    Ok that looks fine, what does your /Logon mapping look like from your struts-config.xml file?

    #257504

    rdawe
    Member
    
    
    <form-beans>         
          <form-bean name="viewLogonForm"   type="com.covansys.iwic.formbeans.logon.LogonForm" />
        
    <!--more form beans--> 
    
    </form-beans>
    
    
    
    <action-mappings >  
    
    
    <!-- Logon Action -->
          <action
             path="/Logon"
             name="viewLogonForm"
             scope="request"
             validate="false"
             parameter="dispatch"
             type="com.covansys.iwic.action.logon.ViewLogonAction">
                 <forward 
                     name="success" 
                     path="/WEB-SITE/Pages/Logon/logon.jsp"/>         
                 <forward 
                     name="failure" 
                     path="/WEB-SITE/Pages/Error/exception.jsp"/>         
          </action>  
    
    <!--more action mappings-->
    
    </action-mappings>
    
    #257505

    Riyad Kalla
    Member

    Geez this all looks fine, I was hoping you would show me some horribly mangled page. Can you export this project to an Archive and email it to me (support@genuitec.com ATTN Riyad with a link to this thread so I know why I”m getting it)

    I’ll have a look, maybe it’s just a setup on your end.

    #257507

    rdawe
    Member

    Its pretty big, 12 MB zipped down. Will your mail gateways accept? I’ll guess i’ll find out soon.

    #257508

    Riyad Kalla
    Member

    Iif it rejects it, you can remove the struts libs and I”ll just re-add them on this end.

    #257509

    rdawe
    Member

    Riyad,
    Looks like it sent fine, no errors on my end. Let me know if don’t get it and I’ll remove the libraries and try again.

    #257521

    Riyad Kalla
    Member

    Richard,
    I got your example and installed it, immediately deployed it to Tomcat and ran it connecting to:
    http://localhost:8080/IWIC/Logon.do

    and got a Hibernate exception, but that was only after about 10 seconds of Tomcat trying to process the request, so as far as I can tell, your project is perfectly fine (otherwise I think it would have kicked back the .do error right away unless I’m mistaken about the Struts processing order).

    I would suggest you try and re-download Tomcat 5.5.17 zip file, unzip it somewhere, adjust MyEclipse to point at it, redeploy your project and run it, does it work?

    #257546

    rdawe
    Member

    You should have a hibernate exception since you don’t have the database it maps to. Hm. Alright, I’ll reload tomcat and see what happens.

    #257553

    rdawe
    Member

    Riyad, you’re a miracle worker. I’m up and running. I was actually running tomcat 5.0 so I upgraded to 5.5 but needed the 1.5 jvm to run it? Took a minute to figure out that I could run 1.4.2 in ME and 1.5 for the application server. Knew this was just a configuration error. Thanks so much for your help.

    #257570

    Riyad Kalla
    Member

    I was actually running tomcat 5.0 so I upgraded to 5.5 but needed the 1.5 jvm to run it?

    It’s possible to run Tomcat 5.5 with JDK 1.4, but it requires some changes and compatability libraries, I would encourage you to run it with JDK 1.5 if you don’t mind.

    I’m glad it’s working though.

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: [Closed] Servlet action is not available

You must be logged in to post in the forum log in