tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laura fu <icela...@hotmail.com>
Subject RE: Regarding Error 404-please help!
Date Sat, 13 Sep 2008 04:45:43 GMT

Hi Ognjen,
 
Thanks so much for your help. I have tried your suggestions, but the site still wouldn't show
my servlet. Althought i have noticed something else which i am not sure if is related to the
issue we're talking about. I reinstall my Apache server and Tomcat. In my Tomcat training
manual, it said "if you were to browse to http://127.0.0.1 with Apache running you would get
a web page showing". However, when i browsed to http://127.0.0.1 or http://localhost, it showed
"Forbidden You don't have permission to access / on this server 
Apache/2.0.63 (Win32) mod_jk/1.2.26 Server at 127.0.0.1 Port 80" 
 
I do have this entry in my host file.
 
So i was just wondering if my previous issue has anything to do with the above problem at
all. Your help is greatly appreciated!!
 
Regards,
 
Laura
 
> Date: Fri, 12 Sep 2008 10:07:19 +0200> From: ognjen@etf.bg.ac.yu> To: users@tomcat.apache.org>
Subject: Re: Regarding Error 404-please help!> > It is really hard to pinpoint your
problem whit such a huge web.xml.> > But, let's try.> > First, for servlet "HelloWorld"
you stated the class name > "/servlet/HelloWorld". That is wrong. Class name should be
fully > qualified Java class name like: "com.something.servlet.HelloWorld".> > Second,
in your servlet mapping, your url pattern for servlet mapping is > " HelloWorld". First
mistake is the leading space, remove it. Second, > in your first message, I see that you
try to invoke your servlet at url > "/servlet/HelloWorld". If you want do invoke your servlet
on that URL, > you must put in url-mapping something like "/servlet/HelloWorld".> >
HTH,> Ognjen> > > laura fu wrote:> > Hi Ognjen,> > > > Thanks
for your reply! Here is my web.xml from jjolt application:> > <?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>
<display-name>JJOLT servlets</display-name>> > <description>> >
JJOLT servlets Examples.> > </description> <servlet>> > <servlet-name>HelloWorld</servlet-name>>
> <servlet-class>/servlet/HelloWorld</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>Hello</servlet-name>> > <servlet-class>/servlet/Hello</servlet-class>>
> </servlet>> > <servlet>> > <servlet-name>Attributes</servlet-name>>
> <servlet-class>Attributes</servlet-class>> > </servlet>> >
<servlet>> > <servlet-name>PostAttributes</servlet-name>> >
<servlet-class>PostAttributes</servlet-class>> > </servlet>> >
<servlet>> > <servlet-name>AddToShoppingCart</servlet-name>> >
<servlet-class>AddToShoppingCart</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>ShoppingCartURLRewrite</servlet-name>>
> <servlet-class>ShoppingCartURLRewrite</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>ReviewShoppingCart</servlet-name>>
> <servlet-class>ReviewShoppingCart</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>ShoppingCartCookies</servlet-name>>
> <servlet-class>ShoppingCartCookies</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>PageCountUsingSessionAPI</servlet-name>>
> <servlet-class>PageCountUsingSessionAPI</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>SaveSessionData</servlet-name>>
> <servlet-class>SaveSessionData</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>ShoppingCartSessionTracking</servlet-name>>
> <servlet-class>ShoppingCartSessionTracking</servlet-class>> > </servlet>>
> <servlet>> > <servlet-name>getExample</servlet-name>> >
<servlet-class>Attributes</servlet-class>> > </servlet>> > <servlet>>
> <servlet-name>getInitializationParameters</servlet-name>> > <servlet-class>Init_param</servlet-class>>
> <init-param>> > <param-name>version </param-name>> > <param-value>best</param-value>>
> </init-param>> > </servlet> <servlet-mapping>> > <servlet-name>HelloWorld</servlet-name>>
> <url-pattern> HelloWorld</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>Hello</servlet-name>> >
<url-pattern>/servlet/Hello</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>Attributes</servlet-name>>
> <url-pattern>/servlet/Attributes</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>PostAttributes</servlet-name>>
> <url-pattern>/servlet/PostAttributes</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>AddToShoppingCart</servlet-name>>
> <url-pattern>/servlet/AddToShoppingCart</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>ReviewShoppingCart</servlet-name>>
> <url-pattern>/servlet/ReviewShoppingCart</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>ShoppingCartURLRewrite</servlet-name>>
> <url-pattern>/servlet/ShoppingCartURLRewrite/*</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>ShoppingCartCookies</servlet-name>>
> <url-pattern>/servlet/ShoppingCartCookies</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>PageCountUsingSessionAPI</servlet-name>>
> <url-pattern>/servlet/PageCountUsingSessionAPI</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>SaveSessionData</servlet-name>>
> <url-pattern>/servlet/SaveSessionData</url-pattern>> > </servlet-mapping>>
> <servlet-mapping>> > <servlet-name>ShoppingCartSessionTracking</servlet-name>>
> <url-pattern>/servlet/ShoppingCartSessionTracking</url-pattern>> >
</servlet-mapping>> > <servlet-mapping>> > <servlet-name>getExample</servlet-name>>
> <url-pattern>/send</url-pattern>> > </servlet-mapping>> >
<servlet-mapping>> > <servlet-name>getInitializationParameters</servlet-name>>
> <url-pattern>/init</url-pattern>> > </servlet-mapping></web-app>>
> Let me know if the email screwed up the formatting, then i will send in another format.
I have also uncommented the invoker servlet in the main web.xml file.> > > > Thanks
so much!> > > > Regards,> > > > Laura> Date: Wed, 10 Sep 2008 09:51:13
+0200> From: ognjen@etf.bg.ac.yu> To: users@tomcat.apache.org> Subject: Re: Regarding
Error 404-please help!> > laura fu wrote:> > Hi Tomcat, How are you? I am new
to using Apache Tomcat and am in the process of learning it. I came across this problem while
i was setting it up, please kindly take a look, i just need a little push in the right direction.
I saved my work HelloWorld.java in the folder in "C:\Program Files\Apache Group\Tomcat 5.5\webapps\jjolt\WEB-INF\classes".
When i type in the address: "http://localhost:8080/jjolt/servlet/HelloWorld" , i am supposed
to see "Hello World" displayed on my browser, but instead i saw this:> > HTTP Status
404 - /jjolt/servlet/HelloWorld> > > > type Status reportmessage /jjolt/servlet/HelloWorlddescription
The requested resource (/jjolt/servlet/HelloWorld) is not available.> > Can you post
web.xml file from jjolt application?> > It seems like you didn't configure servlet mapping.>
> -Ognjen> > > --------------------------------------------------------------------->
To start a new topic, e-mail: users@tomcat.apache.org> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org>
For additional commands, e-mail: users-help@tomcat.apache.org> > > > --------------------------------------------------------------------->
To start a new topic, e-mail: users@tomcat.apache.org> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org>
For additional commands, e-mail: users-help@tomcat.apache.org> 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message