hi jake well if port 80 works with the url http://localhost:80/examples/servlet/snoop
than whatz worng with sachar context.. and i have not written .class in the end still not working ... and WEB-INF is in caps..cos i know tomcat 4 have web-Inf in caps still help me out guys plz... Puneet --- Jacob Kjome <[EMAIL PROTECTED]> wrote: > 2 things I see wrong with your scenario. > > 1. When you refer to a servlet, you don't append > ".class" to the end of > the servlet name. For instance, you wrote: > > http://localhost:80/examples/servlet/abc.class > > which should be: > > http://localhost:80/examples/servlet/abc > > 2. You are going through port 80 which is where a > normal webserver would > be listening. Tomcat listens on port 8080 by > default. Unless you are > fronting Tomcat with another web server, such as > Apache, and using a web > connector (and have the configuration for the web > connector correct for > each context you are accessing) you will not be able > to ask Tomcat to serve > up .jsp's or servlets. > > Try your connection like this: > > http://localhost:8080/examples/servlet/abc > > That will go directly to Tomcat rather than pass > through a web server with > a connector. If this works, then your issue is > narrowed down to > configuring your web connector properly. If it > doesn't work, then we can > look at other issues such as installing Tomcat in a > path with spaces in the > directory names. > > Note: I'm assuming that a class, which is a > servlet, exists in the default > package (eg... WEB-INF/classes) and is named > abc.class for the above link > to work. > > Jake > > At 12:22 PM 6/8/2002 -0700, you wrote: > >Hi friends, this is my 4th mail regarding my single > >complain.. > > > >I have install the tomcat 4.0.3 and its doing fine > as > >far .html files are concern but no .class and .jsp > >files are running on it > > > >I have asked 9-10 times abt same question again and > >again and I got nothing from u guys there > > > >Plz help me�I really stuck .. > > > >With this mail I�m sending my server.xml file and > >web.xml file which is in my virtualhost/WEB-INF/ > > > >I know it is very tough for u to go in these files > and > >see for errors but plz..i�m in need badly and > afater > >spending so much time here I some time feel like > >crying � and I�m in such a place and in such a part > of > >India..where I can�t get ant local computer guy > with > >whom I can discuss ..plz do me a little favour > > > >Here are my problems > >1) no .class and .jsp working only html is > working > >2) I have done all changes which were to made > in > >server.xml�)I have send the file also plz check it > and > >tell me any mistake if u find) > >3) I�m getting 404 error ..no servlet found > >4) And I�m able to excess the .class file vis > >http://localhost:80/examples/servlet/abc.class > > But not by making my own virtual host aand not > even > >the default root directory > > > > > >what i have is my own context named sachar > >and when i go > >.http://puneet:80/sachar/servlet/HelloworldServlet > > > >error -- 404 > > > >See friends ..if u can help me I�ll be very > grateful > >to u > > > >Puneet > > > > > >__________________________________________________ > >Do You Yahoo!? > >Yahoo! - Official partner of 2002 FIFA World Cup > >http://fifaworldcup.yahoo.com<?xml version="1.0" > encoding="ISO-8859-1"?> > > > ><!DOCTYPE web-app > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web > Application 2.3//EN" > > "http://java.sun.com/dtd/web-app_2_3.dtd"> > > > ><web-app> > ><servlet> > ><servlet-name>MyExample</servlet-name> > ><servlet-class>HelloWorldExample</servlet-class> > ><run-as> > ><description>Security role for anonymous > access</description> > ><role-name>tomcat</role-name> > ></run-as> > ></servlet> > > > ><servlet-mapping> > ><servlet-name>MyExample</servlet-name> > ><url-pattern>/sachar/servlet/snoop</url-pattern> > ><url-pattern>/servlet/*</url-pattern> > ></servlet-mapping> > > > > > ></web-app> > ><!-- Example Server Configuration File --> > ><!-- Note that component elements are nested > corresponding to their > > parent-child relationships with each other > --> > > > ><!-- A "Server" is a singleton element that > represents the entire JVM, > > which may contain one or more "Service" > instances. The Server > > listens for a shutdown command on the > indicated port. > > > > Note: A "Server" is not itself a > "Container", so you may not > > define subcomponents such as "Valves" or > "Loggers" at this level. > > --> > > > ><Server port="8005" shutdown="SHUTDOWN" debug="0"> > > > > > > <!-- A "Service" is a collection of one or more > "Connectors" that share > > a single "Container" (and therefore the web > applications visible > > within that Container). Normally, that > Container is an "Engine", > > but this is not required. > > > > Note: A "Service" is not itself a > "Container", so you may not > > define subcomponents such as "Valves" or > "Loggers" at this level. > > --> > > > > <!-- Define the Tomcat Stand-Alone Service --> > > <Service name="Tomcat-Standalone"> > > > > <!-- A "Connector" represents an endpoint by > which requests are received > > and responses are returned. Each > Connector passes requests on > > to the > > associated "Container" (normally an > Engine) for processing. > > > > By default, a non-SSL HTTP/1.1 Connector > is established on port > > 8080. > > You can also enable an SSL HTTP/1.1 > Connector on port 8443 by > > following the instructions below and > uncommenting the second > > Connector > > entry. SSL support requires the > following steps (see the SSL Config > > HOWTO in the Tomcat 4.0 documentation > bundle for more detailed > > instructions): > > * Download and install JSSE 1.0.2 or > later, and put the JAR files > > into "$JAVA_HOME/jre/lib/ext". > > * Execute: > > %JAVA_HOME%\bin\keytool -genkey > -alias tomcat -keyalg RSA > > (Windows) > > $JAVA_HOME/bin/keytool -genkey -alias > tomcat === message truncated === __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
