Re: Renaming WAR problem

2004-11-08 Thread Tim Penhey
Andrew Watters wrote:
In this case the webapps directory is entirely empty, I delete the 
ROOT folder as part of the publish procedure and there are no other 
apps configured except for the manager and admin ones.
What about the XML configuration file in 
$TOMCAT_HOME/conf/Catalina/localhost
Does it specify the name of the correct war file?

As Yoav mentioned, look at the Host element in the /conf/server.xml 
file.  Specifically the values for unpackWARs and autoDeploy.

Tim

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


Re: UnsatisfiedLinkError - JNI

2004-07-07 Thread Tim Penhey
Josef Henryson wrote:
Hi!
I get an UnsatisfiedLinkError when trying to System.loadLibrary(foo) 
from a class instantiated within a Servlet. The library libFoo.jnilib 
is in a folder within java.library.path and the class loading it is 
inside a JAR in $CATALINA_HOME/shared/lib. Beside the JNI library is a 
native library libBar.dylib.

I'm running Tomcat 5.0.25 on Mac OS X 10.3.4
Here's the exception:
UnsatisfiedLinkError: 
/Users/henryson/Library/Java/Extensions/libFoo.jnilib:
java.lang.UnsatisfiedLinkError: 
/Users/henryson/Library/Java/Extensions/libFoo.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)

I have tried loading the library from a small Java application outside 
the Tomcat server and it works fine when all classes/libraries are 
within the same folder.

Of course I have searched for a solution on Google and I have also 
search old entries on this list (in an archive on a website) but there 
just don't seem to be a solution available out there... =(

Anyone that have a clue? I would be VERY thankful =)
Regards,
Josef Henryson
Well given the fact that the JNI library works fine when in a stand 
alone environment, it sounds like a load path problem.  I'm not sure 
what OS X uses, but on unix it is the LD_LIBRARY_PATH, or on Windows the 
PATH.  Try and get the code to output the environment before it does the 
load library call and make sure that the locations for all the dependant 
libraries are there.

Hope that helps,
Tim
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


New connection joining existing session

2004-06-15 Thread Tim Penhey
I have a web application that uses Java Web Start to do nice printing from the client
machine.

As a parameter to the web start application is an URL which the locally executed java 
app
hits to get the data (normally in XML), which is most likely protected by a JDBCRealm
which the user has already authenticated against.

Is it possible to pass a session id as part of the URL?  Would that be sufficient for 
an
independant connection?

Tim





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



RE: New connection joining existing session

2004-06-15 Thread Tim Penhey
Answering my own question...

Yes, just do the same as the url rewriting by adding
;jsessionid=${pageContext.session.id} to the end of the URL.

