Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

tomcat4

 
prasad hagargi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is in reference with
"http://www.coderanch.com/t/82167/Tomcat/configuring-servlets-tomcat"

below is the structure of the web.xml of the application,iam trying to deploy

<?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>HelloWorldExample</servlet-name>
<servlet-class>test.HelloWorldExample</servlet-class>
</servlet>
</web-app>
while invoking iam using the url
http://localhost:8080/test/servlet/HelloWorldExample
the context tag in server.xml is
<Context path="/test" docBase="test" debug="0"
reloadable="true" crossContext="true"/>
i still am getting
The requested resource (/test/servlet/HelloWorldExample) is not available.
 
Andrea Gazzarini
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try with http://localhost:8080/servlet/HelloWorldExample
all the servlets you deploy into tomcat by default doesn't need the <docbase> of your webapp in the url.
You can obviously override this behaviour (see conf/server.xml)
Greetings
 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Report post to moderator
I try the url like http://localhost:8080/servlet/SomeServlet
or
http://localhost:8080/SomePath/servlet/SomeServlet
,it's also not available.
I only succeed when like
[web.xml]
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
[server.xml]
<Context path="/test" docBase="test" debug="0" />
[url]
http://localhost:8080/test/whateveryoutypehere.do
I also don't know why.
Some experience man can let me know why??
 
prasad hagargi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Report post to moderator
my problem is solved ,thanks a lot folks,
i have one more query,like what is the configuration procedure ,if i want to enable cross context invocations
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
sigh.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic