5 Replies - 311 Views - Last Post: 14 September 2017 - 02:24 AM

#1 Yevgeni Duvenage  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-September 17

Servlet launching - error "The requested resource is not available

Posted 11 September 2017 - 05:55 AM

Hey, everyone! I truly hope you can help.

I am well aware there have been many, many related questions asked already about this, as well as even more answers. Unfortunately, having tried all this advice I still cannot resolve this problem.

I am trying to launch a simple Java servlet in the browser, following instructions from the textbook:

Java Programming: Comprehensive Concepts and Techniques, Shelly Cashman Series, ISBN: 9781418859855.

I am aware of the advice given here to other people with this/similar problems, that servlets should preferably be written under a package, and not packageless, but I am following the textbook's guidance with this, and of course being a textbook, its method must work. I seek help with doing it in THIS method.

I have a Java servlet, called HTMLBank.java which I successfully compiled with no compilation errors. Now, according to the textbook:

1) Place the .class file into C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes folder. Yes, the textbook uses the default package for this and the ROOT directory of Tomcat.

2) Run the Tomcat service - it is running (shown as a green "play" arrow in right-bottom of the screen).

3) In the browser, type URL: http://localhost:8080/servlet/HTMLBank and enter it. After doing this, the following error results:

HTTP Status 404 - /servlet/HTMLBank
type Status report
message /servlet/HTMLBank
description The requested resource (/servlet/HTMLBank) is not available.


Now, I might mention that I did succeed in launching a servlet once before, but that was only if I used a package, say com.example and mapped it in the web.xml file, but as stated before, this deviates from the textbook and I need to get it to work using the default package and ROOT directory.

Here is the code of the HTMLBank.java servlet file:

import javax.servlet.*;
import javax.servlet.http.*;

import java.io.; import java.util.;

public class HTMLBank extends HttpServlet { public void init() throws ServletException {

}

public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    response.setHeader("Expires", "Tues, 01 Jan 1980 00:00:00 GMT");

    out.println("<html>");
        out.println("<title>Online Bank ATM Simulator</title>");
        out.println("<h1>Tester Text.</h1>");
        out.println("<body>This serves to test functioning of the servlet in browser.</body>");
    out.println("</html>");
}

public void destroy()
{

}
}


Here is the code of the web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>
  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. -->
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

Welcome to Tomcat Welcome to Tomcat

<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>
<-- added the following for invoker servlet --> invoker org.apache.catalina.servlets.InvokerServlet

<servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
</servlet-mapping>

The web.xml file was modified per book guide to allow locating anonymous servlets in the default directory.

Here is the context.xml file:

<!-- The contents of this file will be loaded for each web application -->
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>META-INF/context.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->

This file was edited to enable servlet reloading, also as per book guide.

The following are paths to all the files/folders involved in this discussion:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes --> I created the "classes" folder, per book guide.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\HTMLBank.class --> I placed the .class file into here.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\web.xml --> This is the location of web.xml file which was edited.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\context.xml is the location of the context.xml file which was edited.

So, as I said, I NEED to work the servlet without a package and from ROOT.

Please can somebody help? I greatly appreciate it!

Is This A Good Question/Topic? 0
  • +

Replies To: Servlet launching - error "The requested resource is not available

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13400
  • View blog
  • Posts: 53,481
  • Joined: 12-June 08

Re: Servlet launching - error "The requested resource is not available

Posted 11 September 2017 - 06:40 AM

Is 8080 the tomcat port?

Is the tomcat service/server running?
Was This Post Helpful? 0
  • +
  • -

#3 ndc85430  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 565
  • Posts: 2,324
  • Joined: 13-June 14

Re: Servlet launching - error "The requested resource is not available

Posted 11 September 2017 - 09:49 PM

The error is a 404, which confirms that the server is running, but that the path in the URL is incorrect. Well, it's really that the path you're putting in the browser is different to the one that the server is listening for requests to, which is defined in the servlet mapping I guess.

I don't work with pure Java servlet and am typing this on a phone, so haven't got much time to look through the code.
Was This Post Helpful? 0
  • +
  • -

#4 Yevgeni Duvenage  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-September 17

Re: Servlet launching - error "The requested resource is not available

Posted 12 September 2017 - 01:24 AM

View Postmodi123_1, on 11 September 2017 - 06:40 AM, said:

Is 8080 the tomcat port?

Is the tomcat service/server running?


Yes, the "8080" is the Tomcat port. Tomcat service does run (green "play" arrow on its icon) whenever I try launching a servlet. I still suspect the issue is with referencing as in what links the URL to the web.xml file, but I see no error as I have verified the mappings I inserted many times. I have to use the Invoker Servlet, hence the general mapping you see.

View Postndc85430, on 11 September 2017 - 09:49 PM, said:

The error is a 404, which confirms that the server is running, but that the path in the URL is incorrect. Well, it's really that the path you're putting in the browser is different to the one that the server is listening for requests to, which is defined in the servlet mapping I guess.

