Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with deploying servlet  RSS feed

 
Dave Thunder
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, I have problem with deploying servlet.
I use Eclipse, Deploytool and Sun Java Application Server v. 8.1.

After deploying, when I click "Launch" in Server Admin Console, I cant see my servlet working, I get instead of it:

Directory "Listing For /
Filename Size Last Modified
Sun-Java-System/Application-Server

What should I do to run my servlet?

Thanks guys.
 
Dave Thunder
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I turn off dir Listing somehow or there is some another problem, whick prevents me from seeing my servlet working?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you mapped the servlet to listen for requests on "/"?
 
Dave Thunder
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I havent.

How should I do this?

At school we wrote some servlets but didn't do anything like that Ithink. That's why I haven't thought about it.

Can you please tell what should I do exactly?

Thanks!!
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf means to ask, "Have you configured/mapped your servlet, to listen on "/", in web.xml file?".
[ December 05, 2005: Message edited by: Adeel Ansari ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need <servlet> and <servlet-mapping> entries in your web.xml file. A quick reference to those can be found here.
[ December 05, 2005: Message edited by: Ulf Dittmer ]
 
Dave Thunder
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This doesn't help me. Stil getting dir listing.

Does this mean i should be able to acess my servlet like this :
http://machine ort/Kontroller/Kontroller ?

And what is this deploytool for, why do I have to dig manually in xml file?

[ December 05, 2005: Message edited by: Dave Thunder ]
[ December 05, 2005: Message edited by: Dave Thunder ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WIth that setup, you should be able to access the servlet at http://machine ort/Kontroller (unless the web app is also named Kontroller, in which case the URL you gave would be correct).

No idea what deploytool is or does. Sounds like a Sun App Server thing - consulting the manual might help you with that.
 
Dave Thunder
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.

The deploytool is a tool whick comes with sun AppServer and it is for deploying stuff. I have found now tab named "Alias", which sets <url-pattern>.

Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!