This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes deploy servlet head foot book p. 31 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "deploy servlet head foot book p. 31" Watch "deploy servlet head foot book p. 31" New topic

deploy servlet head foot book p. 31

timo corn
Ranch Hand

Joined: Oct 26, 2013
Posts: 68

I tried the example and get the following error:
type Status report

message /ch1/Serv1

description The requested resource is not available.

This is my webxml in the Tomcat Web-Inf dir.:

I have a ch1Servlet.class file in the Tomcat webApps ch1 webinf classes folder:

I am running another servlet site in eclipse, which works. The eclipse files are in my eclipse workspace, but not in the tomcat folder. I thought that eclipse copies automatic the files to Tomcat (Webxml and servlet classes)?

Maybe something is wrong with Tomcat folder?

The servlet from chapter 1 of the book runs on port 8080?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
I invariably advise beginners not to use the Eclipse/Tomcat integration, but instead to run Tomcat as a standalone server. Many issues that tend to confuse beginners (like the ones you describe) can be avoided that way.
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 225

In addtion to what Ulf said,

Your servlet is in default package. You may find a better description of this in Servlet FAQ's.

timo corn
Ranch Hand

Joined: Oct 26, 2013
Posts: 68

The eclipse Tomcat is stopped, so there should be no conflicts with my tomcat web app without ide (--> core webapp).
I again enclose the web.xml:

When I start tomcat, I get the following message:SEVERE: Parse error in application web.xml file at jndi:/localhost/ch1/WEB-INF/w
eb.xml... ch1 startup failed

When I copy the web.xml to eclipse and try to save: Error-Character encoding 8851 - 1 is not supported.
In my editor, I use ANSI.

If i switch tu Ansi as Utf8, I get the same parse error, but server startup.

There is one exception ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(
these are all methods? They seem all related to xml ? InputStreamReader is a class, but there is <init> which seems a method?

I have to delete these errors before continuing? My goal is to start the web app ch1 with Servlet serv1
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper

Joined: Apr 07, 2010
Posts: 2040

Check this thread.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
ISO 8851-1: Butter -- Determination of moisture, non-fat solids and fat contents (Routine methods) -- Part 1: Determination of moisture content

Yep, I don't think that's going to help in a web app
I agree. Here's the link:
subject: deploy servlet head foot book p. 31
It's not a secret anymore!