RE: Apache-Tomcat-Struts > 404 Not Found

2003-08-20 Thread James Harman
Don't the JkMount lines need to be inside the
VirtualHost tags?


--- Johan Wasserman - CPX Mngd Services
<[EMAIL PROTECTED]> wrote:
> Nope, that didn't solve the problem.  But let it be
> known that I'm not
> realy a guru when it comes to configuring this lot.
> 
> Heres some extracts:
> httpd.conf-
> 
> ServerAdmin [EMAIL PROTECTED]
> ServerName localhost
> ErrorLog logs/local-error.log
> CustomLog logs/local-access.log common
> 
> 
> ServerAdmin [EMAIL PROTECTED]
> DocumentRoot "C:\Apache\Tomcat
> 5.0\webapps\itdiv"
> ServerName www.itdiv.com
> ErrorLog logs/www.itdiv.com-error.log
> CustomLog logs/www.itdiv.com-access.log common
> 
> 
> ### Tomcat 5 Connector 
> include "C:/Apache/Tomcat 5.0/conf/mod_jk.conf"
> 
> mod_jk.conf-
> #
> JkMount /* ajp13
> JkMount /*.do ajp13
> JkMount /*.jsp ajp13
> JkMount /servlet/* ajp13
> 
> 
> http://localhost/struts-example/logon.do  -   results
> in a 404.
> http://localhost:8080/struts-example/logon.do -
> works!
> 
> http://www.itdiv.com/logon.do -   results in a
> 404.
> http://www.itdiv.com:8080/logon.do-   works!
> 
> Regards, and thanks.
> Johan.
> 
> -Original Message-
> From: Johan Wasserman - CPX Mngd Services 
> Sent: Wednesday, August 20, 2003 7:42 AM
> To: Tomcat Users List
> Subject: RE: Apache-Tomcat-Struts > 404 Not Found
> 
> 
> Thanks John, no I didn't.  But I did have JkMount /*
> ajp13, wouldn't
> that do it?
> 
> I'll try specifying it the way you suggest.
> 
> Thanks again.
> Johan.
> 
> -Original Message-
> From: John Turner
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 19, 2003 10:30 PM
> To: Tomcat Users List
> Subject: Re: Apache-Tomcat-Struts > 404 Not Found
> 
> 
> 
> Tomcat 4 and Tomcat 5 configuration with mod_jk are
> the same.
> 
> Do you have something like this in your httpd.conf
> file?
> 
> JkMount /*.do ajp13
> 
> John
> 
> Johan Wasserman - CPX Mngd Services wrote:
> 
> > Hi,
> > 
> > I got Tomcat and Apache configured according to
> documentation (still
> > referencing TC4x) I found on the web.  It seemed
> to work fine but 
> > while testing struts I found that the actions
> (*do) resulted in a 404 
> > Not found.  When I test via Tomcat only
> (localhost:8080) it works 
> > fine.
> > 
> > I have probably only been looking in the wrong
> places but cannot seem
> > to find documentation or a download area for
> mod_jk to do a config on 
> > the following versions: Tomcat v.  5.0.3
> > Apache v. 2.0.46
> > 
> > So, my curent versions are configured using Tomcat
> v 4x documentation
> > (and mod_jk).
> > 
> > Have anyone done this successfully on the newer
> versions, and where
> > can I download the required bin's and doc's?
> > 
> > Thanks!
> > Johan.
> > 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=
Choose the Sprite when the Coke is placed before you...

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Installing Tomcat as a Service

2003-08-20 Thread James Harman
Stuart,

You basically need to write a wrapper .sh script to
tart tomcat and put it into the init.d directory. The
init.d directory varies with the linux distro but
common places a /etc/init.d and /etc/rc.d/init.d. 
Then you need to create sym links to start/stop it on
the various run levels.  I refer you to your
documention on services under RedHat.

I believe that somebody mentioned that there is a
catalin.sh script that works as a service, so you may
not need to write one.

In most of the RedHat distros that I have used, there
is a script in the init.d directory named httpd that
takes care of stopping and starting apache as a
service.

I would look at the other scripts in init.d for
information on how to write one.

James

--- Stuart Stephen <[EMAIL PROTECTED]> wrote:
> I already have done the hard work of intergrating
> apache and tomcat together
> in the desired way. I now need to install the
> services. Going to the RPM is
> a backward step for me now. Ideally i'd like to
> understand how the services
> are installed under the linux os now.
> 
> I'll still have to research it to get the Java
> applications started as
> services.
> 
> -Original Message-
> From: Manolo Ramirez T.
> [mailto:[EMAIL PROTECTED]
> Sent: 20 August 2003 15:02
> To: Tomcat Users List
> Subject: Re: Installing Tomcat as a Service
> 
> 
> Hi,
> 
> Check this:
> 
> http://www.jpackage.org
> 
> They have the rpm version of tomcat, that will make
> all the hard work
> for you.
> 
> Regards.
> 
> 
> Manolo Ramirez T.
> 
> Stuart Stephen wrote:
> > Hi all,
> >
> > How might I go about installing Tomcat as a
> service in RedHat 9.0. I've
> > never installed a service under linux manually
> before and I'm not sure
> what
> > to do. I can't find the appropriate documentation
> in the manuals for
> either
> > Tomcat or RedHat. I must be looking in the wrong
> places :O(
> >
> > UNRELATED: Also, If I wanted to install a java
> program as a service, how
> > might I do this? Is this a similar process?
> >
> > Regards,
> > Stuart
> >
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=
Choose the Sprite when the Coke is placed before you...

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mysql connection pooling problem

2003-08-23 Thread James Harman
Eugene,

I noticed that in the web.xml you have the jbdc resource in a 
resource-ref.  In my stuff I have it as a context-param like this


   
 javax.servlet.jsp.jstl.sql.dataSource
   
   
   jdbc/testdev
   
 
This comes right after the  element in the web.xml file. 

I am not experienced enough to know the difference between context-param 
and resource-ref, but this seems to work for me.

James

Eugene Lee wrote:

I'm having a really odd problem connecting to a local MySQL server.  If
I use java.sql.DriverManager.getConnection(), it works perfectly fine.
But when I try to use a connection pool:
	http://www.mysql.com/articles/connection_pooling_with_connectorj.html

it errors out:

	java.sql.SQLException: Cannot load JDBC driver class 'null'

I've tried moving the MySQL driver to $CATALINA_HOME/common/lib,
$JAVA_HOME/jre/lib/ext, and even my webapp's WEB-INF/lib.  The results
are still the same.
I've followed the often-recommended Tomcat 4.1 documentation to no avail.
Here's what my box is running:
	FreeBSD 4.8-RELEASE-p3   
	Java 2 SDK 1.3.1_09
	Jakarta-Tomcat 4.1.27
	MySQL Connector/J 3.0.8

I've attached my server.xml, my webapp's web.xml, and a test page
test.jsp to demonstrate the error.  BTW, before it throws the exception
on the getconnection(), the page output is:
con1 works!
DS lookup OK!
I appreciate any suggestions.  Much thanks in advance.

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: mysql connection pooling problem

2003-08-23 Thread James Harman
Another thing you might look at is your jsp code.  You have

DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/testdev");

you probably want

DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/testdev");

notice that there is no / before comp.

James

Eugene Lee wrote:

On Sat, Aug 23, 2003 at 08:59:05AM -0600, James Harman wrote:
: 
: Eugene,
: 
: I noticed that in the web.xml you have the jbdc resource in a 
: resource-ref.  In my stuff I have it as a context-param like this
: 
: 
:
:  javax.servlet.jsp.jstl.sql.dataSource
:
:
:jdbc/testdev
:
:  
: 
: This comes right after the  element in the web.xml file. 
: 
: I am not experienced enough to know the difference between context-param 
: and resource-ref, but this seems to work for me.

I'm using  because that's what the Tomcat docs say.  :-)

	http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#MySQL%20DBCP%20Example

I'll try it out later today and report back with the results.

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Issues help needed

2003-08-29 Thread James Harman


Puneet Sachar wrote:

hi friends

Oracle9ias server have apache as http server

We are facing lotz problem in building our application

 

Puneet,

If you are facing so many problems because of the platform you are 
developing on, why don't you swith to something else?  There are many 
choices.  Tomcat is a fine choice - or if you desire a "commercial" 
product so that you can make management happy because they have someone 
to shell out money too try Weblogic. 

James



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat and MsSQL

2003-08-30 Thread James Harman
Frank,

What linux user are you using to run tomcat and what user was websphere 
running under?  I am wondering if there are some weird firewalling 
issues here that allow websphere to open the socket but not tomcat.  It 
seems like a networking issue...

Of course, this might be totally the wrong direction too.

Is this the same jsp under tomcat and websphere?

James

Frank von Daak wrote:

Hi,

maybe, someone of you can help me... 

I try to port a webapplication from asp to java... 

First, I have used Websphere for this and everything worked ok, but then I 
decided to use tomcat4 (both under debian-linux)

My problem is the connection to a MSSQL-Database.

As JDBC-Driver I'm using the  "Microsoft SQL Server 2000 Driver for JDBC", 
which has an official linux-support. And I cn say, that it is working very 
well with websphere...

When I use the same jsp-files under tomcat, I get the following error, when 
trying to connect the sql-server:

[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

I have copied the 3 files "msbase.jar", "mssqlserver.jar" and "msutil.jar" to 
$CATALINA_HOME/common/lib and it seems, that tomcat can find them (as the 
error message says)

Here is the code, that I use to connect to the database:

--

<%@ page language="java" import="javax.sql.DataSource,java.sql.*"%>
<%
Connection db_con;
Statement db;
try {
 Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
} catch (ClassNotFoundException e) {
 out.println("Der Datenbanktreiber konnte nicht gefunden werden:" + e + 
e.getMessage() + "" );
}

String con = "jdbc:microsoft:sqlserver://192.168.0.199:1433;User=sa;
Password=bla;DatabaseName=testdb";
try {
 db_con = DriverManager.getConnection (con);
} catch ( SQLException se ) {
 out.println("Exception...(" + se.getMessage() + ")-->");
}
%>
--

What do I have to do, to get it working with tomcat ? 

Thank you very much for your help !!! 

Greetings, 
Frank

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Deployment problems in tomcat 4.1.27 : jdbc and properties files

2003-09-05 Thread James Harman
Shailesh,

Is it classes12.jar or classes12.zip?  Your first post said zip.  If it 
is zip make sure you rename it to jar.  If you rename it to 
classes12.jar and put it in WEB-INF\lib it will be picked up.

James

Shailesh Modi wrote:

Hi,
 I have kept classes12.jar in every possible places in tomcat 4
directory(C:\jakarta-tomcat-4.1.27\common\lib or
C:\jakarta-tomcat-4.1.27\server\lib), but no help.
Also keeping properties files into my web-app's WEB-INF/classes directory
too not able to help me out.
Alternatively, I have tried giving relative path (eg
"/WEB-INF/properties/framework.properties) , still my Loader
class is not able to locate the framework properties file.
InputStream myStream =
ClassLoader.getSystemResourceAsStream("framework.properties");
or
InputStream myStream =
ClassLoader.getSystemResourceAsStream("/WEB-INF/properties/framework.propert
ies");
both are not working.
One more thing, in tomcat 3 , I had modified server.xml by placing
following code for authentication.
ldap://ldap.mycompany.com:389";
   baseDn="ou=active,ou=employees,ou=people,o=mycompany.com"
   maxDnAge="300"
   maxPwAge="6000"
   maxFilterAge="6000"
   />
where as 'com.remind.securetomcat.SecRealm' is my class to authenticates
user by ldap.
Where should i place this tag in server.xml in tomcat 4.1.27 configuration
to make this work?
Thanks a Lot.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 2:54 PM
To: Tomcat Users List
Subject: RE: deployment problems in tomcat 4.1.27
It is sayed that property file should be in your classpath!

So I allways put my property file under WEB-INF/classes/
directory which seems to be fine. I am using Struts, but I guess the
Struts uses the same
mechanism to access properties!
As I understand your oracle12.zip is needed to startup tomcat server in
this case it should
be under %CATALINA_HOME%/server/lib directory. And I suggest to transfert
it into .jar file!
Atleast I am using mysql connector (it is in jar file) and I allways have
to put it under %CATALINA_HOME%/server/lib
directory to make my JDBC realm work!
If your .jar file is needed only for your own application then WEB-INF/lib
should do!
Also there is %CATALINA_HOME%/common/ directory which has /lib directory
where you can put different
stuff. This stuff will be visible to all your web applications! For
example appache suggeests to put different jars from their common
project.
___
Living things are systems that tend to respond to changes in their
environment,
and inside themselves, in such a way as to promote their own continuation.
Janis Olekss
Exigen Latvia System Analyst
(Office) +371 7072900
(Cell) +371 9136267


"Shailesh Modi" <[EMAIL PROTECTED]>
09/04/2003 12:20
Please respond to "Tomcat Users List"
   To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
   cc:
   Subject:RE: deployment problems in tomcat 4.1.27
Thanks Janis, it was great help.
I am having another problem regarding classpath of tomcat.
My application property files and oracle classes (classes12.zip) are not
being picked up, when tomcat deploys my web app. my properties files are
in
/WEB-INF/properties folder and classes12.zip is in /WEB-INF/lib folder.
I have tried putting classes12.zip in Tomcat's %CATALINA_HOME%/common/lib
and my properties files in /WEB-INF/lib directory, but no help.
At application startup , I am loading my properties file as
InputStream myStream =
ClassLoader.getSystemResourceAsStream("framework.properties");
But myStream is getting null. This code was working fine in tomcat 3 (as
we
used to specify classpath to tomcat startup for properties files, jars and
other shared libs) but not working in tomcat 4.1.27 .
Thanks a lot.

Shailesh



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:39 PM
To: Tomcat Users List
Subject: Re: deployment problems in tomcat 4.1.27
You have to configure server.xml file

There are 2 things

1)  which defines your docBase
2)  which defines different contexts
See apache.org for the tag specifications
___
Living things are systems that tend to respond to changes in their
environment,
and inside themselves, in such a way as to promote their own continuation.
Janis Olekss
Exigen Latvia System Analyst
(Office) +371 7072900
(Cell) +371 9136267


"Shailesh Modi" <[EMAIL PROTECTED]>
09/04/2003 10:12
Please respond to "Tomcat Users List"
   To: <[EMAIL PROTECTED]>
   cc:
   Subject:deployment problems in tomcat 4.1.27
Hi,
 I am trying to deploy my web application in tomcat 4.1.27, earlier
tomcat
3 was successfully running my web-app.
1. basic problem - I want to set my web-app context as "/remind/cafe/"
(e.g. http://server:port/remind/cafe/index.do) but tomcat 4.1.27 asks me to
put my web-app war file into webapps 

Re: I still don't understand the need for the connection between Apache and Tomcat

2003-09-07 Thread James Harman


Yann Cébron wrote:

   I still don't understand why is there a need for a connection between
Apache and Tomcat since Tomcat can work on its own.
   

Maybe this sheds some light on a few motivations

http://jakarta.apache.org/tomcat/faq/connectors.html#integrate

HTH,

   Yann

 

Yann,

Thanks for that link.  It has really good guidelines for both deployments.

James



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Memory Leak with static content

2003-09-12 Thread James Harman
Seth,

As you mentioned taht the jsp page is not the problem I hope that you 
have looked to make sure that you are closing off any input/ouput 
streams and other resources involved in sending the email right?

James

Seth Newton wrote:

-I'm using Tomcat to feed about 6 sites with static content.  I have one jsp page that handles all of our forms, and all that does is capture the  and send it to an email address.  It is the only code I have anywhere.  This jsp page is not causing the memory leak.

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can access tomcat locally but not from another machine

2003-09-16 Thread James Harman
Or it could be that the xp firewall is turned on an not allowing the 
8080 connection externally.

Christopher Williams wrote:

If your company is hot on security, the most likely cause is that port 8080
is blocked (possibly at the router).  Ask your admin guys about freeing it
for internal network access or try running Tomcat on port 80.  Ping doesn't
use TCP so you won't experience the same connectivity problems.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: archive on the web ????

2000-11-09 Thread James Harman

http://mikal.org/interests/java/tomcat/index.html 

(this is the link on the jakarta page)

James


On Thu, 9 Nov 2000, Yin Tse wrote:

> Hi all,
> Is there an archive of this mail discussion somewhere on the web ? Thanks
> all.
> 





Re: Setting JAVA_HOME path on Linux 7.0

2000-11-10 Thread James Harman

Is there something in your .bashrc that sets the JAVA_HOME value?



On Fri, 10 Nov 2000, Lambert, Stephen : CO IR wrote:

> I have Tomcat 3.1 running standalone on a RedHat 6.2 server(yeah).
> 
> However, on a Redhat 7.0 server, I having difficulty setting the path for
> JAVA_HOME after installing JDK1.3
> I can't cd to $JAVA_HOME.
> 
> The .bash_profile is as follows:
> # .bash_profile
> 
> # Get the aliases and functions
> if [ -f ~/.bashrc ]; then
>   . ~/.bashrc
> fi
> 
> # User specific environment and startup programs
> 
> PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin:/usr/local/jdk1.3/bin
> BASH_ENV=$HOME/.bashrc
> USERNAME="root"
> 
> export USERNAME BASH_ENV PATH
> 
> JAVA_HOME=/usr/local/jdk1.3
> export JAVA_HOME
> 
> ---
> 
> Also, when I shutdown the server, it requires /sbin/./shutdown -h now
> 
> The only difference I can tell between the two Linux version is the ENV(6.2)
> vs BASH_ENV(7.0)
> 
> Can someone help?
> Thanks.
> 
> 
> 
> 

James Harman
Requisite Technology
[EMAIL PROTECTED]
--
For Technical Support,
email: [EMAIL PROTECTED]
phone: 303-474-2288