404 Error on Servlet under HTTPS

Hi,
This is the first time that I've had to work with SSL. I have a servlet that worked fine under regular http. I had to implement SSL and run my site over https. When I try to access my servlet under HTTPS, I get the 404 File not found error. Is there something that I need to setup for servlets to run under SSL in apache or server.xml? or Do I need to modify my JSP and Servlet code?
I call my servlet from my JSP on the action method of the form like such:
* JSP call to servlet
<form action="https://www.benefitserver.com:8081/FDFServlet" method="post">***********
* Servlet code
import javax.servlet.*;
import javax.servlet.http.*;
import javax.net.ssl.*;
import java.io.*;
import java.util.*;
import com.yoursummit.benefitserver.*;
import com.adobe.fdf.*;
import com.adobe.fdf.exceptions.*;
public class FDFServlet extends HttpServlet
    private static final String CONTENT_TYPE = "text/html";
    private String fileout = "";
    //Initialize global variables
    public void init() throws ServletException
        System.setProperty("java.protocol.handler.pkgs","sun.net.ssl.internal.www.protocol");
        java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    //Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        doPost( request, response);
    //Process the HTTP Post request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        String planID = request.getParameter("planID");
        String empID = request.getParameter("empID");
        HttpSession session = request.getSession();
          try {
               FDFDoc outputFDF = null;
               /* Create a new FDF. */
               outputFDF = new FDFDoc();
            //  Set the form fields with values from the database
            if ( planID.equalsIgnoreCase("31") )
               formDeltaPopulation formDP = new formDeltaPopulation();
               fileout = formDP.populateDeltaForm( outputFDF, planID, empID, request );
            if (planID.equalsIgnoreCase("29") )
                formUnicarePopulation formUC = new formUnicarePopulation();
                fileout = formUC.populateUnicareForm( outputFDF, planID, empID, request );
            if (planID.equalsIgnoreCase("30") || planID.equalsIgnoreCase("32") || planID.equalsIgnoreCase("33") || planID.equalsIgnoreCase("34")  || planID.equalsIgnoreCase("35"))
                formSunLifePopulation formSL = new formSunLifePopulation();
                fileout = formSL.populateSunLifeForm( outputFDF, planID, empID, request );
            response.sendRedirect(com.yoursummit.utils.urlRewrite.getServletURL(request,"emp_main.jsp?empID=" + empID));
        } catch(FDFException fdfe) {
            /* We handle an error by emitting an html header */
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("Caught FDF exception");
            out.println(fdfe.toString());
            fdfe.printStackTrace(out);
            IOException e = new IOException ( fdfe.getMessage() );
            throw e;
        catch(IOException ioe) {
           /* We handle an error by emitting an html header */
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("Caught FDF exception");
            out.println(ioe.toString());
            ioe.printStackTrace(out);
            throw ioe;
        catch(Exception e) {
            /* We handle an error by emitting an html header */
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("Caught tomcatDB exception");
            out.println(e.toString());
            e.printStackTrace(out);
            IOException ioe = new IOException ( e.getMessage() );
            throw ioe;
    //Clean up resources
    public void destroy()
}

I have been told that there is problem with my configuration of Tomcat. I have followed the documentation found at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
and it doesn't work. I have been working on this for a week now and can't seem to get it to work. Can someone please take a look at it and tell me what I am doing wrong? THANKS!
I get "HTTP 404 - File not Found" with the URL https://www.benefitserver.com/FDFServlet
I get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request" with the URL https://www.benefitserver.com/servlet/FDFServlet
I've looked at the log files for Apache and I don't see any errors listed. No errors logged in the Tomcat log file either.
* httpd.conf
## Include line for mod_jk.so (Jakarta-Tomcat installation)
#Include /usr/home/summimps/usr/local/jakarta/jakarta-tomcat-3.2.3/conf/mod_jk.conf-auto
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /usr/home/summimps/usr/tomcat4.1.24/conf/worker.properties
JkLogFile /usr/home/summimps/var/log/mod_jk.log
JkLogLevel info
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#JkRequestLogFormat "%w %V %T"
JkMount /*.jsp benefitserver
JkMount /solarc/*.jsp benefitserver
JkMount /servlet/* ajp13
JkMount /solarc/servlet/* ajp13
# Should mod_jk send SSL information to Tomcat (default is On)
#JkExtractSSL On
# What is the indicator for SSL (default is HTTPS)
JkHTTPSIndicator HTTPS
# What is the indicator for SSL session (default is SSL_SESSION_ID)
JkSESSIONIndicator SSL_SESSION_ID
# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
JkCIPHERIndicator SSL_CIPHER
# What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT)
JkCERTSIndicator SSL_CLIENT_CERT
<Directory />
AllowOverride None
</Directory>
<Directory "/usr/tomcat4.1.24/webapps/ROOT">
  Options Indexes
  <IfDefine SSL>
    SSLRequireSSL
    SSLOptions +StdEnvVars +ExportCertData +StrictRequire
    SSLVerifyClient require
    SSLVerifyDepth 1
  </IfDefine>
</Directory>
<VirtualHost benefitserver.com www.benefitserver.com>
SSLRequireSSL
ServerName benefitserver.com
ServerAdmin [email protected]
DocumentRoot /usr/local/etc/httpd/htdocs/benefitserver
TransferLog /usr/local/etc/httpd/logs/bsAccess_log
ErrorLog /usr/local/etc/httpd/logs/bsError_log
#DocumentRoot /usr/local/jakarta/jakarta-tomcat-3.2.3/webapps/benefitserver
</VirtualHost>
* server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="0" port="8006" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
<GlobalNamingResources>
</GlobalNamingResources>
<Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
          redirectPort="8443"
          bufferSize="2048"
          port="8081"
          connectionTimeout="20000"
          scheme="https"
          enableLookups="true"
          secure="true"           protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
          debug="0"
          disableUploadTimeout="true"
          maxKeepAliveRequests="100"
          proxyPort="0"
          tcpNoDelay="true"
          minProcessors="5"
          maxProcessors="75"
          acceptCount="100"
          useURIValidationHack="false"
          connectionLinger="-1"
          compression="off">
      <Factory className="org.apache.catalina.net.SSLServerSocketFactory" keystoreFile="//.keystore" keystoreType="JKS" algorithm="SunX509" clientAuth="false" protocol="TLS"/>
    </Connector>
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" redirectPort="8443" bufferSize="2048" port="8010" connectionTimeout="0" scheme="http" enableLookups="true" secure="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" debug="0" disableUploadTimeout="false" maxKeepAliveRequests="100" proxyPort="0" tcpNoDelay="true" minProcessors="5" maxProcessors="75" acceptCount="10" useURIValidationHack="false" connectionLinger="-1" compression="off">
      <Factory className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>
    <Engine className="org.apache.catalina.core.StandardEngine" mapperClass="org.apache.catalina.core.StandardEngineMapper" debug="0" defaultHost="localhost" name="Standalone">
     <Host className="org.apache.catalina.core.StandardHost"
          appBase="webapps"
          liveDeploy="true"
          mapperClass="org.apache.catalina.core.StandardHostMapper"
          autoDeploy="true"
          configClass="org.apache.catalina.startup.ContextConfig"
          errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
          debug="9"
          deployXML="true"
          contextClass="org.apache.catalina.core.StandardContext"
          unpackWARs="true"
          name="localhost">
             <Context className="org.apache.catalina.core.StandardContext"
          crossContext="false"
          reloadable="true"
          mapperClass="org.apache.catalina.core.StandardContextMapper"
          useNaming="true"
          debug="0"
          swallowOutput="false"
          privileged="false"
          displayName="Welcome to BenefitServer"
          wrapperClass="org.apache.catalina.core.StandardWrapper"
          docBase="/usr/tomcat4.1.24/webapps/ROOT"
          cookies="true"
          path=""
          cachingAllowed="true"
          charsetMapperClass="org.apache.catalina.util.CharsetMapper">
               <Environment name="uploadUrl" override="true" type="java.lang.String" description="URL to display uploaded file in Benefit Server" value="http://www.benefitserver.com:8081/bsup"/>
               <Environment name="exportPath" override="true" type="java.lang.String" description="Export Path for Benefit Server Export Utility" value="/usr/tomcat4.1.24/webapps/ROOT/bsex"/>
               <Environment name="uploadPath" override="true" type="java.lang.String" description="Upload Path for Benefit Server" value="/usr/tomcat4.1.24/webapps/ROOT/bsup/"/>
               <Environment name="tempPath" override="true" type="java.lang.String" description="Temporary Directory for File Upload in Benefit Server - Developm" value="/usr/home/summimps/tmp/benefitserver"/>
               <Resource name="BS_Data" type="javax.sql.DataSource" scope="Shareable"/>
               <ResourceParams name="BS_Mail">
                 <parameter>
                   <name>mail.smtp.host</name>
                   <value>localhost</value>
                      </parameter>
               </ResourceParams>
               <ResourceParams name="BS_Data">
                 <parameter>
                   <name>url</name>
                   <value>jdbc:mysql://localhost/BS_Data</value>
                 </parameter>
                 <parameter>
                   <name>password</name>
                   <value>kdsusa1350</value>
                 </parameter>
                 <parameter>
                   <name>maxActive</name>
                   <value>50</value>
                 </parameter>
                 <parameter>
                   <name>maxWait</name>
                   <value>5000</value>
                 </parameter>
                 <parameter>
                   <name>driverClassName</name>
                   <value>com.mysql.jdbc.Driver</value>
                 </parameter>
                 <parameter>
                   <name>username</name>
                   <value>summimps</value>
                 </parameter>
                 <parameter>
                   <name>maxIdle</name>
                   <value>5</value>
                 </parameter>
               </ResourceParams>
            </Context>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="catalina_log." directory="logs" timestamp="true" suffix=".txt"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase" validate="true"/>
    </Engine>
  </Service>
* web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
       <servlet>
             <servlet-name>FDFServlet</servlet-name>
             <servlet-class>FDFServlet</servlet-class>
       </servlet>
       <servlet-mapping>
            <servlet-name>FDFServlet</servlet-name>
            <url-pattern>/FDFServlet</url-pattern>
       </servlet-mapping>
</web-app>

Similar Messages

  • 404 File not Found error trying servlet under https

    Hi,
    This is the first time that I've had to work with SSL. I have a servlet that worked fine under regular http. I had to implement SSL and run my site over https. When I try to access my servlet under HTTPS, I get the 404 File not found error. Is there something that I need to setup for servlets to run under SSL in apache or server.xml? or Do I need to modify my JSP and Servlet code?
    I call my servlet from my JSP on the action method of the form like such:
    * JSP call to servlet
    <form action="https://www.benefitserver.com:8081/FDFServlet" method="post">
    * Servlet code
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.net.ssl.*;
    import java.io.*;
    import java.util.*;
    import com.yoursummit.benefitserver.*;
    import com.adobe.fdf.*;
    import com.adobe.fdf.exceptions.*;
    public class FDFServlet extends HttpServlet
    private static final String CONTENT_TYPE = "text/html";
    private String fileout = "";
    //Initialize global variables
    public void init() throws ServletException
    System.setProperty("java.protocol.handler.pkgs","sun.net.ssl.internal.www.protocol");
    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    //Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    doPost( request, response);
    //Process the HTTP Post request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String planID = request.getParameter("planID");
    String empID = request.getParameter("empID");
    HttpSession session = request.getSession();
              try {
                   FDFDoc outputFDF = null;
                   /* Create a new FDF. */
                   outputFDF = new FDFDoc();
    // Set the form fields with values from the database
    if ( planID.equalsIgnoreCase("31") )
    formDeltaPopulation formDP = new formDeltaPopulation();
    fileout = formDP.populateDeltaForm( outputFDF, planID, empID, request );
    if (planID.equalsIgnoreCase("29") )
    formUnicarePopulation formUC = new formUnicarePopulation();
    fileout = formUC.populateUnicareForm( outputFDF, planID, empID, request );
    if (planID.equalsIgnoreCase("30") || planID.equalsIgnoreCase("32") || planID.equalsIgnoreCase("33") || planID.equalsIgnoreCase("34") || planID.equalsIgnoreCase("35"))
    formSunLifePopulation formSL = new formSunLifePopulation();
    fileout = formSL.populateSunLifeForm( outputFDF, planID, empID, request );
    response.sendRedirect(com.yoursummit.utils.urlRewrite.getServletURL(request,"emp_main.jsp?empID=" + empID));
    } catch(FDFException fdfe) {
    /* We handle an error by emitting an html header */
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("Caught FDF exception");
    out.println(fdfe.toString());
    fdfe.printStackTrace(out);
    IOException e = new IOException ( fdfe.getMessage() );
    throw e;
    catch(IOException ioe) {
         /* We handle an error by emitting an html header */
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("Caught FDF exception");
    out.println(ioe.toString());
    ioe.printStackTrace(out);
    throw ioe;
    catch(Exception e) {
    /* We handle an error by emitting an html header */
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("Caught tomcatDB exception");
    out.println(e.toString());
    e.printStackTrace(out);
    IOException ioe = new IOException ( e.getMessage() );
    throw ioe;
    //Clean up resources
    public void destroy()
    }

    I have been told that there is problem with my configuration of Tomcat. I have followed the documentation found at
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html
    and it doesn't work. I have been working on this for a week now and can't seem to get it to work. Can someone please take a look at it and tell me what I am doing wrong? THANKS!
    I get "HTTP 404 - File not Found" with the URL https://www.benefitserver.com/FDFServlet
    I get "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request" with the URL https://www.benefitserver.com/servlet/FDFServlet
    I've looked at the log files for Apache and I don't see any errors listed. No errors logged in the Tomcat log file either.
    * httpd.conf
    ## Include line for mod_jk.so (Jakarta-Tomcat installation)
    #Include /usr/home/summimps/usr/local/jakarta/jakarta-tomcat-3.2.3/conf/mod_jk.conf-auto
    LoadModule jk_module libexec/mod_jk.so
    AddModule mod_jk.c
    JkWorkersFile /usr/home/summimps/usr/tomcat4.1.24/conf/worker.properties
    JkLogFile /usr/home/summimps/var/log/mod_jk.log
    JkLogLevel info
    #JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    #JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
    #JkRequestLogFormat "%w %V %T"
    JkMount /*.jsp benefitserver
    JkMount /solarc/*.jsp benefitserver
    JkMount /servlet/* ajp13
    JkMount /solarc/servlet/* ajp13
    # Should mod_jk send SSL information to Tomcat (default is On)
    #JkExtractSSL On
    # What is the indicator for SSL (default is HTTPS)
    JkHTTPSIndicator HTTPS
    # What is the indicator for SSL session (default is SSL_SESSION_ID)
    JkSESSIONIndicator SSL_SESSION_ID
    # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
    JkCIPHERIndicator SSL_CIPHER
    # What is the indicator for the client SSL certificated (default is SSL_CLIENT_CERT)
    JkCERTSIndicator SSL_CLIENT_CERT
    <Directory />
    AllowOverride None
    </Directory>
    <Directory "/usr/tomcat4.1.24/webapps/ROOT">
      Options Indexes
      <IfDefine SSL>
        SSLRequireSSL
        SSLOptions +StdEnvVars +ExportCertData +StrictRequire
        SSLVerifyClient require
        SSLVerifyDepth 1
      </IfDefine>
    </Directory>
    <VirtualHost benefitserver.com www.benefitserver.com>
    SSLRequireSSL
    ServerName benefitserver.com
    ServerAdmin [email protected]
    DocumentRoot /usr/local/etc/httpd/htdocs/benefitserver
    TransferLog /usr/local/etc/httpd/logs/bsAccess_log
    ErrorLog /usr/local/etc/httpd/logs/bsError_log
    </VirtualHost>
    * server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server className="org.apache.catalina.core.StandardServer" debug="0" port="8006" shutdown="SHUTDOWN">
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0" jsr77Names="false"/>
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>
      <GlobalNamingResources>
      </GlobalNamingResources>
      <Service className="org.apache.catalina.core.StandardService" debug="0" name="Tomcat-Standalone">
        <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    redirectPort="8443" bufferSize="2048" port="8081" connectionTimeout="20000" scheme="https" enableLookups="true" secure="true" protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" debug="0" disableUploadTimeout="true" maxKeepAliveRequests="100" proxyPort="0" tcpNoDelay="true" minProcessors="5" maxProcessors="75" acceptCount="100" useURIValidationHack="false" connectionLinger="-1" compression="off">
          <Factory className="org.apache.catalina.net.SSLServerSocketFactory" keystoreFile="//.keystore" keystoreType="JKS" algorithm="SunX509" clientAuth="false" protocol="TLS"/>
        </Connector>
        <Engine className="org.apache.catalina.core.StandardEngine" mapperClass="org.apache.catalina.core.StandardEngineMapper" debug="0" defaultHost="localhost" name="Standalone">
          <Host className="org.apache.catalina.core.StandardHost" appBase="webapps" liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" autoDeploy="true" configClass="org.apache.catalina.startup.ContextConfig" errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" debug="9" deployXML="true" contextClass="org.apache.catalina.core.StandardContext" unpackWARs="true" name="localhost">
            <Context className="org.apache.catalina.core.StandardContext" crossContext="false" reloadable="false" mapperClass="org.apache.catalina.core.StandardContextMapper" useNaming="true" debug="0" swallowOutput="false" privileged="false" displayName="Welcome to Tomcat" wrapperClass="org.apache.catalina.core.StandardWrapper" docBase="/usr/tomcat4.1.24/webapps/ROOT" cookies="true" path="" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper">
              <Environment name="uploadUrl" override="true" type="java.lang.String" description="URL to display uploaded file in Benefit Server" value="http://www.benefitserver.com:8081/bsup"/>
              <Environment name="exportPath" override="true" type="java.lang.String" description="Export Path for Benefit Server Export Utility" value="/usr/tomcat4.1.24/webapps/ROOT/bsex"/>
              <Environment name="uploadPath" override="true" type="java.lang.String" description="Upload Path for Benefit Server" value="/usr/tomcat4.1.24/webapps/ROOT/bsup/"/>
              <Environment name="tempPath" override="true" type="java.lang.String" description="Temporary Directory for File Upload in Benefit Server - Developm" value="/usr/home/summimps/tmp/benefitserver"/>
              <Resource name="BS_Data" type="javax.sql.DataSource" scope="Shareable"/>
              <ResourceParams name="BS_Mail">
                <parameter>
                  <name>mail.smtp.host</name>
                  <value>localhost</value>
                </parameter>
              </ResourceParams>
              <ResourceParams name="BS_Data">
                <parameter>
                  <name>url</name>
                  <value>jdbc:mysql://localhost/BS_Data</value>
                </parameter>
                <parameter>
                  <name>password</name>
                  <value>kdsusa1350</value>
                </parameter>
                <parameter>
                  <name>maxActive</name>
                  <value>50</value>
                </parameter>
                <parameter>
                  <name>maxWait</name>
                  <value>5000</value>
                </parameter>
                <parameter>
                  <name>driverClassName</name>
                  <value>com.mysql.jdbc.Driver</value>
                </parameter>
                <parameter>
                  <name>username</name>
                  <value>summimps</value>
                </parameter>
                <parameter>
                  <name>maxIdle</name>
                  <value>5</value>
                </parameter>
              </ResourceParams>
            </Context>
            <Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="localhost_log." directory="logs" timestamp="true" suffix=".txt"/>
          </Host>
          <Logger className="org.apache.catalina.logger.FileLogger" debug="0" verbosity="1" prefix="catalina_log." directory="logs" timestamp="true" suffix=".txt"/>
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase" validate="true"/>
        </Engine>
      </Service>
    </Server>
    * web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
           <servlet>
                 <servlet-name>FDFServlet</servlet-name>
                 <servlet-class>FDFServlet</servlet-class>
           </servlet>
           <servlet-mapping>
                <servlet-name>FDFServlet</servlet-name>
                <url-pattern>/FDFServlet</url-pattern>
           </servlet-mapping>
    </web-app>

  • HTTp 404 error in servlet

    When ever i try to invoke a servlet it says HTTP 404 The page cannot be
    found.Allthe mappings in web.xml are perfect.I am using WAS6.1
    But HTML and JSP files work perfect.Even if I give a mapping for JSP it works fine.
    But servlets alone are not getting invoked.Please suggest a solution.

    My suggestion is that:
    1) your mappings are actually not perfect
    2) your classes are not stored properly or your packages are faulty
    Please provide some additional details, such as what packages you are using and where you are storing your classes. Also post a sample servlet mapping from your web.xml

  • 404 error using servlet

    I cannot for the life of me make ColdFusion 8 Developer
    Edition serve up my custom servlet.
    I am requesting:
    http://localhost:8500/myapp/com.example.MyApp/MyService
    And have web.xml configured like so...
    <servlet>
    <servlet-name>MyService</servlet-name>
    <display-name>Display Name goes
    here</display-name>
    <description>This is the description of the MyService
    Service</description>
    <servlet-class>com.example.MyServiceImpl</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyService</servlet-name>
    <url-pattern>/myapp/GWT_MODULES/com.example.MyApp/MyService</url-pattern>
    </servlet-mapping>
    I get the following error when I run the above request:
    404
    java.io.FileNotFoundException
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:94)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    One (possible) clue as to what's going wrong might be what
    happens when I make a bad request. For example, requesting
    http://localhost:8500/myapp/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    results in a slightly different error:
    404
    /myapp/GWT_MODULES/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    java.io.FileNotFoundException:
    /myapp/GWT_MODULES/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    at
    jrun.servlet.file.FileServlet.service(FileServlet.java:349)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This difference suggests to me that the mapping I'm doing in
    web.xml is actually having effect I want, but that I'm missing
    something else. For instance, is there something I need to do in
    jrun-web.xml?
    Thanks in advance for any help.
    e.

    I cannot for the life of me make ColdFusion 8 Developer
    Edition serve up my custom servlet.
    I am requesting:
    http://localhost:8500/myapp/com.example.MyApp/MyService
    And have web.xml configured like so...
    <servlet>
    <servlet-name>MyService</servlet-name>
    <display-name>Display Name goes
    here</display-name>
    <description>This is the description of the MyService
    Service</description>
    <servlet-class>com.example.MyServiceImpl</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyService</servlet-name>
    <url-pattern>/myapp/GWT_MODULES/com.example.MyApp/MyService</url-pattern>
    </servlet-mapping>
    I get the following error when I run the above request:
    404
    java.io.FileNotFoundException
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:94)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    One (possible) clue as to what's going wrong might be what
    happens when I make a bad request. For example, requesting
    http://localhost:8500/myapp/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    results in a slightly different error:
    404
    /myapp/GWT_MODULES/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    java.io.FileNotFoundException:
    /myapp/GWT_MODULES/com.example.MyApp/MyServiceBADREQUEST_NOTMAPPED
    at
    jrun.servlet.file.FileServlet.service(FileServlet.java:349)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This difference suggests to me that the mapping I'm doing in
    web.xml is actually having effect I want, but that I'm missing
    something else. For instance, is there something I need to do in
    jrun-web.xml?
    Thanks in advance for any help.
    e.

  • [Solved] Pacman fails to get packages http 403 or 404 error

    Hi,
    I'm not sure if I should raise this as a bug or not, or indeed if I am doing something fundamentally wrong...
    Pacman tells me there are updates to do, but:
    Using the mirror "mirrors.manchester.m247.com" I get a 404 error
    Using the mirror "http://mirror.bytemark.co.uk/archlinux/$repo/os/$arch" I get a 403 error
    example:
    # pacman -Syu
    :: Synchronizing package databases...
    core is up to date
    extra is up to date 0.0 B 0.00B/s 00:00 [-----------------------------------------------------------------------] 0%
    community is up to date 0.0 B 0.00B/s 00:00 [-----------------------------------------------------------------------] 0%
    multilib is up to date 0.0 B 0.00B/s 00:00 [-----------------------------------------------------------------------] 0%
    :: Starting full system upgrade...
    resolving dependencies...
    looking for conflicting packages...
    Packages (9) ca-certificates-mozilla-3.18-3 dhcpcd-6.8.1-1 gnupg-2.1.2-3 iptables-1.4.21-3 p11-kit-0.23.1-2 procps-ng-3.3.10-2 sudo-1.8.13-1 which-2.21-1 whois-5.2.7-1
    Total Download Size: 0.03 MiB
    Total Installed Size: 21.35 MiB
    Net Upgrade Size: 4.34 MiB
    :: Proceed with installation? [Y/n]
    :: Retrieving packages ...
    error: failed retrieving file 'whois-5.2.7-1-x86_64.pkg.tar.xz' from mirrors.manchester.m247.com : The requested URL returned error: 404
    warning: failed to retrieve some files
    error: failed to commit transaction (unexpected error)
    Errors occurred, no packages were upgraded.
    any ideas?
    [edited to add solved tag to title]
    Last edited by flangemonkey (2015-04-01 15:29:18)

    Hi flangemonkey,
    that mirror was not synced yet when you did the upgrade (the last sync ended today at 10:54 UTC, about 17 mitues after you posted on this borad). It should be ok now, just try to redo the update. Next time, you may want to check first the status of the mirrors https://www.archlinux.org/mirrors/status
    edit: typo
    Last edited by mauritiusdadd (2015-04-01 11:06:10)

  • WebLogic Server 9.2 Windows - javax.servlet.ServletException: [HTTP:101250]

    Hi,
    I am using BEA WebLogic Server 9.2
    When I deployed my [ear] apllication (Struts 1, Java 1.4, EJB2) I get this error:
    Message icon - Error     javax.servlet.ServletException: [HTTP:101250][weblogic.servlet.internal.WebAppServletContext@11c2137 -
    appName: 'test-ear', name: 'TEST', context-path: '/TEST']: Servlet class de.general.TestActionServlet for servlet action could not be loaded because a class on which
    it depends was not found in the classpath . java.lang.NoClassDefFoundError:
    org/apache/struts/action/ActionServlet.     
    Please help me in this ClassLoader problem,
    Regards

    Hi
    you can set the classpath struts.jar in setDomainEnv.cmd
    you can get this file in your root domain under the bin directory.
    set classpath=%classpath%;/struts.jar;

  • Ran the reprovision powersheel sripts still no Central admin site on a 404 error

    I still have no central admin site.
    When I call it thru the browser I get a 404 error.
    I ran these scripts:
    .\psconfig.exe -cmd adminvs
    -unprovision
    .\psconfig.exe -cmd adminvs
    -provision -port 9999
    -windowsauthprovider onlyusentlm
     the message came back telling me that the CA is at the location etc.. no errors were thrown when I ran the scripts.
    What Else can I check?

    I'm on  windows server 2012 and this is SharePoint 2013
    Windows Authentication is Enabled  has 401 challenge.
    I also did this:
    Problem: SharePoint Central Admin Page diplays HTTP 404 Error after Installation
    Cause: HTTP Verbs are not configured to allow in IIS
    Resolution: Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Expand Server_Name -> Expand Sites -> Click Web Application -> Click Request Filtering under IIS on the
    Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS and Central Administration
    started to load properly
    Note: If you require, future web applications not to face this issue, then the settings has to be applied to the IIS level as well. Following are the steps to apply the same
    Go to the server where SharePoint Central Admin is hosted, Start -> Run -> Type inetmgr -> Click OK -> Click on Server_Name -> Click Request Filtering under IIS on the Right -> Double click "Request Filtering" -> Click on HTTP Verbs->Click
    Allow from the top right corner and enter GET and click OK. Repeat the same steps to allow other verbs POST, HEAD, CONNECT, PUT, DELETE, TRACE, OPTIONS.
    Still no Central Admin Site, still get the Error message that the web page can not be found. hTTP 404

  • 404 error while invoking servlet in weblogic 6.0

              Hi,
              When I try to invoke a servlet from weblogic 6.0, I am getting
              404 error. I have copied the HelloWorldServlet class into defaultWebAppl_Server/WEB_INF/CLASSES
              directory and when I invoke the HelloWorldservlet, its giving file
              not found(404) error. I am doing exactly what has been given in
              the "quick start to servlets" in weblogic 6.0. I am using Windows
              NT.
              I have also another problem when I use java utils.dbping to test
              the connection to my oracle8.1.8, its giving licence file not found.
              Could some one help me out from this.
              Thanks in advance,
              Ramu
              

              Hi kumar,
              I have been keep trying to solve that. After some time Suddenly
              "Error 404" disappeared and instead "Error 500" came. Okay kumar,
              here is what I am doing...
              I have installed weblogic6.0(eval), oracle 8.1.6 on Windows NT4.0.
              I have installed oracle Enterprise edition from CD "ORACLE 8.1.6
              for NT".
              I installed the weblogic under D: drive.
              I did class path settings as given in documentation. But Iam not
              sure whether I need to do any other class path settings.
              I was able to run pet store application given in weblogic server.
              I went to "quick start" section and ran HelloWorld.jsp page from
              "DefaultWebApp_myServer" directory.
              I was not able to run servlet program as per given in the "quick
              start". I am getting
              "Error 500---Internal server error"
              The server encountered an unexpected condition which prevented
              it from fulfilling the request"
              I have modified the web.xml under WEB-INF of DefaultWebApp_myServer
              as per given in the quick start.
              Here is the quick start link For you reference(as what I talking
              about)
              http://edocs.beasys.com/wls/docs60/quickstart/quick_start.html
              In the web.xml, I have given <servlet-class> as just HelloWorldServlet,
              since I directly copied the file from some other examples directory.
              But still I am getting 500 error.
              Here is the url that I am invoking...Http://ramup:7001/quickStartServlet
              Coming to your oracle connection test, I did exactly what you said.
              kumar, I have executed the command
              "D:\bea\wlserver6.0\config\mydomain>java -classpath %classpath%;D:\bea
              utils.dbping ORACLE
              >scott tiger TestDB"
              Where TestDB is the database that I have created while installing,
              but I am not aware of the instance you said.
              Here is what I got after executing the command.
              --------*******-------Pasting the ms-dos command results----**-
              // This mode is superior, especially in serverside classes because
              // it avoids DriverManager calls are class synchronized, and will
              // bottleneck any other JDBC in the server, even already-running
              // connections, because all JDBC drivers use DriverManager.println()
              // to log info and exceptions, and that call is also class synchronized.
              // For repeated connecting, a single driver instance can be re-used.
              **** or ****
              Class.forName("weblogic.jdbc.oci.Driver").newInstance();
              java.sql.Connection conn =
              DriverManager.getConnection("jdbc:weblogic:oracle:TestDB", "scott",
              "tiger")
              **** or ****
              java.util.Properties props = new java.util.Properties();
              props.put("user", "scott");
              props.put("password", "tiger");
              props.put("server", "TestDB");
              Class.forName("weblogic.jdbc.oci.Driver").newInstance();
              java.sql.Connection conn =
              DriverManager.getConnection("jdbc:weblogic:oracle", props);
              D:\bea\wlserver6.0\config\mydomain>
              --------*******-------Pasting the ms-dos command results----**-
              I think I have connection to database, thanks for your suggestion.
              Kumar, I have not seen weblogic.properties file any where in D:\bea
              directory.
              Kumar, if you have some time can you jot down the classpath settings
              and path settings for executing SERVLETS/EJB programs.
              Thanks for helping me out..,
              Ramu
              Kumar Allamraju <[email protected]> wrote:
              >Assuming you registered the helloworld servlet in web.xml,
              >could you show me the url
              >that you typed in the browser window? :)
              >
              >
              >Regarding the dbping problem, make sure license.bea is
              >in the classpath
              >
              >ie.. java -classpath %classpath%;D:\bea utils.dbping ORACLE
              >scott tiger [instance-name]
              >
              >PS: I'm assuming WLS is installed in D:\bea directory.
              >
              >--
              >Kumar
              >
              >
              >Ramu wrote:
              >
              >> Hi,
              >>
              >> When I try to invoke a servlet from weblogic 6.0, I
              >am getting
              >> 404 error. I have copied the HelloWorldServlet class
              >into defaultWebAppl_Server/WEB_INF/CLASSES
              >> directory and when I invoke the HelloWorldservlet, its
              >giving file
              >> not found(404) error. I am doing exactly what has been
              >given in
              >> the "quick start to servlets" in weblogic 6.0. I am
              >using Windows
              >> NT.
              >>
              >> I have also another problem when I use java utils.dbping
              >to test
              >> the connection to my oracle8.1.8, its giving licence
              >file not found.
              >>
              >> Could some one help me out from this.
              >>
              >> Thanks in advance,
              >> Ramu
              >
              

  • Error 404: No target servlet configured for uri: +websphere 6.0

    My server is running properly, but I got Error 404: No target servlet configured for uri: error while launching my project on web sphere 6.0
    see my web.xml and strut-config.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"
    id="WebApp_ID"
    version="2.4"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>supportPortalWeb</display-name>
    <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/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationDataServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ordermgmt.OrderProcessingServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductGradeServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductGradeServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>action_tmp</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config/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>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <url-pattern>/servlet/OrganizationDataServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <url-pattern>/servlet/OrderProcessingServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <url-pattern>/servlet/OrganizationValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductValidationServlet</servlet-name>
    <url-pattern>/servlet/ProductValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductGradeServlet</servlet-name>
    <url-pattern>/servlet/ProductGradeServlet</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring-config/spring-config.xml</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <jsp-config>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/epc.tld</taglib-uri>
    <taglib-location>/WEB-INF/supportportal.tld</taglib-location>
    </taglib>
    </jsp-config>
    <resource-ref>
    <res-ref-name>jdbc/SupportPortalDataSource</res-ref-name>
    <res-type>java.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
         <!-- Data Sources -->
         <data-sources />
         <!-- Form Beans -->
         <form-beans>
              <form-bean name="signOnHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOnHandlerForm" />
              <form-bean name="signOffHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOffHandlerForm" />
              <form-bean name="updatePersonForm" type="com.harcourt.supportportal.struts.sample.actionform.UpdatePersonForm" />
              <form-bean name="searchPersonsForm" type="com.harcourt.supportportal.struts.sample.actionform.SearchPersonsForm" />
              <form-bean name="updateProductForm" type="com.harcourt.supportportal.struts.product.actionform.UpdateProductForm"/>
              <form-bean name="searchProductsForm" type="com.harcourt.supportportal.struts.product.actionform.SearchProductsForm"/>
              <form-bean name="searchOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.SearchOrganizationForm"/>
              <form-bean name="updateOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.UpdateOrganizationForm"/>
              <form-bean name="exportOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.ExportOrganizationForm"/>
              <form-bean name="exportProductForm" type="com.harcourt.supportportal.struts.product.actionform.ExportProductForm"/>           
         </form-beans>
         <!-- Global Exceptions -->
         <global-exceptions />
         <!-- Global Forwards -->
         <!-- Action Mappings -->
         <action-mappings type="org.apache.struts.config.SecureActionConfig">
              <action
                   path="/start"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="loginRendererDef"/>
    <!--          <action -->
    <!--               path="/product"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="productInputDef"/>-->
              <action path="/product" type="org.springframework.web.struts.DelegatingActionProxy"
                        name="updateProductForm" parameter="method" scope="request" validate="false">
                   <forward name="success" path="productInputDef"/>
                   <forward name="failure" path="productInputDef"/>
              </action>
    <!--          <action -->
    <!--               path="/organization"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="organizationIndexDef"/>-->
              <action
                   path="/report"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="reportIndexDef"/>
              <action
                   path="/user"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="userIndexDef"/>
              <action path="/login" type="org.springframework.web.struts.DelegatingActionProxy" name="signOnHandlerForm" scope="request" input="loginRendererDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />
              <forward name="failure" path="loginRendererDef" />
    </action>
    <!-- sample -->
         <action path="/updatePerson" type="org.springframework.web.struts.DelegatingActionProxy" name="updatePersonForm" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />
              <forward name="failure" path="personInputDef" />
    </action>
         <action path="/searchPersons"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchPersonsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />          
              <forward name="failure" path="loginRendererDef" />
    </action>
         <!-- end sample -->
         <action path="/updateProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/deleteProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/searchProducts"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchProductsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="productSearchDef" />
              <forward name="failure" path="loginLandingDef"/>
    </action>
    <action path="/loadProducts" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchProductsForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="productIndexDef"/>
         <forward name="failure" path="userIndexDef"/>
    </action>
    <action path="/exportProduct" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportProductForm" parameter="method" scope="request" validate="true">
              <forward name="failure" path="loginLandingDef" />
    </action>
    <!-- Organization Actions -->
    <action path="/searchOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgSearchDef"></forward>
         <forward name="failure" path="loginLandingDef"/>
         </action>
    <action path="/organization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="orgInputDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/loadOrganizations" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgIndexDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/updateOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" input="orgInputDef" validate="true">
                   <forward name="success" path="/loadOrganizations.do?method=loadOrganizations"></forward>
                   <forward name="failure" path="/organization.do?method=createOrUpdateOrganization"/>               
              </action>
              <action path="/exportOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportOrganizationForm" parameter="method" scope="request" >
              <forward name="failure" path="loginLandingDef" />
    </action>
         </action-mappings>
         <!-- Register Support Portal RequestProcessor -->
         <controller>
              <set-property property="processorClass" value="com.harcourt.supportportal.struts.common.action.SupportPortalRequestProcessor" />
         </controller>
         <!-- Message Resources -->
         <message-resources parameter="com.harcourt.supportportal.resources.ApplicationResources" />
         <!-- tiles plugin -->
    <plug-in className="com.harcourt.supportportal.tiles.SupportPortalSecureTilesPlugin">
         <set-property property="definitions-config" value="/WEB-INF/tiles-def/tiles-defs.xml" />
         <set-property property="httpPort" value="80"/>
    <set-property property="httpsPort" value="80"/>      
    <set-property property="enable" value="false"/>      
    <set-property property="addSession" value="false"/>      
    </plug-in>
         <!-- spring plugin -->
         <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
         <set-property property="contextConfigLocation" value="/WEB-INF/spring-config/spring-config.xml"/>
         </plug-in>
    </struts-config>

    If your EAR has actually started, try this:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/xrun_jvm_sendredirect.html
    If you are not on z/OS, the link is actually under server->server infrastructure->Java and process management->environment entries
    for setting the property

  • Error 404: No target servlet configured for uri  exception in RAD6.0

    Hello there,
    I have recently migrated from WSAD5.1 to RAD6.0. I have created a servlet in my client Web project. I have configured the deployment descriptor correctly to define a url-mapping for the servlet as follows:
    <servlet>
    <description>
    </description>
    <display-name>
    RulesServiceServlet</display-name>
         <servlet-name>RulesServiceServlet</servlet-name>
    <servlet-class>
         com.kai.rulesservice.RulesServiceServlet
    </servlet-class>
    <load-on-startup>-1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>RulesServiceServlet</servlet-name>
    <url-pattern>/RulesServiceServlet</url-pattern>
    </servlet-mapping>
    However, whenever, I try to run my servlet:
    http://localhost:9080/RS2Web/RulesServiceServlet
    I get the error:
    Error 404: No target servlet configured for uri
    I am not sure what this error means. Could someone please tell what I might be missing or what might be going wrong?
    Thanks in advance!

    If your EAR has actually started, try this:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/xrun_jvm_sendredirect.html
    If you are not on z/OS, the link is actually under server->server infrastructure->Java and process management->environment entries
    for setting the property

  • Weblogic 10.3.2: Under load, system gives 404 error when accessing page

    Hi all,
    I am running Weblogic 10.3.2 with a J2EE EAR deployed against it. I am using JDBC data sources to connect to an Oracle 11g database. I am running on Linux Red Hat 5. The machine has 16 GB RAM and 16 cores of an Intel Xeon processor.
    I have recorded some Grinder scripts to simulate the HTTP requests going back and forth from the web browser to the app server in an attempt to play them back in volume to do some load testing. I am finding that even under relatively moderate load, after some time (say 30-60 minutes) when trying to access the application in my web browser (and in Grinder), I am getting 404 errors.
    The strange thing is that the app server is still running fine and there are no errors thrown in any Weblogic log file. There is nothing wrong in the verbosegc log file and the CPU usage via "sar" is very low. The number of JDBC connections is well below the threshold for concern. Sometimes, if I wait a while (hours or more), it sometimes comes back up and works fine again, until the next worjload hits it. I have studied thread dumps and see nothing unusual.
    I've been very puzzled with this for days. Does anyone else know what might be wrong or something else I could check to get more information?

    Hi, I have the same kind of problem. but when it happens I noticed strange line in the access.log like these ones :
    access.log00003:192.168.104.198 - - [20/Apr/2012:12:16:45 +0200] "ancelActionID=CCACustomerProfile&contactreasonwrapuplaunchable=true&contactCode=&contactType=&contactInformation=&Customer.CustomerNumber=5146990&processheadertitle=&PageState.CaseNumber=&PageState.CaseReference=&caseId=42ceed6436cbd7c70136cf3ea82c3b4a&" 404 0
    access.log00004:192.168.104.122 - - [20/Apr/2012:14:02:16 +0200] "s-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" 404 0
    access.log00004:192.168.105.122 - - [20/Apr/2012:14:02:18 +0200] "-ms-xbap, application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" 404 0
    access.log00004:192.168.104.122 - - [20/Apr/2012:14:02:20 +0200] "application/x-ms-application, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" 404 1214
    As you can see, instead of containiing the HTTP action (GET/POST /someurl HTTP/1.1) it contains part of the url or even part of the Accept http header...
    When your 404 happened did you have those strange entries in your access.log ? Did you succeed in resolving it ?

  • Not able to run my first Servlet..... 404 error!!!

    Hi,
    I am new to Java.
    I am trying to create a small servlet application. I am using Tomcat 5.5 server and eclipse for this.
    I have first writtern a HTML form which on submission is redirected to a servlet that displays the information submitted. but i am not able to evn open the html file through browser, i am getting 404 error.
    My html codes and Servlet codes are inside the htmlform package...
    When i type http://localhost:8080/htmlform/form.html i am gettig 404 error... Also let me know if any thing is wrong with the codes...
    Here is my code...
    form.html
    <html>
    <head>
    <title> This is a HTML page </title>
    </head>
    <body>
    <p><h3>This page displays a submission form</h3></p>
    <form method="GET" action="/htmlform/LoginServlet">
    <p> USERNAME: <input type="text" name="username"/> </p>
    <p> PASSWORD: <input type="password" name="password" /> </p>
    <p> <input type="submit" value="Press Me" name="submit"/> </p>
    </form>
    </body>
    </html>
    LoginServlet.java
    package htmlform;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
         private static final long serialVersionUID = 1L;
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter pw = response.getWriter();
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    pw.println("<html><head><title>This is the out put page</title></head");
    pw.println("<body><h2>If you can see this page then your form is cleanly processed</h2><br>");
    pw.println("<h2>Congratulations!!!</h2>");
    pw.println("<p>Your user name is: "+ username+ "</p>");
    pw.println("<p>Your password is: "+ password + "</p>");
    pw.println("<br></body></html>");
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!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>
    <servlet>
    <servlet-name>Login</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/login</url-pattern>
    </servlet-mapping>
    </web-app>
    Thanks in advance

    you might have other problems, but I think the action attribute in your HTML form is incorrect.
    You have:
    <form method="GET" action="/htmlform/LoginServlet">Your web.xml says:
    <servlet-mapping>
    <servlet-name>Login</servlet-name>
    <url-pattern>/login</url-pattern>
    </servlet-mapping>So I think you should change the action like this:
    <form method="GET" action="/htmlform/login">Your servlet's not in a package, and you might not be deploying it correctly (god forbid you added this to /ROOT), but try that first.
    %

  • 404 ERROR WHILE RUNNING A SERVLET

    hi
    i have written servlet program that takes a cookie value
    from a HTML page....
    while running the HTML page i have been getting the error
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    Please try the following:
    If you typed the page address in the Address bar, make sure that it is spelled correctly.
    Open the localhost:8080 home page, and then look for links to the information you want.
    Click the Back button to try another link.
    Click Search to look for information on the Internet.
    HTTP 404 - File not found
    Internet Explorer
    i have placed my servlet prog at
    c:\aruna\AddCookieServlet
    and html prog is also in there itself
    and i have complied them successfully
    i have been tried with following URLs in my html prog
    http://localhost:8080/servlet/AddCookieServlet
    http://localhost:8080/aruna/servlet/AddCookieServlet
    it would be helpful if someone will give me an immediat response
    thanks

    Hi arunapotti,
    I assume that you have downloaded Java server Web Developement Kit 1.0.1. This is a reference implementation of Servlets 2.1 and JSP1.0 specification.
    But the current version of Servlets is 2.3 and that of JSP is 1.1, and the reference implementation for the same is Tomcat4.0.1. You can download this implementation from the following URL. Like JSWDK it is also available free of cost:-
    http://java.sun.com/products/servlet/download.html
    Once you install it properly in
    C:\jakarta-tomcat-4.0.1
    You can write a servlet as :-
    I wrote a servlet named CentralServlet as :-
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class CentralServlet extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException , IOException {
    doPost(req, res);
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException , IOException {
    PrintWriter out = res.getWriter();
    out.println("Yes you have done it");
    Once you compile this properly place it in directory
    C:\jakarta-tomcat-4.0.1\webapps\srvltWEB-INF\classes\CentralServlet
    where srvlt is the directory created by you, this is the context for your application.webapps will already be there when you have successfully installed Tomcat.
    Within srvlt create WEB-INF and with in WEB-INF create classes where you place your servlet.
    To make srvlt a context you will have to make an entry in server.xml file which you can find at the following location
    C:\jakarta-tomcat-4.0.1\conf\server.xml
    Add the following entry in this xml file.
    <Context path="/srvlt" docBase="srvlt" debug="0" reloadable="true" />
    Also write web.xml is as :-
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!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>
    <servlet>
    <servlet-name>srvlt</servlet-name>
    <servlet-class>CentralServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>srvlt</servlet-name>
    <url-pattern>/main</url-pattern>
    </servlet-mapping>
    </web-app>
    Put web.xml in
    C:\tomcat-4.0.1\webapps\srvlt\WEB-INF\web.xml
    Now restart the webserver and you can access the servlet by passing the following url
    http://localhost:8080/srvlt/main
    =========================================
    If still you have some reason to work with Java Server Web Developement Kit then Post a message, I may help you out in that also. But it is highly recommended that you use Tomcat_4.0.1.
    Hope this helps

  • 404 Error Message while running a servlet

    Unable to run Snoop Servlet in JRUN 2.3.3 running on IIS4.0. I give the url
    as http://websitename/servlet/SnoopServlet . But I get HTTP error 404 error.
    I am trying to run the snoop servlet in the jrun/jsm-default/servlet directory. But, I am not able to run the servlets that are in the Servlet directory. It says '404 - Page Not Found Error'. Can anyone help me out what should I change to run the servlet when I type http//websitename/servlet/snoopservlet. Where 'snoopservlet' is the servlet in the servlets directory.

    I have been using JRun 3.1 and the default servlets directory is:
    servers\default\default-app\web-inf\classes
    Try to put your servlets in this folder.

  • HTTP Status 404  error -- The requested resource  is not available.

    Hi ,
    i am trying to run a sample struts2 program using java1.5 , tomcat5.5 but getting the error ...
    * The requested resource (/Struts2Sample/) is not available.*
    i am listing my files below.. kindly help...
    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>Struts2Sample</display-name>
    <filter>
    <filter-name>struts</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <servlet>
         <servlet-name>home</servlet-name>
         <jsp-file>HelloWorld.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
         <servlet-name>home</servlet-name>
         <url-pattern>/home</url-pattern>
    </servlet-mapping>
    </web-app>
    struts.xml ---------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
    <package name="example" extends="struts-default" namespace="/">
    <action name="HelloWorld" class="example.HelloWorld">
    <result>/HelloWorld.jsp</result>
    </action>
    </package>
    </struts>
    HelloWorld.jsp ----------------------
    <%@ taglib prefix="s" uri="/struts-tags" %>
    <html>
    <head>
    <title>Struts 2 Hello World Application!</title>
    </head>
    <body>
    <h2><s:property value="message" /></h2>
    <p>Current date and time is: <b><s:property value="currentTime" /></b>
    </body>
    </html>
    ExampleSupport.java ---------------------------
    package example;
    import com.opensymphony.xwork2.ActionSupport;
    * Base Action class for the Tutorial package.
    public class ExampleSupport extends ActionSupport {
    HelloWorld.java --------------------
    package example;
    public class HelloWorld extends ExampleSupport {
    public String execute() throws Exception {
    setMessage(getText(MESSAGE));
    return SUCCESS;
    * Provide default valuie for Message property.
    public static final String MESSAGE = "HelloWorld.message";
    * Field for Message property.
    private String message;
    * Return Message property.
    * @return Message property
    public String getMessage() {
    return message;
    * Set Message property.
    * @param message Text to display on HelloWorld page.
    public void setMessage(String message) {
    this.message = message;
    My directory structure ....
    D:\tomcat5.5\webapps\Struts2Sample ---- this has my jsp file.
    D:\tomcat5.5\webapps\Struts2Sample\src\example ---- this has both java source files..
    D:\tomcat5.5\webapps\Struts2Sample\WEB-INF\classes\example ---- this has compiled class files
    D:\tomcat5.5\webapps\Struts2Sample\WEB-INF\classes ---- this has my struts.xml file
    D:\tomcat5.5\webapps\Struts2Sample\WEB-INF\lib ---- this has all my jars..
    D:\tomcat5.5\webapps\Struts2Sample\WEB-INF --- this has my web.xml file
    kindly let me know i am making mistakes if any...
    i am using url as : http://localhost:8080/Struts2Sample/
    Thanks,
    Nads

    Hi ,
    when iam trying to deploy struts 2 application iam getting 404 error. in tomcat 5.5.23
    if u got the solution pls help me
    regards
    srini

Maybe you are looking for