"The requested resource (/hello) is not available"  Error of Servlet

Hello all,
I get HTTP STATUS 404 Error which states "The requested resource (/hello) is not available" even thought according to me I am doing everything perfectly.
Here is more information. If you can find out where the proble might be please
let me know because I am working on this for more than 9 hours.
I AM USING-<br>
TOMCAT 5.5.26 <br>
JRE 6 <br>
J2SDK 1.4.0 <br>
</B>
<BR><BR>
SYSTEM VARIABLES :<br>
<B>
CLASSPATH
</B>
C:\apache-tomcat-5.5.26\common\lib\servlet-api.jar <BR>
<B> JAVA_HOME</B> D:\j2sdk1.4.0
<BR>
<B>JRE_HOME</B> C:\Program Files\Java\jre6
<BR>
<B>TOMCAT_HOME </B>C:\apache-tomcat-5.5.26
<BR>
<P>
I have placed my hello.class file inside
<b>C:\apache-tomcat-5.5.26\webapps\ROOT\WEB-INF\classes</b>
also, i have modified web.xml file as<br>
<b>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>hello</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>hello</url-pattern>
</servlet-mapping>
</b><br><br>
But still I am not able to access my servlet when i type
http://localhost:8080/hello
I get the error I mentioned above.

Hi..Thanks for all those who have replied earlier. I feel I should add some more information.
I dont know what PACKAGE NAME you are talking about
I am pasting contents of my XML file located in :
**apache-tomcat-5.5.26\webapps\ROOT\WEB-INF\web.xml**
-->
- <web-app 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" version="2.4">
<display-name>Welcome to Tomcat</display-name>
<description>Welcome to Tomcat</description>
- <!-- JSPC servlet mappings start
-->
- <servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>
- <servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>
- <!-- JSPC servlet mappings end
-->
</web-app>
web.xml file located in
apache-tomcat-5.5.26\webapps\servlets-examples\WEB-INF
is given below:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version
2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app 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"
version="2.4">
<display-name>Servlet 2.4 Examples</display-name>
<description>
Servlet 2.4 Examples.
</description>
<!-- Define servlet-mapped and path-mapped example filters -->
<filter>
<filter-name>Servlet Mapped Filter</filter-name>
<filter-class>filters.ExampleFilter</filter-class>
     <init-param>
     <param-name>attribute</param-name>
<param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
     </init-param>
</filter>
<filter>
<filter-name>Path Mapped Filter</filter-name>
<filter-class>filters.ExampleFilter</filter-class>
     <init-param>
     <param-name>attribute</param-name>
<param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
     </init-param>
