Re: Running Tomcat as an NT Service Problem....

2001-01-10 Thread John Ellis

Corey,

There is a bug in the JDK 1.3 that causes this.  Your options are:  use
JDK1.2.2, wait for JDK1.3.1, or use an NT service that runs your code through
JNI calls like jsrvany or javaserv.

John

[EMAIL PROTECTED] wrote:

 Dear users,

 I have installed tomcat and I am running it as an NT service and I am
 running it with IIS. Everything is working fine. I set the Jakarta service
 to run as the system(default) but when i log off the box the service stops
 running. I don't know why the service would stop when I log off the box? I
 intalled the service when I was logged in as administrator. Has anybody
 runn accross this happening to them before? Please help me out, I would
 really appreciate it.

 Thanks for your time,

 Corey Drew.
 [EMAIL PROTECTED]

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


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




Re: Apache 1_3_14 and tomcat 3.2.1

2001-01-07 Thread John Ellis

Pete,

A really easy way to get SSL going with Apache on Windows is to install
OpenSA:
http://www.opensa.org/
 It is one installation that is already set up with fake certificates.
Once it is installed, detailed instructions for creating your own cert
or getting a signed one from a trused CA (like verisign) are at the
modssl site in their FAQ:
http://www.modssl.org/docs/2.6/ssl_faq.html#ToC27

As for the other thing, I am getting that message too.  I have not yet
had any problems, but I would be interested to hear about a solution.

thanks,

John

Pete Ehli wrote:

 Hello group - I am trying to configure apache 1_3_14 and tomcat 3.2.1
 to use SSL with mod_jk on win NT4.0. I installed the apache webserver
 that supports modSSL. I first start tomcat and then apache. I get a
 warning from apache that I am a little concerned about which says
 "Loaded DSO modules/mod_jk.dll uses plain Apache 1.3 API, this module
 might crash under EAPI (please recompile it with -DEAPI)" - I am
 almost there as far as SSL I believe - when I uncomment out the ssl
 module in htttp.conf Apache says it needs a certificate for my weapp -
 I need to read up on this or maybe someone can point out the steps
 needed - I am only using one machine as localhost for testing. Ohh by
 the way the name of the zip file I downloaded for the apache webserver
 is:  Apache_1.3.14-mod_ssl_2.7.2-openssl_0.96-WIN32 - How would I
 recompile mod_jk.dll with -DEAPI  what I would really like is if
 someone has this recompiled module, that would please send it to me.
 You can email me direct. If monetary funds are required let me know.--
 Pete --[EMAIL PROTECTED]


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




Re: Tomcat as NT service

2001-01-03 Thread John Ellis

Damiano,

This has been discussed.  It is a bug in the 1.3 JVM.  You can get
around it by using an NT service that use JNI like jsrvany at

http://jsrvany.sourceforge.net/

or by running 1.2.2 or by waiting until Sun fixes the bug in 1.3.1

John

Damiano Pezzotti wrote:

 Hi,I installed Tomcat 3.2 with Apache 1.3.9 using mod_jk on a NT4
 system. It works fine, but I have a problem.I installed Tomcat as NT
 Service with jk_nt_service.exe and it works.But if I log out from the
 system, Tomcat crash, while Apache obviously runs. Is it
 normal??Anybody can help me??  Pezzotti Damiano E-Mail:
 [EMAIL PROTECTED]
 Telefono : 0333-21.16.258
 ICQ#  : 50101745 Alambitco
 Laboratorio di design e sviluppo web based
 Web  : www.alambitco.com
 Fax   : 02-700.432.209


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




Re: hello and database connection

2000-11-22 Thread John Ellis

Carlos,

Try
http://www.codestudio.com
They have a product called PoolMan which you use with your regular SQL
Server driver to help manage pools.

For an MS SQL driver, take a look at the sun driver database:
http://industry.java.sun.com/products/jdbc/drivers

With poolman, you will not need a driver with connection pooling support.

Hope that helps,

John

Carlos wrote:

 Hello this is my first message to this list.
 My name is Carlos.
 Excuse me if my english is bad but i dont speak english

 How is the form to make from my tomcat a connection pool to a database.
 My database is in another pc with win and sql server (microsoft) ant my
 tomcat is in linux.
 Anybody can say me how to make a connection pool to this database?
 thanks
 Carlos




Re: Multipart form handling help

2000-11-22 Thread John Ellis

Shanx,

I wrote a little class to help me handle that stuff.  It allows you to iterate
through the files (it can handle multiple file in a form) and read their output
streams, then it gives you a hastable of the other parameters on the form.  Give
it a try and let me know what you think.

John


Shanx wrote:

 Can someone give me a sample of how to handle image uploads?

 Here is a detailed description of the problem I am facing. I have a FORM
 with a "input type=file" tag, and when someone submits this form, I read all
 the bytes from the inputStream, convert it into CHAR and display it.
 However, this works ONLY if there is ONLY an image upload field in the form.
 If I add a "input type=text" tag in the form, then this doesnt work and the
 bytes of the image are displayed as junk text.

 I guess this is because of the "content type"..in case of the form which has
 only the FILE input element, the content type doesnt matter. However, if the
 TEXT imput element is added, the content type changes to TEXT/HTML and hence
 the bytes from the uploaded image are displayed as junk.

 I also tried doing an "IMG SRC" of the image bytes in the submitted page.
 But this doesnt work as well!

 I have been investigating the MultiPartRequest.java class, but I cant seem
 to figure out how to preview the uploaded image in a browser -- (write these
 bytes to the browser). There is a patchy solution that I am thinking of
 right now, which basically saves the images to the server in a temp drive
 and then displays it. But comeon, Java should be more powerful than that!

 I'd appreciate any ideas/code samples. Thanks!

 /Shanx

 MultiPartForm.java