I don't work with pure Java servlet and am typing this on a phone, so haven't got much time to look through the code.


That's also my suspicion. But I just don't see where I am mismatching references.

In my post I give all applicable URL's as well as paths to all relevant files on my HDD, full paths. I also gave the actual code content of the web.xml file, can you see anything wrong as to any of these important references?

I use the Invoker Servlet and have to do it this way.
Was This Post Helpful? 0
  • +
  • -

#5 Yevgeni Duvenage  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-September 17

Re: Servlet launching - error "The requested resource is not available

Posted 13 September 2017 - 04:01 AM

Guys, I insert the content of an error log file generated by Tomcat. I am a novice at Java, so to me it does not explain much. Can you please go through it and see if it is of any use as to finding the issue? Thanks.

08 Sep 2017 10:47:53 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
08 Sep 2017 10:47:53 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3887 ms
08 Sep 2017 10:47:54 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
08 Sep 2017 10:47:54 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
08 Sep 2017 10:47:54 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
08 Sep 2017 10:47:56 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
08 Sep 2017 10:47:56 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
08 Sep 2017 10:47:56 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
08 Sep 2017 10:47:57 AM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 42 column 2: The content of elements must consist of well-formed character data or markup.
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
	at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:959)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4020)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:909)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:872)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
08 Sep 2017 10:47:57 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
	at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:302)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:959)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:249)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4020)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:909)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:872)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
08 Sep 2017 10:47:57 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
SEVERE: Occurred at line 42 column 2
08 Sep 2017 10:47:57 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
08 Sep 2017 10:47:57 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
08 Sep 2017 10:47:57 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
08 Sep 2017 10:47:57 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
08 Sep 2017 10:47:57 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
08 Sep 2017 10:47:58 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
08 Sep 2017 10:47:58 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
08 Sep 2017 10:47:58 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/152  config=null
08 Sep 2017 10:47:58 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
08 Sep 2017 10:47:58 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4765 ms
09 Sep 2017 10:44:16 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
09 Sep 2017 10:44:18 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.jsp_classpath', '/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/servlets-examples/WEB-INF/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/shared/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-en.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-es.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-fr.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-ja.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/commons-el.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-compiler-jdt.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-compiler.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-runtime.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jsp-api.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-factory-dbcp.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-factory.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-resources.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/servlet-api.jar;/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/bin/bootstrap.jar;/C:/Program%20Files/Java/jre6/lib/ext/dnsns.jar;/C:/Program%20Files/Java/jre6/lib/ext/localedata.jar;/C:/Program%20Files/Java/jre6/lib/ext/servlet-api.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunjce_provider.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunmscapi.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunpkcs11.jar')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@257f1b')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('javax.servlet.context.tempdir', 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\work\Catalina\localhost\servlets-examples')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.resources', '[email protected]')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@1d6fbb3')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@1d6fbb3')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@126d3df')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.jsp_classpath', '/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/jsp-examples/WEB-INF/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/jsp-examples/WEB-INF/lib/jstl.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/jsp-examples/WEB-INF/lib/standard.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/shared/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/classes/;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-en.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-es.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-fr.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/i18n/tomcat-i18n-ja.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/commons-el.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-compiler-jdt.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-compiler.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jasper-runtime.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/jsp-api.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-factory-dbcp.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-factory.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/naming-resources.jar;/C:/Program Files/Apache Software Foundation/Tomcat 5.5/common/lib/servlet-api.jar;/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/bin/bootstrap.jar;/C:/Program%20Files/Java/jre6/lib/ext/dnsns.jar;/C:/Program%20Files/Java/jre6/lib/ext/localedata.jar;/C:/Program%20Files/Java/jre6/lib/ext/servlet-api.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunjce_provider.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunmscapi.jar;/C:/Program%20Files/Java/jre6/lib/ext/sunpkcs11.jar')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@c5aa00')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('javax.servlet.context.tempdir', 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\work\Catalina\localhost\jsp-examples')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeRemoved('org.apache.catalina.resources', '[email protected]')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@136d9d8')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@136d9d8')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@1827d1')
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
09 Sep 2017 10:44:18 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
09 Sep 2017 10:44:18 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

Was This Post Helpful? 0
  • +
  • -

#6 Yevgeni Duvenage  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-September 17

Re: Servlet launching - error "The requested resource is not available

Posted 14 September 2017 - 02:24 AM

Okay, guys, I solved this problem:

The error log actually shows that line 42 of the web.xml file has an error. I examined that line and found a very stupid typo right at the beginning - the comment beginning tag that was supposed to be typed as <!-- was mistakenly typed as <-- and obviously it couldn't recognize it. Almost 3 weeks of searching in wrong places because I never would have thought to check something like this.

Thanks nonetheless to everybody who replied to help, it was much appreciated!
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1