-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Leo,

On 3/19/13 12:15 PM, Leo Donahue - RDSA IT wrote:
>> -----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.

+1

> Tomcat 6 doesn't have that on by default anymore, and you should 
> leave it that way.

+1

> 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.

Yup: something like <form action="ResponseDemoServlet"> in your HTML
and then a <servlet> that defines the servlet in web.xml and then a
<servlet-mapping> which maps it later on -- also in 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.

I completely agree: while webapps are (mostly) forward-compatible with
newer servers, a lot of old books are going to be relying on features
like the invoker servlet.

Go get a copy of "Tomcat: The Definitive Guide" by Jason Brittain (who
happens to lurk on this list, FYI) and Ian Darwin. It's targeted at
Tomcat 6.x but not much has changed (with old features) since its
publication. There's plenty of new, exciting stuff but the basics will
be well-covered by T:TDG.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlFIxO4ACgkQ9CaO5/Lv0PAN4gCfWm/TCacnneTXW6i0377mABPu
cSoAoK53HOPGBQZQ/Vdac9Ey2pJLnJE0
=NNvB
-----END PGP SIGNATURE-----

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

Reply via email to