</filter>
<filter>
<filter-name>Request Dumper Filter</filter-name>
<filter-class>filters.RequestDumperFilter</filter-class>
</filter>
<!-- Example filter to set character encoding on each request -->
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>EUC_JP</param-value>
</init-param>
</filter>
<filter>
<filter-name>Compression Filter</filter-name>
<filter-class>compressionFilters.CompressionFilter</filter-class>
<init-param>
<param-name>compressionThreshold</param-name>
<param-value>10</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
</filter>
<!-- Define filter mappings for the defined filters -->
<filter-mapping>
<filter-name>Servlet Mapped Filter</filter-name>
     <servlet-name>invoker</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>Path Mapped Filter</filter-name>
     <url-pattern>/servlet/*</url-pattern>
</filter-mapping>
<!-- Example filter mapping to apply the "Set Character Encoding"
filter
to all requests processed by this web application -->
<!--
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<!--
<filter-mapping>
<filter-name>Compression Filter</filter-name>
<url-pattern>/CompressionTest</url-pattern>
</filter-mapping>
-->
<!--
<filter-mapping>
<filter-name>Request Dumper Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<!-- Define example application events listeners -->
<listener>
<listener-class>listeners.ContextListener</listener-class>
</listener>
<listener>
<listener-class>listeners.SessionListener</listener-class>
</listener>
<!-- Define servlets that are included in the example application
-->
<servlet>
<servlet-name>CompressionFilterTestServlet</servlet-name>
<servlet-class>compressionFilters.CompressionFilterTestServlet</servlet
-class>
</servlet>
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>hello</servlet-class>
</servlet>
</servlet>
<servlet>
<servlet-name>HelloWorldExample</servlet-name>
<servlet-class>HelloWorldExample</servlet-class>
</servlet>
<servlet>
<servlet-name>RequestInfoExample</servlet-name>
<servlet-class>RequestInfoExample</servlet-class>
</servlet>
<servlet>
<servlet-name>RequestHeaderExample</servlet-name>
<servlet-class>RequestHeaderExample</servlet-class>
</servlet>
<servlet>
<servlet-name>RequestParamExample</servlet-name>
<servlet-class>RequestParamExample</servlet-class>
</servlet>
<servlet>
<servlet-name>CookieExample</servlet-name>
<servlet-class>CookieExample</servlet-class>
</servlet>
<servlet>
<servlet-name>SessionExample</servlet-name>
<servlet-class>SessionExample</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CompressionFilterTestServlet</servlet-name>
<url-pattern>/CompressionTest</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>/servlet/HelloWorldExample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RequestInfoExample</servlet-name>
<url-pattern>/servlet/RequestInfoExample/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RequestHeaderExample</servlet-name>
<url-pattern>/servlet/RequestHeaderExample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RequestParamExample</servlet-name>
<url-pattern>/servlet/RequestParamExample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CookieExample</servlet-name>
<url-pattern>/servlet/CookieExample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SessionExample</servlet-name>
<url-pattern>/servlet/SessionExample</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/servlet/hello</url-pattern>
</servlet-mapping>
<security-constraint>
<display-name>Example Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
     <!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/jsp/security/protected/*</url-pattern>
     <!-- If you list http methods, only those methods are
protected -->
     <http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
     <http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area
-->
<role-name>tomcat</role-name>
     <role-name>role1</role-name>
</auth-constraint>
</security-constraint>
<!-- Default login configuration uses form-based authentication -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/jsp/security/protected/login.jsp</form-login-page>
<form-error-page>/jsp/security/protected/error.jsp</form-error-page>
</form-login-config>
</login-config>
<!-- Security roles referenced by this web application -->
<security-role>
<role-name>role1</role-name>
</security-role>
<security-role>
<role-name>tomcat</role-name>
</security-role>
<!-- Environment entry examples -->
<!--env-entry>
<env-entry-description>
The maximum number of tax exemptions allowed to be set.
</env-entry-description>
<env-entry-name>maxExemptions</env-entry-name>
<env-entry-value>15</env-entry-value>
<env-entry-type>java.lang.Integer</env-entry-type>
</env-entry-->
<env-entry>
<env-entry-name>minExemptions</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>1</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>foo/name1</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>value1</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>foo/bar/name2</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>name3</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>1</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>foo/name4</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>10</env-entry-value>
</env-entry>
</web-app>
My program hello.java is given below
import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class hello extends HttpServlet {
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
PrintWriter out = res.getWriter();
out.println("Hello, world!");
out.close();
}

Similar Messages

  • The requested resource (/hello) is not available

    Hi,
    I keep getting the message:
    http status 404
    The requested resource (/hello) is not available
    when i'm trying to access http://localhost:8080/hello
    i've created the war file using the deployment tool you get downloading J2EE 1.4. I've also tried the quickstart example copying the hello.war file to the autodeplay folder and it does genereate the hello.war_deployed file, but i keep getting the same message.
    i can make it work using the admin console for deploying. then i can get it to launch. why does the other methods not work and how do i get them to work?
    hope somebody is able to help. thank you.
    Pia

    Hi,
    I keep getting the message:
    http status 404
    The requested resource (/hello) is not available
    when i'm trying to access http://localhost:8080/hello
    i've created the war file using the deployment tool you get downloading J2EE 1.4. I've also tried the quickstart example copying the hello.war file to the autodeplay folder and it does genereate the hello.war_deployed file, but i keep getting the same message.
    i can make it work using the admin console for deploying. then i can get it to launch. why does the other methods not work and how do i get them to work?
    hope somebody is able to help. thank you.
    Pia

  • The requested resource (/test/) is not available. Tomcat. Myfaces.

    Hi, i use Myfaces and Tomcat. Sometimes there is error : The requested resource (/test/) is not available. This is regarding war file. How can i check where there is the error? Sometimes the files are allmost same, i think. But in one time it works, in other no. I use Eclipse to edit and create files. Is it possible to check the errors before creating of war file? Thanks in advance!!!!!!!!!!

    Hi, i use Myfaces and Tomcat. Sometimes there is error : The requested resource (/test/) is not available. This is regarding war file. How can i check where there is the error? Sometimes the files are allmost same, i think. But in one time it works, in other no. I use Eclipse to edit and create files. Is it possible to check the errors before creating of war file? Thanks in advance!!!!!!!!!!

  • The requested resource (/Webtest) is not available.

    --context.xml--
    <Context path="/WebApplication1">
      <ResourceLink global="jdbc/myoracle2" name="jdbc/myoracle2" type="javax.sql.DataSource"/>
    </Context>
    ---web.xml---
    <servlet>
            <servlet-name>WebServlet</servlet-name>
            <servlet-class>WebServlet</servlet-class>
        </servlet>
    <servlet-mapping>
            <servlet-name>WebServlet</servlet-name>
            <url-pattern>/WebServlet</url-pattern>
        </servlet-mapping>
    ----HTML-----
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY BGCOLOR="WHITE">
    <TABLE BORDER="2" CELLPADDING="2">
    <TR><TD WIDTH="275">
    <FORM METHOD="POST" ACTION="/Webtest">
    <p>
    <INPUT NAME="ADMIN_USERNAME" TYPE="TEXT" id="ADMIN_USERNAME" SIZE=30>
    </p>
    <p>
    <INPUT NAME="ADMIN_PASSWORD" TYPE="TEXT" id="ADMIN_PASSWORD" SIZE=30>
    </p>
    <P>
    <INPUT TYPE="SUBMIT" VALUE="Click Me">
    <INPUT TYPE="RESET">
    </FORM>
    </TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    ----JAVA SERVLET-----
    import java.sql.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Webtest
    extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
    IOException {
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    String sourceURL = "jdbc/myoracle2";
    Connection databaseConnection = DriverManager.getConnection(sourceURL);
    Statement stmt = databaseConnection.createStatement();
    String jname = request.getParameter("ADMIN_USERNAME");
    String jemail = request.getParameter("ADMIN_PASSWORD");
    String sqlInsertString ="INSERT INTO administrator (ADMIN_USERNAME,ADMIN_PASSWORD) VALUES ('" + jname +"', '" +jemail + "')";
    stmt.executeUpdate(sqlInsertString);
    databaseConnection.commit(); 
    databaseConnection.close();
    catch(ClassNotFoundException cnfe)
    System.err.println("Error loading Driver");
    catch (SQLException sqle){
    System.err.println("SQL Error");
    [/code
    can you help me. above example code has error message, the requested resource /webtest is not available... I do not know where is problem. but I am sure that database connection is o.k. I already test other example.
    thank you so much
    Message was edited by:
            jin412                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    there is no problem to retrieve data from database.
    but I have a problem to add the record.Does it generate an exception? Try adding a line to print the stack trace in the exception block.
    sqle.printStackTrace();

  • The requested resource (/Admin) is not available.

    Hello ,
    I am developing one small project. I am using struts,EJB and Hibernate to develop this project.
    My project name is Admin. It has two sub-modules:- AdminWeb and AdminEJB.
    In the sub-module AdminWeb, i am writing all the struts related stuff like Action classes,form bean classes, I have struts-config inside WEB-INF folder along with web.xml and other tlds. From the action class i am takinf the lookup of session bean which is in the another sub-module name as AdminEJB. and invoking the business method from of that bean class.
    In the sub-module AdminEJB, I wrote all my Home Interface, Remote Interface and Session Bean class.From the session bean class i am firing a HQL query to interact with Database. I create Hibernate.cfg.xml and also mapping xml file needed to map with the database.Then i created ejb-jar.xml file.
    I created EAR file name as Admin. And deployed in My JBoss server.
    Now when i am running my project from web browser. then the following message is coming on the screen:-
    The requested resource (/Admin) is not available.
    Can anyone help me plz to recitify this problem.
    Thanks with regard,
    sanjay Kumar

    Hello Again ,
    The below the stack
    16:13:59,189 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
    16:13:59,189 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
    16:14:00,439 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
    16:14:01,017 INFO [A] Bound to JNDI name: queue/A
    16:14:01,017 INFO Bound to JNDI name: queue/B
    16:14:01,033 INFO [C] Bound to JNDI name: queue/C
    16:14:01,033 INFO [D] Bound to JNDI name: queue/D
    16:14:01,033 INFO [ex] Bound to JNDI name: queue/ex
    16:14:01,064 INFO [testTopic] Bound to JNDI name: topic/testTopic
    16:14:01,064 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
    16:14:01,064 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    16:14:01,064 INFO [testQueue] Bound to JNDI name: queue/testQueue
    16:14:01,142 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
    16:14:01,189 INFO [DLQ] Bound to JNDI name: queue/DLQ
    16:14:01,439 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
    16:14:01,611 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MyOracleDS' to JNDI name 'MyOracleDS'
    16:14:01,705 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    16:14:03,220 INFO [EARDeployer] Init J2EE application: file:/E:/jboss-4.2.1/server/default/deploy/Admin.ear
    16:14:22,250 INFO [EjbModule] Deploying DiscountDetailBean
    16:14:22,688 INFO [ProxyFactory] Bound EJB Home 'DiscountDetailBean' to jndi 'Holiday_Cottage_Group/AdminEjb/ejbModule/com/discountEjbs/InsertDiscountDetailHome'
    16:14:22,688 INFO [EJBDeployer] Deployed: file:/E:/jboss-4.2.1/server/default/tmp/deploy/tmp62976Admin.ear-contents/AdminEJB.jar
    16:14:22,719 INFO [TomcatDeployer] deploy, ctxPath=/AdminWeb, warUrl=.../tmp/deploy/tmp62976Admin.ear-contents/AdminWeb-exp.war/
    16:14:22,891 INFO [WebappClassLoader] validateJarFile(E:\jboss-4.2.1\server\default\.\tmp\deploy\tmp62976Admin.ear-contents\AdminWeb-exp.war\WEB-INF\lib\javax.servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    16:14:22,922 INFO [WebappClassLoader] validateJarFile(E:\jboss-4.2.1\server\default\.\tmp\deploy\tmp62976Admin.ear-contents\AdminWeb-exp.war\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    16:14:23,578 INFO [EARDeployer] Started J2EE application: file:/E:/jboss-4.2.1/server/default/deploy/Admin.ear
    16:14:23,719 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
    16:14:23,750 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    16:14:23,766 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 50s:810ms
    Thanks with regards,
    Sanjay Kumar

  • The requested resource (/apex/) is not available

    I installed oracle 10g,but when i try to open my home page that time i got this error,i don'nt know how to fix it.
    it automaticaly reaches to this address-
    http://127.0.0.1:8080/apex/
    and now i got this error.
    HTTP Status 404 - /apex/
    type Status report
    message /apex/
    description The requested resource (/apex/) is not available.
    Apache Tomcat/5.5.28
    Please can you help me,what to do next. and how to handle this error.......
    Regards
    Deepak Sharma

    Hi,
    Your Tomcat is running also in port 8080.
    Change Tomcat or EPG port
    This might help change XE EPG port
    http://daust.blogspot.com/2006/01/xe-changing-default-http-port.html
    Regards,
    Jari

  • The requested resource (/ShowParameters) is not available.

    hi
    hope someone can help me cause i'm looking for hours and cannot find my error :(
    I use a from.jsp with the following action:
    <form action="/ShowParameters" method="post">as soon as i click on the submit button i do get the following error message:
    The requested resource (/ShowParameters) is not available.I structured my tomcat webapp as followed:
    webapp called test:
    webapp\test\form.jsp
    webapp\test\WEB-INF\web.xml
    webapp\test\WEB-INF\classes\coreservlets\ShowParamaters.class
    my web.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app 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"  version="2.4">
         <servlet>
              <servlet-name>ShowParameters</servlet-name>
              <servlet-class>coreservlets.ShowParameters</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>ShowParameters</servlet-name>
              <url-pattern>/ShowParameters</url-pattern>
         </servlet-mapping>
    </web-app>and finally my ShowParameters.java
    package coreservlets;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    public class ShowParameters extends HttpServlet {
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
          throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        String title = "Reading All Request Parameters";
        out.println(ServletUtilities.headWithTitle(title) +
                    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                    "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                    "<TABLE BORDER=1 ALIGN=CENTER>\n" +
                    "<TR BGCOLOR=\"#FFAD00\">\n" +
                    "<TH>Parameter Name<TH>Parameter Value(s)");
        Enumeration paramNames = request.getParameterNames();
        while(paramNames.hasMoreElements()) {
          String paramName = (String)paramNames.nextElement();
          out.print("<TR><TD>" + paramName + "\n<TD>");
          String[] paramValues =
            request.getParameterValues(paramName);
          if (paramValues.length == 1) {
            String paramValue = paramValues[0];
            if (paramValue.length() == 0)
              out.println("<I>No Value</I>");
            else
              out.println(paramValue);
          } else {
            out.println("<UL>");
            for(int i=0; i<paramValues.length; i++) {
              out.println("<LI>" + paramValues);
    out.println("</UL>");
    out.println("</TABLE>\n</BODY></HTML>");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    so that's my simple webapp but still i cannot find the error :(
    another questions: in general, would you suggest to use a controller.jsp instead of the servlet?

    hi
    1) i compiled the .java by using eclipse and did not get any error message
    2) my directory structure:
    webapp\test\form.jsp
    webapp\test\WEB-INF\web.xml
    webapp\test\WEB-INF\classes\coreservlets\ShowParamaters.class
    webapp\test\WEB-INF\classes\coreservlets\ServletUtitlities.class
    do i have to add the ServletUtilities.class also in the web.xml?
    thanks for helping cannot find any error :(

  • The requested resource (/ciscopca) is not available

    I am trying to acces the mailbox via web url and getting the error
    The requested resource (/ciscopca) is not available
    using cisco unity connection  
    System version: 8.0.3.23031-1

    David,
          I had it at 1024 and I bumped it up to 2048 and now it works.
    Thank you very much!
    Jim

  • The requested resource /MobileOTA14/ is not available

    Hi,
    I am trying to deploy the mobile 4.0 client package MobileOTA14.war file on tomcat6/Windows. I have used the following command to deploy the file. The command executes successfully. The I have restarted the web server.
    wdeploy.bat tomcat6 -Dwar_dir="C:\Program Files (x86)\SAP BusinessObjects\Mobile 14\Client" -DAPP=MobileOTA14 deploy
    But when I execute the url " http://hostname:8080/MobileOTA14, I get an error "The requested resource /MobileOTA14/ is not available"
    I see the /MobileOTA14/ is deployed on the tomcat through Tomcat Manager webpage.
    Can anybody advise what was the problem?
    Thanks,
    Kris

    I couldn't get you
    I think we need to download Mobile application (Symbian/Blackberry/Windows) using the link " http://hostname:8080/MobileOTA14" on the Mobile.
    But I am getting "The requested resource /MobileOTA14/ is not available" when I executed in the browser
    Thanks,
    Kris

  • The requested resource (/helloworld) is not available JBoss error

    Hi all,
    I'm new to Java EE programming, and trying to run simple web application using JBoss AS.
    I followed all the steps carefully (in the book Beginning Java EE 5).
    1) First of all, I set environment variables for JBoss and JDK:
    http://img694.imageshack.us/img694/4070/69943683.jpg
    2) Then I created directory for JBoss projects under C:\JBoss_Projects
    3) Then I created index.jsp file in JBoss_Projects folder which looks like this:
    <%--
    file: index.jsp
    desc: Test installation of Java EE SDK 5
    --%>
    <html>
    <head>
    <title>Hello World - test the Java EE SDK installation
    </title>
    </head>
    <body>
    <%
    for (int i = 1; i < 5; i++)
    %>
    <h<%=i%>>Hello World</h<%=i%>>
    <%
    %>
    </body>
    </html>
    4) After that I created subfolder under C:\JBoss_Projects\META-INF
    5) In that subfolder I created application.xml file like this:
    <?xml version="1.0"?>
    <application>
    <display-name>Hello Java EE World!</display-name>
    <module>
    <web>
    <web-uri>web-app.war</web-uri>
    <context-root>/hello</context-root>
    </web>
    </module>
    </application>
    6) Then I ran the following:
    C:\JBoss_Projects>jar cf web-app.war index.jsp
    C:\JBoss_Projects>jar cf helloworld.ear web-app.war META-INF
    7) And after that I copied the helloworld.ear into JBoss deployment directory (C:\JBoss\server\all\deploy)
    Finally I started JBoss and went to the page http://localhost:8080/helloworld and had seen the following error:
    http://img694.imageshack.us/img694/6849/48749890.jpg
    Could anybody help me out and explain what went wrong?
    I would very appreciate your responses.

    so basically your web-app.war doesn't have a web.xml file??

  • The requested resource (/axis/) is not available.

    I am running Tomcat server and trying to validate my axis installation.
    I get the above error when trying to acces the following link:
    http://127.0.0.1:8080/axis/.
    Does anyone know what the solution to this problem is?

    It means that tomcat couldn't start the 'axis' webapp. Check your tomcat logs for more info.
    -D

  • Firefox would take me to yahoo but now it says sorry gone the requested resource is no longer available on this server and there is no forwarding address.

    When I click on my Firefox Icon instead of yahoo coming up I get a page that says 410 Gone. Sorry Gone The requested resource is no longer available on this server and there is no forwarding address. Please remove all references to this resource. Please check the URL for proper spelling and capitalization. If you're having trouble locating a destination on yahoo try visiting the "Yahoo home page" or look through a list of Yahoo's online services. Also you may find what you're looking for if you try searching below (it gives a search box). Below the box it says Please try Yahoo Help Central if you need more assistance. If I click on the words Yahoo Home Page it will them take me to the yahoo home page which is used to do my my just clicking on my Firefox Icon. I would appreciate any help someone could give me. I have removed Firefox from my computer and re-downloaded it with the yahoo download but still get the same screen when I click in the Firefox Icon.

    I just wanted to say thank you to the-edmeister. Your response corrected my problem. Thank you I appreciate it.

  • The Security Token Service is not available error on dedicated Distributed Cache server

    I have an error on a dedicated Distributed Cache server stating that the Security Token Service is not available.  I was under the impression that when Distributed Cache was running on a dedicated server that the only service that should be enabled
    is Distributed Cache. 
    The token service is working as expected on all other servers but this one.  Does this service need to be started or should I just ignore this error message?
    Jennifer Knight (MCITP, MCPD)

    as per my little experience with 2013, if STS is working fine on Web server then I am sure that sharepoint will be fine...Distributed cache stores the ST issued by STS. NO need to worry about this error.
    Login
    Token Cache
    DistributedLogonTokenCache
    This
    cache stores the security token issued by a Secure Token Service for use by any web server in the server farm. Any web server that receives a request for resources can access the security token from the cache, authenticate the user, and provide access to the
    resources requested.
    I would say check the ULS logs and get more details about the error why its not working on that server.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Resource not available error in servlet

    This is my directory structure C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\VSG\WEB-INF and here i have in web-inf my web.xml which looks like this
    <web-app>
    <servlet servlet-name>Myservlet</servlet-name>
    <servlet-class>Myservlet<servlet-class>
    </servlet>
    <servlet-mapping >
    <servlet-name>Myservlet</servlet-name>
    <url-pattern>/myservlet</url-pattern>
    </servlet-mapping>
    </web-app>
    while my class file is at this position C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\vsg\WEB-INF\classes
    Now i run my servlet in browser as
    http://localhost:8080/vsg/myservlet
    it gives me error that resource is not available.... any idea on this ???

    ganeshmb wrote:
    Package-less classes are no longer supported .. .. when you use Tomcat 4.1 with Java 1.4 or newer due to a security bugfix. Since Tomcat 5.0 it is been "fixed" by an internal workaround.
    Still, putting classes in a package is highly recommended. You can only access classes from another packages when you explicitly import it. As you cannot import from the default package, the classes in the default package remains unaccessible for classes in another packages (like the application server implementation classes).

  • 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

  • My emails are Blank!  Empty content since 10.18am this morning...

    Just want to second this - I woke up this morning to find some of my emails displaying blank/empty content... It turns out that the blank emails are everything incoming since a certain time (10.18am). This was half way through my mail session - all b

  • DIR7 Character Set Problem / Foreign Language

    Hi there, I am working on an app built using Director 7 that until now has used the standard English (latin-1) character set. However, I am required to deliver a new version including some elements displayed in a second language, in this case Welsh,

  • ServerSideSync: track outgoing e-mails

    Our customer wants to have the e-mails of thier sales to be tracked automatically. No matter if the e-mails are sent via outlook, tablet or mobile. They can't install CRM Outlook client. ServerSideSync works perfectly for this scenario for incoming e

  • How to disable Shift-Command-C command?

    How do i disable the Shift-Command-C command? (It clashes with the cheat console in spore and they are both activated by Shift-Command-C) Any help welcome.

  • Safari Quitting Randomly - But with No Error Messages

    Hi- My Safari has been closing unexpectedly, but the weird thing is I am not getting any of the typical "Safari has closed unexpectedly" errors. It just simply shuts down. It is not when visiting a particular site, and it happens quite randomly. But,