• Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with deploying servlet

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic