Install Tomcat without (most of) the JSDK ?

2004-02-09 Thread Mike Kellstrand

I have seen it implied that Tomcat really only needs tools.jar from
the J-SDK to be able to compile JSP's.

However, if you try to run the Tomcat installer without having
the J-SDK installed, it complains and exits.

I've also found that if you just use the .zip install,
the Tomcat startup script still looks for the J-SDK.

Is it possible somehow to install Tomcat without the J-SDK present
and then drop in tools.jar?

I am looking for the minimum I need to install on a fresh Windows PC
to be able to run Tomcat and my webapps (which have JSP's)
(Not counting pre-compiling the JSP's)

Thanks,

Mike Kellstrand


Silent install of Tomcat on Windows?

2004-01-07 Thread Mike Kellstrand
I've poked around a bit, but could find any info on this ...

The standard Tomcat installer for Windows asks a number of
questions during the install.  Are there command-line parameters or
any other way to invoke the process from a batch file with all the
required settings (like install dir, and to install as a service) 
so it could be an unattended install?

The purpose is that I would like to bundle up Tomcat, Java, my webapps,
and some other things into a nice installer.

I can certainly just invoke the Tomcat installer from the main installer,  
but it would be nice for the user not to have to answer install questions
that could be pre-configured.

Thanks,  Mike


Re: Silent install of Tomcat on Windows?

2004-01-07 Thread Mike Kellstrand
 Mike Kellstrand schrieb:
   Are there command-line parameters or
  any other way to invoke the process from a batch file with all the
  required settings (like install dir, and to install as a service)
  so it could be an unattended install?
 

 Why don't you just use the zip archive and unpack it silently into the
desired
 target directory?

 Thomas

OK, that takes care of getting the files where I want them.
Cool.

How about the window that pops up with a list of options
that you can check or uncheck?  Most interesting to me is
the Install as a service option.  Is there a command I can
run from the command prompt to install it as a service after
I unzip the files into a dir?

Thanks,  Mike


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



Re: Need Help getting SSL to work with HttpsURLConnections

2003-12-04 Thread Mike Kellstrand
John,

I found a solution.
Add the line below to force it to use the correct libraries:
System.setProperty(java.protocol.handler.pkgs,javax.net.ssl);

This one falls into the inexplicable category of problems that lots
of people must have dealt with, yet Google shows up almost nothing,
and you never get a reply about it in the mail-group.

cranky this morning,
Mike

- Original Message - 
From: Mike Kellstrand [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 4:40 PM
Subject: Re: Need Help getting SSL to work with HttpsURLConnections


 I just came across a similar problem today.

 I have working code in a Swing app that uses  import javax.net.ssl.*;

 I copied the ssl connection code over to another app
 that happens to be a servlet, and I get the ClassCastException as seen
 below,
 at the line of code:
 connection = (HttpsURLConnection) url.openConnection();

 Anybody know what is going on?

 Thanks,  Mike


 - Original Message - 
 From: John Kammer [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, December 03, 2003 4:02 PM
 Subject: Re: Need Help getting SSL to work with HttpsURLConnections


  An update and a correction...
 
  I was able to get the HttpsURLConnection to work by replacing:
 
 import javax.net.ssl.*;
 
  with:
 
 import com.sun.net.ssl.*;
 
  Contrary to what I had said below there is an
java.lang.ClassCastException
 being thrown when making the call :
 HttpsURLConnection conn = (HttpsURLConnection)
myurl.openConnection();
 
  Now the compiler warns me that I'm using deprecated code, but it does
 work.
  Still, why would javax.net.ssl.* be having this problem ?
 
  Thanks again!
 
 
  ---
   Forgive me, I'm new at this...
  
   I am using: Java v 1.4.2_02-b03
 : Tomcat v 4.1.29
  
   I'm having trouble getting an HttpsURLConnection to work as expected.
I
 suspect I am missing something (possibly a great many things) and would
 appreciate any insight anyone could provide. I've not been able to find a
 single source that addresses this problem although I've found bits and
 pieces in several places.
  
   I have a simple servlet running in Tomcat that does nothing more than
 report back that it is alive. Posting to it at
 http://myserver:8080/simpleServlet/simpleServlet returns a response of:
  
 simpleServletResponseI am alive!/simpleServletResponse.
  
   Additionally I have a simple client app that calls the servlet with a
 POST. The client can run on either the same machine as the server or a
 different machine.
  
   1. Using an HttpURLConnection in the client app works fine. I can call
 the servlet on either port 8080 (http) or 8443 (https).  This works from
 either machine.
  
   2. If I do nothing other than change the HttpURLConnection to an
 HttpsURLConnection then everything falls apart immediately and I don't
 understand why (I do believe I have the proper imports included and it all
 compiles fine). From everything I can tell I should be able to replace the
 one with the other.
  
   3. Keystores  certificates:  I have generated certificates for both
 machines using keytool and have imported the client machine certificate
into
 the trustedcerts file on the server machine. I have NOT had any of these
 certificates signed by a certificate authority (and due to complexities I
 won't go into here that isn't likely to happen).  Do the certificates need
 to be signed by a CA in order for HttpsURLConnection to work?
  
   4. The result of calling the method url.openConnection() is that
null
 is printed to the screen then program execution simply stops. No Exception
 seems to be thrown - everything just stops. Why?
  
   HttpsURLConnection conn = (HttpsURLConnection) myurl.openConnection();
  
   Ultimately I would like to get Client-Certification working but
haven't
 been able to find a good guide out there for doing so. At the moment I am
 taking small steps in the hope of gaining a better understanding. Any help
 would be greatly appreciated.
  
   Thanks in advance !
   -- John Kammer
  
   -
   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]



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



Re: Need Help getting SSL to work with HttpsURLConnections

2003-12-03 Thread Mike Kellstrand
I just came across a similar problem today.

I have working code in a Swing app that uses  import javax.net.ssl.*;

I copied the ssl connection code over to another app
that happens to be a servlet, and I get the ClassCastException as seen
below,
at the line of code:
connection = (HttpsURLConnection) url.openConnection();

Anybody know what is going on?

Thanks,  Mike


- Original Message - 
From: John Kammer [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 4:02 PM
Subject: Re: Need Help getting SSL to work with HttpsURLConnections


 An update and a correction...

 I was able to get the HttpsURLConnection to work by replacing:

import javax.net.ssl.*;

 with:

import com.sun.net.ssl.*;

 Contrary to what I had said below there is an java.lang.ClassCastException
being thrown when making the call :
HttpsURLConnection conn = (HttpsURLConnection) myurl.openConnection();

 Now the compiler warns me that I'm using deprecated code, but it does
work.
 Still, why would javax.net.ssl.* be having this problem ?

 Thanks again!


 ---
  Forgive me, I'm new at this...
 
  I am using: Java v 1.4.2_02-b03
: Tomcat v 4.1.29
 
  I'm having trouble getting an HttpsURLConnection to work as expected. I
suspect I am missing something (possibly a great many things) and would
appreciate any insight anyone could provide. I've not been able to find a
single source that addresses this problem although I've found bits and
pieces in several places.
 
  I have a simple servlet running in Tomcat that does nothing more than
report back that it is alive. Posting to it at
http://myserver:8080/simpleServlet/simpleServlet returns a response of:
 
simpleServletResponseI am alive!/simpleServletResponse.
 
  Additionally I have a simple client app that calls the servlet with a
POST. The client can run on either the same machine as the server or a
different machine.
 
  1. Using an HttpURLConnection in the client app works fine. I can call
the servlet on either port 8080 (http) or 8443 (https).  This works from
either machine.
 
  2. If I do nothing other than change the HttpURLConnection to an
HttpsURLConnection then everything falls apart immediately and I don't
understand why (I do believe I have the proper imports included and it all
compiles fine). From everything I can tell I should be able to replace the
one with the other.
 
  3. Keystores  certificates:  I have generated certificates for both
machines using keytool and have imported the client machine certificate into
the trustedcerts file on the server machine. I have NOT had any of these
certificates signed by a certificate authority (and due to complexities I
won't go into here that isn't likely to happen).  Do the certificates need
to be signed by a CA in order for HttpsURLConnection to work?
 
  4. The result of calling the method url.openConnection() is that null
is printed to the screen then program execution simply stops. No Exception
seems to be thrown - everything just stops. Why?
 
  HttpsURLConnection conn = (HttpsURLConnection) myurl.openConnection();
 
  Ultimately I would like to get Client-Certification working but haven't
been able to find a good guide out there for doing so. At the moment I am
taking small steps in the hope of gaining a better understanding. Any help
would be greatly appreciated.
 
  Thanks in advance !
  -- John Kammer
 
  -
  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]



How can I authenticate client apps to a servlet

2003-11-13 Thread Mike Kellstrand
Hi,

I have a client-server application where the server is a Java servlet running
in Tomcat and the clients are Java applications.  I now want to secure the data
transfer and authenticate the clients that connect to the server.

I have set up Tomcat for SSL and created a self-signed certificate.  
I then modified the client code to use an https connection.

The client can look at the certificate, but what would I have it check to
verify it is authentic?

My main question though, what would be the best way to have each client authenticate
itself to the servlet?  Should I hand out certificates of some sort to each client?
If so, how do you create, send, and verify them in Java code?
Or should I just use a user/password authentication and check it either
at Tomcat or the servlet?

Thanks a bunch,

Mike Kellstrand


Unusual config for: SSL - Apache - JK2 - Tomcat

2003-11-13 Thread Mike Kellstrand
Is it possible to have Apache receive HTTPS requests and
then use JK2 to forward them on to a Tomcat that deals with the SSL/certificates
and services the requests?

I want Apache  JK2 to be simply a conduit and not try to deal with the SSL.

Tomcat will have the certificate, not Apache.

This Apache will serve some static content, but when it gets requests
for certain contexts (which will require https), I want Apache just to  pipe
the packets off to a Tomcat at an undisclosed location and not try to authenticate.

I know this is unusual, but I have a good reason.

Can it be done?

Thanks,

Mike Kellstrand


How do I config Tomcat to only service requests from localhost?

2003-09-25 Thread Mike Kellstrand
I'm sure the answer is quite simple, but I haven't been able to
find it online yet.

I've got Tomcat running on a PC, and I want it to only service
requests coming from the same PC (i.e. localhost).
If a request come in from the LAN, I want to ignore it.

I found references to the inet attribute to the Connector element,
but it doesn't work for me.

Thanks,  Mike


Re: How do I config Tomcat to only service requests from localhost?

2003-09-25 Thread Mike Kellstrand
Cool!  That did it.

Thanks,  Mike

- Original Message - 
From: Yann C?bron [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 12:58 PM
Subject: Re: How do I config Tomcat to only service requests from localhost?


 Try Remote Address/Host Filter:

 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html

 Cheers,
 Yann


 ***
 I'm sure the answer is quite simple, but I haven't been able to
 find it online yet.

 I've got Tomcat running on a PC, and I want it to only service
 requests coming from the same PC (i.e. localhost).
 If a request come in from the LAN, I want to ignore it.

 I found references to the inet attribute to the Connector element,
 but it doesn't work for me.

 Thanks,  Mike




 -
 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: How do I config EMBEDDED Tomcat to only service requests from localhost?

2003-09-25 Thread Mike Kellstrand
OK, adding a Valve to server.xml worked great for a standalone Tomcat.

Now Part II, how do I do this with an embedded Tomcat?
I get the impression that embedded doesn't use a server.xml file.
Is there a way to make it read a partial one with the element I need,
or another way to set up this valve?

Thanks,  Mike

- Original Message - 
From: Yann C?bron [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 12:58 PM
Subject: Re: How do I config Tomcat to only service requests from localhost?


 Try Remote Address/Host Filter:

 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/valve.html

 Cheers,
 Yann


 ***
 I'm sure the answer is quite simple, but I haven't been able to
 find it online yet.

 I've got Tomcat running on a PC, and I want it to only service
 requests coming from the same PC (i.e. localhost).
 If a request come in from the LAN, I want to ignore it.

 I found references to the inet attribute to the Connector element,
 but it doesn't work for me.

 Thanks,  Mike




 -
 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]



FOP code runs standalone, but not in a Servlet

2003-09-12 Thread Mike Kellstrand
I have Java FOP (XSLT-FO PDF converter) code that runs great from the 
command line if I put the fop, batik, avalon, and xalan jars 
in the JAVA_HOME\jre\lib\ext dir.

If I put this code in a servlet under Tomcat 4.1.24, I get transform errors.

I have tried putting the FOP jars in various Tomcat lib dirs,
in webapps with the servlet, etc.  Everywhere I move these jars
I get different amusing transform exceptions, but it doesn't run.

1)  Where do the jars need to go?
2)  Are there any parser jars that come with Tomcat that need to get removed.
I tried removing the 2 jars that are in /common/endorsed, but that didn't help.

This is driving me nuts!

Many thanks!

Mike


Re: FOP code runs standalone, but not in a Servlet

2003-09-12 Thread Mike Kellstrand
Thanks for the response.
I put my Tomcat back into a stock state and
copied the fop, batik, avalon, and xalan jars from the FOP package
into my WEB-INF/lib dir.

I restarted Tomcat and got the following when my code ran:
The output format must have a '{http://xml.apache.org/xslt}content-handler'
property!

This java code / xslt combination DOES work outside of Tomcat.

What do you think?

Thanks,  Mike


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 12, 2003 11:33 AM
Subject: RE: FOP code runs standalone, but not in a Servlet



 Howdy,
 You want to put all your jars in WEB-INF/lib.  What are the errors
 you're getting?

 Yoav Shapira
 Millennium ChemInformatics


 -Original Message-
 From: Mike Kellstrand [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 12, 2003 11:27 AM
 To: [EMAIL PROTECTED]
 Subject: FOP code runs standalone, but not in a Servlet
 
 I have Java FOP (XSLT-FO PDF converter) code that runs great from the
 command line if I put the fop, batik, avalon, and xalan jars
 in the JAVA_HOME\jre\lib\ext dir.
 
 If I put this code in a servlet under Tomcat 4.1.24, I get transform
 errors.
 
 I have tried putting the FOP jars in various Tomcat lib dirs,
 in webapps with the servlet, etc.  Everywhere I move these jars
 I get different amusing transform exceptions, but it doesn't run.
 
 1)  Where do the jars need to go?
 2)  Are there any parser jars that come with Tomcat that need to get
 removed.
 I tried removing the 2 jars that are in /common/endorsed, but that
 didn't
 help.
 
 This is driving me nuts!
 
 Many thanks!
 
 Mike



 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


 -
 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: FOP code runs standalone, but not in a Servlet

2003-09-12 Thread Mike Kellstrand
I tried putting the xalan jar in the endorsed dir and got the following
error:
null:4:80 fo:flow must contain block-level children

I ran into this one before.

There is a section in my xslt file as follows:
fo:flow flow-name=xsl-region-body
  xsl:apply-templates select=coverpage/
/fo:flow

If I add a fo:block snippet between the fo:flow tags,
the transform runs with no errors, but it never calls
the xsl:apply-templates tag to call in the real document contents.

This seems like a good clue, that whatever parser it is really calling
doesn't understand xsl: tags.

Help!!   :)

