>-----Original Message-----
>From: Satya Priya Das [mailto:am_sp...@yahoo.co.in]
>Subject: problems faced in deploying servlet
>
>I am a retd. software person,worked with autocoder,COBOL,assembler,c, and
>now trying to learn java, I am using Java for the Web with Servlets,jsp,and EJB
>by Budi Kurniwan, but unfortunatetely the tomcat v4 has been used in the
>book for examples.
>Downloading of tomcat6.0.36, and installing of tomcat has been done success
>fully.The example in chapter one has been compiled and tested o.k.,The
>servlet context example compiled and deployed successfully.
>Now the example for RequestDemoServlet has been compiled  o.k, but when
>I want to deploy the example with index.html file using action element, the
>source not found message is displayed. I have used alias name,class name,
>even url-mapping but result is same.
>A directory myapp has been created under which  subdirs are build,doc,web
>and build.xml build.properties file. The wb.xml file created as per book with
>//DTDWeb application 2.3//en pL. guide me how I can trace the causes of
>resource not found message.
>Thanks
>s.p.das

I looked up your book online using Google Books.  I can see on page 31 where 
your project starts, but it skips the rest of the pages to page 34.  I'm 
guessing this line is your problem:

<FORM ACTION=servlet/ResponseDemoServlet METHOD="POST">

Tomcat 4 had something called the invoker servlet turned on by default, which 
meant requests were passed through the mapping of:  servlet/someservletname.
Tomcat 6 doesn't have that on by default anymore, and you should leave it that 
way.

All you need to do is update the url-mapping for your form's action to the 
correct url pattern, based on how you deployed your "myapp" and how you 
referenced this servlet in your web.xml. 

You are likely going to be confused throughout this book if all the examples 
are based on Tomcat 4.  I don't know anyone still putting HTML code in 
out.println statements.  Can you afford to get a newer book on JSP/Servlets?  
There are also semi-decent websites that have some newer content.

Leo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to