This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

tomcat4

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is in reference with
"https://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.
 
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
 
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
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
sigh.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic