• 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

Servlets..

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to Servlets and trying to learn this topic along with JSP. I have downloaded the Servlet 2.3 specification and I assume the JSP 1.2 comes along with it. I have also downloaded the Tomcat 3.1,3.2 and 4.0 versions. I have the Core Servlets and Java Server Pages book by Marty Hall. I have been trying to set up the Tomcat by following the book but haven't been sucessful at all. I copied the Hello World servlet program and tried executing it, but it gives me Http error code of 405. This is after setting up the Tomact 3.1 version. Could somebody help me with installation of the Tomcat(latest version would be good) and why I am getting this error?
Thank you very much,
Chuck
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you think the tomcat setting is correct, you should make sure that the class you compiled was in the right folder under webapps then web-inf then classes.
 
Chuck Meduri
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Li:
If you think the tomcat setting is correct, you should make sure that the class you compiled was in the right folder under webapps then web-inf then classes.


The class that I compiled is under webapps\web-inf\classes as described in the text book that I mentioned in my question.
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
For Tomcat 3.2 keep your html & jsp files in
"D:\jakarta-tomcat\webapps\ROOT" directory (here my installation dir is "d:\jakarta-tomcat" )
to run html/jsp file.
"http://localhost:8080/Hello.jsp "
or
"http://localhost:8080/Hello.jsp "

To run servlets keep your compiled servlets files in
"D:\jakarta-tomcat\webapps\ROOT\WEB-INF\classes" dir
To run "Hello.class" (servlet file)
"http://localhost:8080/servlet/Hello "
solaiappan
 
Chuck Meduri
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by P SOLAIAPPAN:
hi,
For Tomcat 3.2 keep your html & jsp files in
"D:\jakarta-tomcat\webapps\ROOT" directory (here my installation dir is "d:\jakarta-tomcat" )
to run html/jsp file.
"http://localhost:8080/Hello.jsp "
or
"http://localhost:8080/Hello.jsp "

To run servlets keep your compiled servlets files in
"D:\jakarta-tomcat\webapps\ROOT\WEB-INF\classes" dir
To run "Hello.class" (servlet file)
"http://localhost:8080/servlet/Hello "
solaiappan


I typed in http://localhost/servlet/HelloWorld which is the name of my servlet just like it was descibed in the book.
Any other suggestions would be appreciated
Thank you,
Chuck
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is very important the you type :8080 after localhost. If not, then it will not work. However, I have heard that if you change the port number in your server.xml file from 8080 to just 80 it will work as http://localhost/servlet/ServletName
------------------
I hope its helps, feel free to email me noahcarroll@juno.com
[This message has been edited by Noah Carroll (edited November 30, 2000).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic