wood burning stoves 2.0*
The moose likes Servlets and the fly likes Start In Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Start In Servlets" Watch "Start In Servlets" New topic
Author

Start In Servlets

ankur tyagi
Ranch Hand

Joined: Apr 01, 2009
Posts: 49
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
Marshal

Joined: Mar 22, 2005
Posts: 41064
    
  43
Simply copy the complete "examples" folder into "webapps" - it's quite possible to create new directories in it.


Ping & DNS - my free Android networking tools app
ankur tyagi
Ranch Hand

Joined: Apr 01, 2009
Posts: 49
i already tried it..
i was looking for some serious reply...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41064
    
  43
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

Joined: Apr 01, 2009
Posts: 49
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
Marshal

Joined: Mar 22, 2005
Posts: 41064
    
  43
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

Joined: Feb 08, 2009
Posts: 597

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?

Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 597

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

Joined: Apr 01, 2009
Posts: 49
can you please recommend me some book...
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 597

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

Joined: Apr 01, 2009
Posts: 643
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Start In Servlets
 
Similar Threads
servlet can't see html files?
Why dont My Servlets Load Automatically?
Servlet Deployment / 404 resource() not available error
Not able to run servlet-HTTP status404
tomcat