Re: form data to ejb

2000-11-16 Thread John Ellis

We typically use custom tags or servlets.  It is generally considered a
bad practice to use "Entity" beans from a client.  It is suggested to
use a session bean to fron the entity beans, then use regular javabeans
to transport data back and forth.  So, I would suggest you use a regular
bean to set and get properties, then a custom tag or servlet to send or
retrieve that to/from the server.

A complete and well-formed example is available at
http://www.javasoft.com/j2ee/download.html
This is the java pet store example and has several design patterns and
lots of code for J2EE applications.

Alexander ten Bruggencate wrote:

 Can someone tell me what the preferred way is to get form data to an
 ENTERPRISE javabean?
 as jsp:get- setProperty .../ only work on a regular javabeans

 regards,
 -Alexander.




Re: EJB

2000-11-15 Thread John Ellis

Actually, Peter is not using JOnAS, he is using Oracle.  Somewhere in the Oracle
documentation, it should say what type of environment you need to pass into the
new InitialContext() call or have in your jndi.properties file.

Typically, the parameters you will need are:

java.naming.factory.initial=some oracle class that extends
javax.naming.spi.InitialContextFactory
java.naming.provider.url=some url specific to Oracle
java.naming.security.principal=user_id
java.naming.security.credentials=password

These can be in a properties file called jndi.properties in your classpath, or you
can programatically set them into a Hashtable and pass the hashtable into your
InitialContext constructor.

Simon,

What I did to get the parameters was to put them in my web.xml file like:

context-param
  param-namejava.naming.factory.initial/param-name

param-valuecom.inetbasics.server.naming.provider.rmi.RMIContextFactory/param-value

  descriptionblah/description
/context-param

context-param
  param-namejava.naming.provider.url/param-name
  param-valuermi://localhost:900/Storesmith/param-value
  descriptionblah/description
/context-param

I then read them and pass them to InitialContext:

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,
   servletContext.getInitParameter(Context.INITIAL_CONTEXT_FACTORY));
env.put(Context.PROVIDER_URL,
   servletContext.getInitParameter(Context.PROVIDER_URL));

if (userName != null)
{
   env.put(Context.SECURITY_PRINCIPAL, userName);
   if (password == null)
  password = "";
   env.put(Context.SECURITY_CREDENTIALS, password);
}

   Context ctx = new InitialContext(env);

That works well for me, because I have to set the user id and password, but you
might not like the complicated way of setting the InitialContext.  I am
considering writing a security interceptor to do this stuff for me, however.

John

"Simon Oldeboershuis, outermedia" wrote:

 Hi Peter,

 I think you have to add the jndi.properties file (see JONAS_ROOT
 directory) to classpath. I have added it to the classpath of the
 environment in which tomcat is started. I tried to put into the
 WEB-INF/lib packed into a test.jar - no success
 WEB-INF/classes - no success
 /tomcat/lib - no success
 export CLASSPATH=... - SUCCESS

 Does anybody knows a better solution???

 simon

 Peter Knight schrieb:
 
  I have tried to invoke EJB's from TOMCAT and get:
 
  Internal Servlet Error:
  javax.servlet.ServletException: Need to specify class name in environment or
  system property:
  Root cause:
  javax.naming.NoInitialContextException: Need to specify class name in
  environment or system property: e.t.c.
 
  The EJB resides in an Oracle 8i 8.1.6 database.
  I have included the EJB API and the two EJB jar files in the class path and
  it doesn't seem to matter what I do, I cannot get it to work!!
  PLEASE PLEASE HELP ME!
 
  Regards Peter Knight
 
  _
  Important Note: This E-Mail is confidential, it must not be read,
  copied, disclosed or used by any person other than the above
  named addressees. Unauthorised use, disclosure or copying is
  strictly prohibited and may be unlawful. Eurostar (U.K.) Limited
  disclaims any liability for any action taken in reliance on the
  content of this E-Mail. The comments or statements expressed in
  this E-Mail are not necessarily those of Eurostar (U.K.) Limited
  or its subsidiaries or affiliates.
 
  Eurostar (U.K.) Ltd. Registered Office: Eurostar House, Waterloo
  Station, London, SE1 8SE, Registered in England No. 2462001
  VAT No. GB 657 719 590
  _

   
  Name: sol.vcf
sol.vcf   Type: VCard (text/x-vcard)
  Encoding: 7bit
   Description: Visitenkarte für Simon Oldeboershuis, outermedia




Re: Programatic management of security

2000-11-09 Thread John Ellis

You might take a look at JOnAS 2.1.1.  The Jermie version has an integration of
Tomcat security and EJB method access.  At leaset, it shows how to intercept the
Tomcat user information.

Hector Gonzalez wrote:

 Hi all,

 I am working with Tomcat 3.1 beta 6, and Jonas 2.1. I plan to user JDBCRealm
 for user authentication. Is it possible to:

 1. Modify the realm programatically, that is add users, remove users, add
 roles, etc.
 2. Tell tomcat that user x should be logged into the application. I would
 like to automatically log some users based on a cookie.

 Thanks in advance

 Hector Gonzalez