Tim

 -Original Message-
 From: Tim Penhey [mailto:[EMAIL PROTECTED]
 Sent: 15 June 2004 13:55
 To: Tomcat-User
 Subject: New connection joining existing session


 I have a web application that uses Java Web Start to do nice printing from the client
 machine.

 As a parameter to the web start application is an URL which the locally
 executed java app
 hits to get the data (normally in XML), which is most likely protected by a JDBCRealm
 which the user has already authenticated against.

 Is it possible to pass a session id as part of the URL?  Would that be sufficient 
 for an
 independant connection?

 Tim





 -
 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: Add a text message to BASIC HTTP Authentication Dialog

2004-06-14 Thread Tim Penhey
I am fairly sure that the name of the Realm is what appears in the dialog.

Tim

 -Original Message-
 From: Faine, Mark [mailto:[EMAIL PROTECTED]
 Sent: 14 June 2004 13:40
 To: '[EMAIL PROTECTED]'
 Subject: Add a text message to BASIC HTTP Authentication Dialog
 
 
 Tomcat 4.1.29
 
 I'd like to add some basic disclaimer text to a site that uses a JDBC Realm.
 I'd like for it to appear in the dialog where the user enters their username
 and password in the location that now reads only JDBCRealm.  Is this
 possible, if so how?  
 
 -Thanks,
 Mark
 
 -
 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: [Resource Not available] Newbie question

2004-06-10 Thread Tim Penhey
You would also need to tell us your servlet-mapping and the directory of the file that 
the
form is in.

Tim

 -Original Message-
 From: Michael Drewitz
 [mailto:[EMAIL PROTECTED]
 Sent: 10 June 2004 11:18
 To: [EMAIL PROTECTED]
 Subject: [Resource Not available] Newbie question


 Hi all,

 if I try to access the below described servlet from a html- or jsp-file
 I get Http 404 Error - Resource not available.

 form action=AVG_ValuesServlet method=get name=avg_values_form
 ../form

 I have tried it with the package-name as prefix and the prefix
 servlet/, but nothing works.
 Whats wrong?

 The class-file is located in the defined directory under ../web-inf/classes.
 This is the only element of web.xml:
 servlet
 servlet-nameAVG_ValuesServlet/servlet-name
 servlet-classorg.haw.weather.web.AVG_ValuesServlet/servlet-class
 /servlet

 Thanks in advance, Michael





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



Upgrading tomcat 5 on Windows

2004-06-09 Thread Tim Penhey
Hi All,

I have Tomcat 5.0.18 running on one machine with a number of configured webapps.
If I install the 5.0.25 over the top will all the configuration files stay or should I
back them up?

Tim





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



ROOT.war says it's missing application web.xml

2004-06-08 Thread Tim Penhey
Hi All,

I have a vanilla Tomcat 5.0.25 on Win 2K using JDK 1.4.2_04.
I undeployed all the default webapps except admin and manager, and I wanted to replace 
the
ROOT context with a war file.  However, here is where the problems seem to go wrong.

I have a ROOT.xml config file in ${catalina.home}/conf/Cataline/localhost

?xml version='1.0' encoding='utf-8'?
Context docBase=ROOT.war path=/
  Realm className=org.apache.catalina.realm.JDBCRealm
 connectionName=tomcat
 connectionPassword=tc
 connectionURL=jdbc:postgresql://localhost:5432/xyz
 debug=3
 digest=MD5
 driverName=org.postgresql.Driver
 roleNameCol=role
 userCredCol=passwd
 userNameCol=username
 userRoleTable=user_roles
 userTable=users/
  Resource name=jdbc/nursery type=javax.sql.DataSource/
  ResourceParams name=jdbc/nursery
parameter
  nameurl/name
  valuejdbc:postgresql://localhost:5432/xyz/value
/parameter
parameter
  namepassword/name
  value[**cut**]/value
/parameter
parameter
  namemaxActive/name
  value4/value
/parameter
parameter
  namemaxWait/name
  value5000/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  nameusername/name
  value[**cut88]/value
/parameter
parameter
  namemaxIdle/name
  value2/value
/parameter
  /ResourceParams
/Context

I added the war file to the webapps directory and renamed it to ROOT.war.  Here is the
relavant bits of the stdout.log:

INFO: Processing Context configuration file URL file:D:\Apache Software 
Foundation\Tomcat
5.0\conf\Catalina\localhost\ROOT.xml
08-Jun-2004 14:05:32 org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]
08-Jun-2004 14:05:33 org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path  from URL file:d:/Apache Software
Foundation/Tomcat 5.0/webapps/ROOT

WHY am I getting INFO: Missing application web.xml, as the war file definately 
includes
one in WEB-INF and I can see it in the exploded war directory ROOT that tomcat makes.

Thanks for any help...

Tim





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



RE: ROOT.war says it's missing application web.xml

2004-06-08 Thread Tim Penhey
Hoo Ray!  Thanks, that fixed it.

Tim

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: 08 June 2004 14:26
 To: Tomcat Users List
 Subject: RE: ROOT.war says it's missing application web.xml
 
 
 
 Hi,
 Change path=/ to path= and restart tomcat.
 
 Yoav Shapira
 Millennium Research Informatics





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



RE: Another source for MD5 encryption

2004-05-24 Thread Tim Penhey
Thanks for all the comments.  I didn't realise that the RealmBase class was just 
wrapping
the java.security.MessageDigest.

I have just added my own simple class that wraps this method and returns a hex string 
to
store in the DB.

Tim

BTW what is the difference between an encryption algorithm and a digesting one?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: 24 May 2004 13:26
 To: Tomcat Users List
 Subject: RE: Another source for MD5 encryption



 Hi,
 MD5 is not an encryption algorithm, by the way.  It's a digesting one
 for us in conjunction with an encryption algorithm.

 Yoav Shapira
 Millennium Research Informatics





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



Another source for MD5 encryption

2004-05-22 Thread Tim Penhey
I have a web application that manages the usernames and passwords for a JDBCRealm.  The
realm uses MD5 digest to encrypt the passwords for checking, and the encrypted 
passwords
are stored in the DB.

The docs say to have TOMCAT_HOME/server/lib/catalina.jar in the classpath in order to 
use
the RealmBase.Digest static method, but I was wondering if there is another source 
around
that will do the same MD5 digesting of passwords so I don't need catalina.jar in
WEB-INF/lib.

I don't really want to move around any of the tomcat jars, like from server to common, 
as
I want the web app to be able to deploy on another vanilla install of tomcat.

Any ideas?

Thanks,
Tim





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



Creating a bean for the session on login

2004-05-22 Thread Tim Penhey
In a web-app I have a JDBCRealm and most requests are secure (requiring a logon).

I would like to create a User bean that contains the users first and last name, both of
which are stored in the DB table along with the username and password.  I would like to
create this User bean when the user logs on and add it to the session, but I cannot 
find a
convenitent way to do it.

Using jsp:useBean would require a default constructor, but even if I wanted that, I
can't get the request and hence the logged in user.

I looked at HttpSessionListener, but that doesn't seem to have any way to get the 
logged
in user either.

Ideally I would like to use something that is container independant, but I could go 
with
something like a filter if that is the only way.

Am I missing something blindingly obvious?

Tim





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