Mike


- Original Message -
From: Jacob Kjome [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 12, 2003 11:47 AM
Subject: RE: FOP code runs standalone, but not in a Servlet


 At 11:33 AM 9/12/2003 -0400, you wrote:

 Howdy,
 You want to put all your jars in WEB-INF/lib.  What are the errors
 you're getting?

 hmm Xalan is an endorsed library.  It needs to be in
 CATALINA_HOME/common/endorsed or JAVA_HOME/jre/lib/endorsed, otherwise the
 old buggy version of Xalan that comes with j2sdk1.4.x will be used.

 Jake

 Yoav Shapira
 Millennium ChemInformatics
 
 
  -Original Message-
  From: Mike Kellstrand [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 12, 2003 11:27 AM
  To: [EMAIL PROTECTED]
  Subject: FOP code runs standalone, but not in a Servlet
  
  I have Java FOP (XSLT-FO PDF converter) code that runs great from the
  command line if I put the fop, batik, avalon, and xalan jars
  in the JAVA_HOME\jre\lib\ext dir.
  
  If I put this code in a servlet under Tomcat 4.1.24, I get transform
  errors.
  
  I have tried putting the FOP jars in various Tomcat lib dirs,
  in webapps with the servlet, etc.  Everywhere I move these jars
  I get different amusing transform exceptions, but it doesn't run.
  
  1)  Where do the jars need to go?
  2)  Are there any parser jars that come with Tomcat that need to get
  removed.
  I tried removing the 2 jars that are in /common/endorsed, but that
 didn't
  help.
  
  This is driving me nuts!
  
  Many thanks!
  
  Mike
 
 
 
 This e-mail, including any attachments, is a confidential business
 communication, and may contain information that is confidential,
 proprietary and/or privileged.  This e-mail is intended only for the
 individual(s) to whom it is addressed, and may not be saved, copied,
 printed, disclosed or used by anyone else.  If you are not the(an)
 intended recipient, please immediately delete this e-mail from your
 computer system and notify the sender.  Thank you.
 
 
 -
 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]