aspose file tools*
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
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
Author

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?


hth
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
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.


Ping & DNS - my free Android networking tools app
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 223

In addtion to what Ulf said,

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


OCPJP
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 java.io.UnsupportedEncodingException: ISO-8851-1
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
at java.io.InputStreamReader.<init>(InputStreamReader.java:100)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.createReader
.....
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
Bartender

Joined: Apr 07, 2010
Posts: 1717
    
  25

Check this thread.

Regards,
Frits
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
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: http://aspose.com/file-tools
 
subject: deploy servlet head foot book p. 31