Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Start In Servlets

 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey , i am new to servlets .. can anyone suggest me a book ..
i am currently reading java complete reference...
in the book the text is based on tomcat 4.0 but i have installed tomcat 5.5
for the first basic example of servlet the book says to copy the class file of the servlet in the folder
tomcat_home/webapps/examples/WEB-INF/classes..
but no such folder exists in my tomcat home...there are only two folders in the webapps- root and tomcat-docs.
can any one help...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply copy the complete "examples" folder into "webapps" - it's quite possible to create new directories in it.
 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i already tried it..
i was looking for some serious reply...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How was my reply not serious? And how are we supposed to help you if you don't tell us what you tried, and what, exactly, the result of that was? TellTheDetails
 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i created the folders by myself and copied the class file of the servlet
but the reply in the browser was that it was not available..
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing which URL you're accessing, what the web.xml file contains, and which classes are located where, it'll be hard to track this one down.
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try out just hitting the Tomact home page first to see if it works fine? Should be something like http://localhost:8080

Whats the message that you get in the browser- is it a 404 or a internal server error? Do you get any message in th tomcat console?
Have you created a proper deploy folder (examples should have a dir named WEB_INF -- all capital & web.xml --- both a needed).

Being rude when asking for help isn't really the smartest of ideas specially when you some really talented programers are answering some pretty basic questions just to help you out ...


Cheers,
Sam

P.S : You did start your tomcat - right?
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found this post a couple of lin below -- http://www.coderanch.com/t/362081/Servlets/java/Tomcat-requested-resource-not-available

Maybe you have the same problem ...
 
ankur tyagi
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please recommend me some book...
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ankur tyagi wrote:can you please recommend me some book...


I'm a fan of the Head First Series when it comes to JSP/Servlets - So I'd say Head first JSP and Servlets. You should get more unbaised opinions in the books forum -- its there somewhere around here

Doing your very first deployment is always hard buts its a great learning experience and lot of fun when it actually works!!
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ankur tyagi wrote:can you please recommend me some book...

Have a look at http://pdf.coreservlets.com Here you can download chapters for the book in PDF format for free. You'll see you also have access to a couple great Servlet tutorials via that page. This book was a great resource for me while I was learning Servlets and JavaServer Pages.

Good luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic