tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik" <m...@filip.net>
Subject RE: Servlets do not run under Apache-tomcat
Date Thu, 29 Mar 2001 22:24:27 GMT
of course for my configuration, I had to add the aliases to web.xml

so that when the request for /examples/servlets/HelloWorld comes in, it gets
forwarded to /examples and web.xml translates /examples/HelloWorld into the
actual classname

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
filip@filip.net
www.filip.net

> -----Original Message-----
> From: Filip Hanik [mailto:mail@filip.net]
> Sent: Thursday, March 29, 2001 2:19 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Servlets do not run under Apache-tomcat
>
>
> I would really switch to mod_jk that will solve your problems once and for
> all.
>
> this is a file I used in the past for mod_jserv. if I have time
> over I will
> see if I can get it up and running again
>
> Filip
>
> <IfModule mod_jserv.c>
> # Do not edit!
> ApJServManual on
> ApJServDefaultProtocol ajpv12
> ApJServSecretKey DISABLED
> ApJServMountCopy on
> ApJServLogLevel notice
>
>
> ApJServDefaultHost localhost
> ApJServDefaultPort 8007
>
> AddType text/jsp .jsp
> AddHandler jserv-servlet .jsp
>
> Alias /examples D:\Apache\jakarta-tomcat\webapps\examples
> <Directory "D:\Apache\jakarta-tomcat\webapps\examples">
> 	Options Indexes FollowSymLinks
> 	Options -Indexes
> 	DirectoryIndex index.html
> </Directory>
>
> <Location /examples/WEB-INF>
> 	AllowOverride None
> 	deny from all
> </Location>
>
> ApJServMount /examples/servlet /examples
>
> </IfModule>
>
> ~
> Namaste - I bow to the divine in you
> ~
> Filip Hanik
> Software Architect
> filip@filip.net
> www.filip.net
>
> > -----Original Message-----
> > From: Animesh Chaturvedi - US [mailto:animeshc@allegronetworks.com]
> > Sent: Thursday, March 29, 2001 2:04 PM
> > To: 'tomcat-user@jakarta.apache.org'
> > Subject: RE: Servlets do not run under Apache-tomcat
> >
> >
> > Hi Filip
> >
> > I tried removing the alias directive. It did not work because
> > then it starts
> > looking into DocumentRoot which has been set to
> apache-home/htdocs and it
> > does not find the file there since its not there.
> >
> > I have tried every combination in tomcat.conf file. It seems
> that /servlet
> > requests do not reach tomcat atall. It looks for the servlet just like a
> > normal file in the file hiearchy  and does not invoke it.
> >
> > Hey I am really clueless about this can anyone help me out..
> >
> > regards
> >
> > Animesh
> >
> >
> >
> > -----Original Message-----
> > From: Filip Hanik [mailto:mail@filip.net]
> > Sent: Thursday, March 29, 2001 2:35 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: RE: Servlets do not run under Apache-tomcat
> >
> >
> > > Also if in a jsp in the examples context i put <jsp:forward
> > > page="/servlet/HelloWorldExample" /> and refernce the jsp it works.
> > this works because Apache nor mod_jserv is involved, this is an internal
> > Tomcat operation
> >
> > > So if I point my browser to
> > > https://server-name/examples/servlet/HelloWorldExample  it
> > should run the
> > > HelloWorldExample servlet. The jsps in examples context are
> running fine
> > > without problem.
> >
> > you have to look up the documentation for mod_jserv. If switching
> > to mod_jk
> > is not an option (and Apache 1.3.17 does support mod_jk, hell we
> > used apache
> > 1.3.14 for mod_jk:),
> > I can help you do the research, but the docs are pretty detailed.
> > they even walk you through some examples
> >
> > but I can't seem to find the docs I once used, and that is
> > probably because
> > mod_jk is much more widely used.
> > read the $TOMCAT_HOME/doc/uguide/tomcat_ug.html	for the AjpServMount
> > directive.
> >
> > Also, try to remove the Alias directive, and see if that will work
> >
> > Filip
> >
> > ~
> > Namaste - I bow to the divine in you
> > ~
> > Filip Hanik
> > Software Architect
> > filip@filip.net
> > www.filip.net
> >
> > > -----Original Message-----
> > > From: Animesh Chaturvedi - US [mailto:animeshc@allegronetworks.com]
> > > Sent: Thursday, March 29, 2001 11:53 AM
> > > To: 'tomcat-user@jakarta.apache.org'
> > > Subject: RE: Servlets do not run under Apache-tomcat
> > >
> > >
> > > Yeah Filip
> > >
> > > I agree but why is it not serving my servlet.
> > >
> > > The HelloWorldExample Servlet's .class file is placed in
> > > /myroot/jakarta-tomcat/webapps/examples/WEB-INF/classes folder
> > >
> > > So if I point my browser to
> > > https://server-name/examples/servlet/HelloWorldExample  it
> > should run the
> > > HelloWorldExample servlet. The jsps in examples context are
> running fine
> > > without problem.
> > >
> >
> > >
> > > So whats going wrong. Any idea???
> > >
> > >
> > > Animesh
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Filip Hanik [mailto:mail@filip.net]
> > > Sent: Thursday, March 29, 2001 1:33 PM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: RE: Servlets do not run under Apache-tomcat
> > >
> > >
> > > > Alias /examples /myroot/jakarta-tomcat/webapps/examples
> > > > <Directory "/myroot/jakarta-tomcat/webapps/examples>
> > > >   Options Indexes FollowSymLinks
> > > > </Directory>
> > > >
> > > > ApJServMount /examples/servlet /examples
> > > > <Location /examples/WEB-INF/ >
> > > >    AllowOverride None
> > > >    deny  from all
> > > > </Location>
> > >
> > > this looks like anything that goes to
> > > /examples/servlet is being sent /examples which is being aliased to
> > > /myroot/jakarta-tomcat/webapps/examples file system
> > >
> > > agree?
> > > Filip
> > >
> > > ~
> > > Namaste - I bow to the divine in you
> > > ~
> > > Filip Hanik
> > > Software Architect
> > > filip@filip.net
> > > www.filip.net
> > >
> > > > -----Original Message-----
> > > > From: Animesh Chaturvedi - US [mailto:animeshc@allegronetworks.com]
> > > > Sent: Thursday, March 29, 2001 9:58 AM
> > > > To: 'tomcat-user@jakarta.apache.org'
> > > > Subject: RE: Servlets do not run under Apache-tomcat
> > > >
> > > >
> > > > Thanks Filip!!
> > > >
> > > > I have the followinfg entry in my tomcat.conf file.
> > > >
> > > > Alias /examples /myroot/jakarta-tomcat/webapps/examples
> > > > <Directory "/myroot/jakarta-tomcat/webapps/examples>
> > > >   Options Indexes FollowSymLinks
> > > > </Directory>
> > > >
> > > > ApJServMount /examples/servlet /examples
> > > > <Location /examples/WEB-INF/ >
> > > >    AllowOverride None
> > > >    deny  from all
> > > > </Location>
> > > >
> > > > the same is repeated for other contexts. And this file has been
> > > > included in
> > > > Apache httpd.conf file.
> > > >
> > > > Please let me know where I am going wrong or what do I need to do.
> > > >
> > > > Regards
> > > >
> > > > Animesh
> > > >
> > > > -----Original Message-----
> > > > From: Filip Hanik [mailto:mail@filip.net]
> > > > Sent: Thursday, March 29, 2001 11:40 AM
> > > > To: tomcat-user@jakarta.apache.org
> > > > Subject: RE: Servlets do not run under Apache-tomcat
> > > >
> > > >
> > > > I would recommend switching to mod_jk
> > > > but from your problem, it does't look like you have set up
> the context
> > > > mapping of the /servlet context to go through mod_jserv.
> > > >
> > > > Filip
> > > >
> > > > ~
> > > > Namaste - I bow to the divine in you
> > > > ~
> > > > Filip Hanik
> > > > Software Architect
> > > > filip@filip.net
> > > > www.filip.net
> > > >
> > > > > -----Original Message-----
> > > > > From: Animesh Chaturvedi - US
[mailto:animeshc@allegronetworks.com]
> > > > Sent: Thursday, March 29, 2001 9:35 AM
> > > > To: 'tomcat-user@jakarta.apache.org'
> > > > Subject: Servlets do not run under Apache-tomcat
> > > >
> > > >
> > > >
> > > > Hi
> > > >
> > > > I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
> > > > using mod_jserv
> > > > as connector. and using SSL.
> > > >
> > > > The jsp are working perfectly, but servlets do not run at all.
> > > > You get HTTP
> > > > 404 document not found error.  I have tried every possible
> > way, but none
> > > > works.
> > > >
> > > > for e.g if I reference a servlet HelloWorldExample in the context of
> > > > examples
> > > >
> > > > through https://server-name/examples/servlet/HelloWorldExample
> > > >
> > > > i get HTTP 404 page not found
> > > >
> > > > and in apache error_log I see:
> > > >
> > > > File does not exist:
> > > > /myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample
> > > >
> > > > However if I refernce a servlet through jsp (i forward the
> > request to a
> > > > servlet) it gets resolved.
> > > >
> > > > I will really appreciate if someone can point me how to correct this
> > > > behaviour.
> > > >
> > > > All my web.xml and server.xml files are as they should be.
> > > >
> > > >
> > > >
> > > > thanks
> > > >
> > > > Animesh
> > > >
> > >
> >
>



Mime
View raw message