Starting tomcat under Windows 7 x64

0 like 0 dislike
7 views
Hello. So, the problem. For laboratory, a simple servlet, you must run and test this thing on tomcat.
Actually, I tried several different versions of the server:
Tomcat 5.5.x
Tomcat 6.0.29 64-bit Windows
Tomcat 6.0.29 64-bit Itanium Windows
Tomcat 6.0.29 32-bit/64-bit Windows Service Installer

Basically, tomcat runs on port 80 localhost hanging his welcome page.
But the laboratory is not triggered by the url 500 error.
I suspect something is wrong with my system, namely tomato not enough library APR.
All launches of the different versions tomcata start with this about the error:
21.12.2010 10:52:57 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\\Program Files\\Java\\jre6\\bin;.;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:\\ant\\bin\\;C:\\Program Files (x86)\VIDIA Corporation\\PhysX\\Common;C:\\windows\\system32
21.12.2010 10:52:57 org.apache.coyote.http11.Http11Protocol init

More like no errors are seen.

Pandektis this question, I realized that it seems to need this very library APR.
But unfortunately where to get, how to install and where to connect the tomkat in the system folder or somewhere Yandex time is of the session on the nose.

Please suggest a solution for this problem. Many thanks in advance.

UPD
Actually, the tomkat is started via the appropriate button on the toolbar of eclipse.
Here are the logs at startup (something that comes out in the eclipse console)
21.12.2010 12:06:53 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\\Program Files\\Java\\jre6\\bin;.;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:\\ant\\bin\\;C:\\Program Files (x86)\VIDIA Corporation\\PhysX\\Common;C:\\windows\\system32
21.12.2010 12:06:53 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
21.12.2010 12:06:53 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 617 ms
21.12.2010 12:06:53 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
21.12.2010 12:06:53 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
21.12.2010 12:06:53 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
21.12.2010 12:06:53 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
21.12.2010 12:06:53 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor serverApp.xml
21.12.2010 12:06:53 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
21.12.2010 12:06:54 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
21.12.2010 12:06:54 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
21.12.2010 12:06:54 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
21.12.2010 12:06:54 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
21.12.2010 12:06:54 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
21.12.2010 12:06:54 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
21.12.2010 12:06:54 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/42 config=null
21.12.2010 12:06:54 org.apache.catalina.startup.Catalina start
INFO: Server startup in 996 ms


That's what appends when you stop:
21.12.2010 12:07:25 org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
21.12.2010 12:07:26 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina


The project servlet was created as a "Tomcat Project".
Here is the code of servlet:
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class servlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("\");
out.println("
\"+"Protocol: ");
out.println(request.getProtocol());
out.println("
\"+"Request URI: ");
out.println(request.getRequestURI());
out.println("
\"+"Request Method: ");
out.println(request.getMethod());
Enumeration headerNames = request.getHeaderNames();
out.println(""+headerName);

out.println(" " + request.getHeader(headerName));
}
out.println("\

This address C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\conf\\Catalina\\localhost file is located serverApp.xml
with the following content:
/>

In the folder with the project D:\\eclipse\\labs\\serverApp\\WEB-INF lies web.xml
with the following contents:
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD<br/>Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>

serverApp
servlеt


serverApp
/servlet



At the same time, when you try to open localhost:8080/serverApp/servlet
you receive the 500 error:
description: The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Wrapper cannot find servlet class servlеt or a class it depends on
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)

root cause

java.lang.ClassNotFoundException: servlеt
org.apache.catalina.loader.The WebappClassLoader.loadClass(WebappClassLoader.java:1645)
org.apache.catalina.loader.The WebappClassLoader.loadClass(WebappClassLoader.java:1491)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)


In General, it cannot find the class itself, although the application and the project kind finds.
by | 7 views

3 Answers

0 like 0 dislike
The simple servlet in the Studio. And logs deployment too.
by
0 like 0 dislike
As far as I know, APR has nothing to do with it. The logs all look? There are several different. Plus, I was faced with the fact that tomcat does not reset in the log sometimes the error before closing it (or fill the buffer) — try sdelayt stop tomcat, and then look in the log.
Well, the logging level can be more to deliver.
In General, it seems that you misspelled the servlet is unloaded. Put directly in the ROOT with your hands, for example. As added? Through the web-admin panel?
by
0 like 0 dislike
sandello and mambet thank you for participating and trying to help, but the problem somehow resolved itself, after some of my absence at home, perhaps a computer restart helped.
Though nothing since then has not changed, so who knows what was the problem, everything remained as it was.
by

Related questions

0 like 0 dislike
1 answer
asked May 10, 2019 by TosterGuest
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 22, 2019 by vanesxl
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,758 users