tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Balahura" <rj-ba...@sciborg.uwaterloo.ca>
Subject NEW QUESTION - TOMCAT-APACHE.CONF
Date Thu, 25 May 2000 21:06:21 GMT
Would someone know why when I change tomcat.conf location of my mod_jserv.so
to modules/mod_jserv.so, the tomcat-apache.conf that is generated still
creates the default libexec/mod_jserv.so location?  I thought tomcat.conf
was used to generate this value, I guess I am wrong and I can't find the
config file to change this.  Does anyone know which file this value is
located in?

-----Original Message-----
From: Jacob Kjome [mailto:Jacob.R.Kjome@syntegra.com]
Sent: Thursday, May 25, 2000 1:15 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: servlet invoking II


A couple things:

1. There is no reason to do a servlet-mapping if you are going to map it to
the exact name of the servlet you are trying to invoke.  The reason for
mapping a servlet would be to make sure that people don't go to say...
helloworldexample and get a 404 error because calling the servlet without
the mapping is case sensitive.

so, you might want to do something like this:

<web-app>
   <servlet>
	<servlet-name>HelloExample</servlet-name>
    	<servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>HelloExample</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>
</web-app>

2. in your href, you are calling it like this:  /HelloWorldExample

The problem with that is that it is going to look to the root of the url,
which will be http://localhost/
and then look for the servlet.  However, your servlet will exist here:
http://localhost/libra/

so, you should be calling it like this:  ./HelloWorldExample or just
HelloWorldExample

However, given the my example in the first answer, you would do this:

http://localhost/libra/hello

so, your href would be:  ./hello  or just  hello


BTW, are you running this through Apache web server with the
ApacheModuleJServ connector???  If so then the previous URL's would be
correct for you, but if you are running everything straight through Tomcat,
then it would be:

http://localhost:8080/libra/hello  (not absolutely positive on that one, but
it would make sense)



If this absolutely does not work, try changing the name of the class and
recompile.  Believe it or not, that is all I did in the case of the
Hello.class example.  It simply wouldn't run if I left the class as
Hello.class.  I changed it to HelloB.class and changed only the web.xml file
to reflect the change in class name but touched nothing else.  It worked
fine then.  A bit of a mystery.  It took me a day and a half to figure that
one out.

Let me know if that worked.


Jake


-----Original Message-----
From: Herold, Thomas [mailto:therold@libra.de]
Sent: Thursday, May 25, 2000 11:58 AM
To: tomcat-user@jakarta.apache.org
Subject: servlet invoking II


I'm getting crazy - mad - or I' only stupid.

Trying all the tips doesen't work. So please help.

Directory:
	$TOMCAT_HOME/libra
                                             /WEB_INF
     					web.xml
					index.html
 			                       /classes
                         			HelloWorldExample

web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">

 <web-app>
   <servlet>
	<servlet-name>HelloWorldExample</servlet-name>
    	<servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>HelloWorldExample</servlet-name>
        <url-pattern>/HelloWorldExample</url-pattern>
    </servlet-mapping>
</web-app>

index.html:
<html>
<body>
<a href ="/HelloWorldExample">Hello 2</a>
</body>

</html>

tomcat.conf:
...
ApJservMount /libra /root

What the hell is WRONG ???!!!!!!!!!!!!!!!!!!!

Please help

Thomas

By the way, there is no Jar file.



--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message