isUserInRole

2005-03-30 Thread e-Denton Subscriber

I see that the session object is stored in the request object
(request.getSession).  And, I suppose, the methods such as isUserInRole from
the request are actually querying the stuff from the session object. So, if
the session is gone (invalidated), then there is no authorization info. Does
this mean the authorization info is kept in the session object?


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



Re: Root directory...

2004-11-09 Thread e-Denton Subscriber
Create a context element, something like this:

Context displayName=myApp
 path=
 docBase=/myApp
 reloadable=true
 useNaming=true
 debug=5 

- Original Message - 
From: Luc Vantroys [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; e-Denton
Subscriber [EMAIL PROTECTED]
Sent: Sunday, November 07, 2004 7:48 PM
Subject: Re: Root directory...


 Hi,

 What do you mean by this?

 thanks,

 Luc.
 - Original Message -
 From: e-Denton Subscriber [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Sunday, November 07, 2004 7:44 PM
 Subject: Re: Root directory...


  Create a context for your app with path=. That makes it the root app.
 
  - Original Message -
  From: Luc Vantroys [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Saturday, November 06, 2004 9:40 PM
  Subject: Root directory...
 
 
   Hi,
  
   I work in a regular directory but I'm tired to have to reload the
   application all the time after I recompiled the source code...
  
   I don't understand how I am suppose to work with the ROOT directory,
 I've
   heard that when the classes are in the ROOT directory, they are
relaoded
   each time you need them.
   so
   Can anybody help me? I copied my application in the root directory but
I
  can
   access it. How can I do?
  
   Thanks,
  
   Luc.
  
  
   -
   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: ClassLoader question

2004-11-08 Thread e-Denton Subscriber
shared is the right directory for things to be shared by all your web apps
(shared class loader).
server/lib is for the Catalina class loader.


- Original Message - 
From: Mark Claassen [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, November 08, 2004 1:40 PM
Subject: ClassLoader question


 What is the difference between the server/lib and shared directories as
far
 as the class loaders are concerned?

 Background:
 ---
 I was having trouble with CGI scripts, so I wanted to creat a new
CGIServlet
 to run some tests.  To start the process, I copied source of the tomcat
 CGIServlet file into my own package structure.  Once I got this working I
 would alter that code and try to see why the CGI scripts where not
executing
 correctly.

 Part I Don't Understand:
 ---
 I put my jar file containing the CGIServlet into the server/lib directory
 (where the tomcat CGIServlet resides).  This, however, would not start up
 and gave me ClassNotFound exceptions.  However, when I moved my jar to the
 shared directory, everything seems to work.

 Question:
 -
 I thought everything had access to things in the server/lib directory.
What
 is going on here?

 Thanks,
 Mark


 Confidentiality Notice:  OCIESERVICE
 -
 The contents of this e-mail message and any attachments are intended
 solely for the addressee(s) named in this message. This communication
 is intended to be and to remain confidential.  If you are not the
 intended recipient of this message, or if this message has been
 addressed to you in error, please immediately alert the sender by
 reply e-mail and then delete this message and its attachments. Do not
 deliver, distribute, copy, disclose the contents or take any action
 in reliance upon the information contained in the communication or
 any attachments.
 -
 Mark Claassen
 Donnell Systems, Inc.
 300 S. St. Louis Blvd. Ste. 203
 South Bend, IN 46617
 E-mail: mailto:[EMAIL PROTECTED]
 Voice: (574)232-3784
 Fax: (574)232-4014




 -
 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: Root directory...

2004-11-07 Thread e-Denton Subscriber
Create a context for your app with path=. That makes it the root app.

- Original Message - 
From: Luc Vantroys [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, November 06, 2004 9:40 PM
Subject: Root directory...


 Hi,

 I work in a regular directory but I'm tired to have to reload the
 application all the time after I recompiled the source code...

 I don't understand how I am suppose to work with the ROOT directory, I've
 heard that when the classes are in the ROOT directory, they are relaoded
 each time you need them.
 so
 Can anybody help me? I copied my application in the root directory but I
can
 access it. How can I do?

 Thanks,

 Luc.


 -
 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: Deployment error

2004-10-30 Thread e-Denton Subscriber
I am not sure if this is your problem, but there can be a conflict between
the versions of xml in the jdk and in tomcat. jdk ones load in preference to
tomcat ones. I loaded:

xalan.jar
xercesImpl.jar
xml-apis.jar

into tomcat/common/endorsed to fix my problem. Endorsed allows them to load
in preference to the jdk ones.

- Original Message - 
From: Vaishali Bhirud [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 30, 2004 11:42 AM
Subject: Deployment error


 Hello

 when I am trying to deploy my application it gives me an error as follows

 FAIL - Encountered exception java.io.IOException:
 org.xml.sax.SAXParseException: Content is not allowed in prolog.

 Can anyone please help me? I posted this before also. I didnt get any
reply.

 Thanks

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



Default App

2004-10-29 Thread e-Denton Subscriber
Hi,

I changed the default app to my app as follows:

Context  path= docBase=myApp
and
Host name=localhost appBase=C:/appBase

only to discover that my Struts tags werent' working (putting in the context
path), because the context path is . I would like to have my app in its
own directory under the appBase directory (appBase/myApp), rather than
putting the individual files and directories directly under appBase.

So, is there a way to have my cake (have myApp in its own directory and be
the default app) and eat it (have my Struts tags which supply the context
path work), too?

Thx.


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



MySQL upgrade Problem

2004-10-26 Thread e-Denton Subscriber
Hi,

I just upgraded from MySql 3.x to 4.0 and now I can't make connections work
from Tomcat. I have read a bunch of stuff on the Web about this or similar
problems, but, even though it worked before,  I can't make it work now.

I specify my connection info in server.xml and context.xml just like I used
to (below). The only difference is (?) the new MySql, and the fact that I am
trying to use a new, different password (with a dollar sign in it). (Oh,
and, I set appBase outside the Tomcat home directory.)  On Tomcat startup, I
get:

JDBCRealm[Catalina]:
Exception opening database connection
java.sql.SQLException: Invalid authorization specification: Access denied
for user: '[EMAIL PROTECTED]' (Using password: YES)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)...

I can login manually to MySql using the same user and password.
I can access the database directly from Java programs which make their own
connection.

Any ideas what's going wrong?

web.xml:
-
 Realm className=org.apache.catalina.realm.JDBCRealm
debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://127.0.0.1:3306/xxx
connectionName=yyy
connectionPassword=$zzz
userTable=portal_user
 userNameCol=clientName
 userCredCol=clientPassword
userRoleTable=portal_role
 roleNameCol=clientRole
digest=md5 /

conext.xml:
---
   Resource name=jdbc/portal auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/portal
  parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
parameter
nameusername/name
valueyyy/value
/parameter
parameter
namepassword/name
value$zzz/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name

valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
  parameter
   namemaxWait/name
   value1/value
  /parameter
/ResourceParams




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



Fixed: MySQL upgrade Problem

2004-10-26 Thread e-Denton Subscriber
That was my problem--thank goodness. Wish I had asked earlier, before I
tried all that futile cr*p and before I read all that MySQL stuff I didn't
really need to know ;)

PITA to fix? (Does that mean it takes a lot of bread to fix?)

Thx to all for their interest and help.

$ee you $oon!

- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; e-Denton
Subscriber [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 10:09 AM
Subject: RE: MySQL upgrade Problem



Hi,
Dollar sign in password is a no-no right now.  It gets escaped.  It's a
PITA to fix, so I (and apparently others) haven't done it yet.  If you
really want a dollar sign in your password, submit a patch ;)

Yoav Shapira http://www.yoavshapira.com



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



Re: Application Deployment on Tomcat 5.1

2004-10-26 Thread e-Denton Subscriber
I would change appBase in server.xml to pint to WebDir. Then, create a
context for each app with a URI relative to that base. Something like this:

Host name=localhost
  debug=0
  appBase=C:/WebDir

and

Context displayName=myApp1
 path=
 docBase=myApp1
...
Context displayName=myApp2
 path=/myApp1
 docBase=myApp1


- Original Message - 
From: Suryaanil Lingamallu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 5:53 PM
Subject: Application Deployment on Tomcat 5.1


 Hi,

   I need some help on deploying applications on Tomcat 5.1. I installed
 tomcat 5.1 on Windows 2003 Server in C:\Tomcat5.1\

 I could create applications under CATALINA_HOME/webapps directory.

 I need to create a custom deployment directory which is not under
 CATALINA_HOME/webapps directory. Let's say that I need to create under
 C:\WebDir\.

 My questions are
 1. Will it possible to do this deployment?
 2. If it is possible, what is the procedure?

 Please share with me your thoughts.

 Thanks,
 Surya



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



BASIC authentication without Popup Verification window

2004-10-23 Thread e-Denton Subscriber
Hi!

I can't figure out why my BASIC authorization isn't working for my app. The
pages show up as 401 Not Authorized, but no popup authorization window pops
up! Further, the admin and manager apps are working using my JDBCRealm
(:Enter Password window does pop up). Help appreciated.

server.xml:
---
!-- 
Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=0 resourceName=UserDatabase/
Realm className=org.apache.catalina.realm.MemoryRealm /
--

Realm resourceName=PortalDatabase
className=org.apache.catalina.realm.JDBCRealm
debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://127.0.0.1:3306/myDB
connectionName=myUser
connectionPassword=myPassword
userTable=users userNameCol=user_name userCredCol=user_pass
userRoleTable=user_roles roleNameCol=role_name /

web.xml:

security-constraint
web-resource-collection
web-resource-nameMaintenance/web-resource-name
url-pattern/maint/*/url-pattern
url-pattern/maintenance.do/url-pattern
/web-resource-collection
auth-constraint
role-namemanager/role-name
/auth-constraint
/security-constraint

login-config
auth-methodBASIC/auth-method
realm-namePortal/realm-name
/login-config

security-role
descriptionmanager/description
role-namemanager/role-name
/security-role


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



Re: BASIC authentication without Popup Verification window

2004-10-23 Thread e-Denton Subscriber
Nevermind. I had a 401 page defined in web.xml, so it was being sent there
instead of the browser. My mistake.

- Original Message - 
From: e-Denton Subscriber [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, October 23, 2004 4:06 PM
Subject: BASIC authentication without Popup Verification window


 Hi!

 I can't figure out why my BASIC authorization isn't working for my app.
The
 pages show up as 401 Not Authorized, but no popup authorization window
pops
 up! Further, the admin and manager apps are working using my JDBCRealm
 (:Enter Password window does pop up). Help appreciated.

 server.xml:
 ---
 !-- 
 Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/
 Realm className=org.apache.catalina.realm.MemoryRealm /
 --

 Realm resourceName=PortalDatabase
 className=org.apache.catalina.realm.JDBCRealm
 debug=99
 driverName=com.mysql.jdbc.Driver
 connectionURL=jdbc:mysql://127.0.0.1:3306/myDB
 connectionName=myUser
 connectionPassword=myPassword
 userTable=users userNameCol=user_name userCredCol=user_pass
 userRoleTable=user_roles roleNameCol=role_name /

 web.xml:
 
 security-constraint
 web-resource-collection
 web-resource-nameMaintenance/web-resource-name
 url-pattern/maint/*/url-pattern
 url-pattern/maintenance.do/url-pattern
 /web-resource-collection
 auth-constraint
 role-namemanager/role-name
 /auth-constraint
 /security-constraint

 login-config
 auth-methodBASIC/auth-method
 realm-namePortal/realm-name
 /login-config

 security-role
 descriptionmanager/description
 role-namemanager/role-name
 /security-role


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



Context crossContext

2004-10-15 Thread e-Denton Subscriber
Hi,

I was reading in a JSTL book about the Context crossContext attribute, but
it explains nothing.

What exactly does crossContext=true allow one to do?

Thx.


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



Subdomain Set Up

2004-10-15 Thread e-Denton Subscriber
Hi,

I am trying to get set up subdomains on a remote server (WebAppCabaret). I
want to have the following valid URLs:

cnw.xxx.com
blog.xxx.com
www.xxx.com

They are all currently routed to Tomcat.

I want each to map to a different directory or app. Do I set this up in
Tomcat or in Apache? How?

Thx for your help.


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



ROOT Problem

2004-09-20 Thread e-Denton Subscriber
Hi,

I set my context to use my app as the default app:

Context displayName=e-Denton Portal Application
 docBase=e-Denton
 path=
 reloadable=true
 useNaming=true
 debug=5

It does call my app with this URL http://127.0.0.1:8080/, but it also starts
up the app in /e-Denton. In other words, it is running both as the default
app and as its own app. What am I doing wrong?

Thx.


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



Re: ROOT Problem

2004-09-20 Thread e-Denton Subscriber
That doesn't seem to work. I still have both running. I changed the Host as
below:

  Host name=localhost appBase=webapps
   unpackWARs=true autoDeploy=false
   xmlValidation=false xmlNamespaceAware=false
   debug=5

I am running Tomcat 5.0.27

- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; e-Denton
Subscriber [EMAIL PROTECTED]
Sent: Monday, September 20, 2004 11:12 AM
Subject: RE: ROOT Problem



Hi,
You have autoDeploy enabled (this is the default).  Turn it off by
modifying the Host element in your server.xml.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
Sent: Monday, September 20, 2004 12:08 PM
To: Tomcat Users List
Subject: ROOT Problem

Hi,

I set my context to use my app as the default app:

Context displayName=e-Denton Portal Application
 docBase=e-Denton
 path=
 reloadable=true
 useNaming=true
 debug=5

It does call my app with this URL http://127.0.0.1:8080/, but it also
starts
up the app in /e-Denton. In other words, it is running both as the
default
app and as its own app. What am I doing wrong?

Thx.


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




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: Tomcat 5.0 and JavaMail - solved? not quite

2004-07-09 Thread e-Denton Subscriber
My lookup still fails (stack trace at end of this email) with
JasperException:

   Context initContext = new InitialContext();
   Context envContext  = (Context) initContext.lookup (java:comp/env);
   Session mailSession = (Session) envContext.lookup (mail/Session);
// fails

Is anyone successfully using JavaMail with JNDI lookup on Tomcat 5.0.27 ?

Should I report it as a bug?

- Original Message - 
From: e-Denton Subscriber [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 9:10 AM
Subject: Re: Tomcat 5.0 and JavaMail - solved?


 You're right! Thanks! My Tomcat 5.0.25 common/lib/naming-factory.jar
doesn't
 contain a org.apache.naming.factory.MailSessionFactory I'll try your
 solution.

 Thanks to the other posters as well. (I did forget activation.jar, even
 though I hadn't hit that problem yet).

 - Original Message - 
 From: David Smith [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, July 08, 2004 8:34 AM
 Subject: Re: Tomcat 5.0 and JavaMail


  opinion
Don't get in the habit of putting jars in java_home/jre/lib/ext.
  Those jars get loaded before everything and ugly version conflicts among
  other problems show up.
  /opinion
 
  I have a different take on your problem.  Are you using Tomcat 5.0.25?
  If so, you may want to consider upgrading or just stealing
  common/lib/naming-factory.jar from a 5.0.24 version of Tomcat.
  org.apache.naming.factory.MailSessionFactory is missing from tomcat
  5.0.25.  See this message from the archives:
 
 
http://www.mail-archive.com/[EMAIL PROTECTED]/msg128258.html
 
  --David
 
  Aris Javier wrote:
 
  you don't need to put activation.jar and mail.jar inside
  catalina_home\common\lib\ you need to put them inside
  java_home\jre\lib\ext...
  
  regards...
  aris
  
  -Original Message-
  From: Dale, Matt [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 07, 2004 11:23 PM
  To: Tomcat Users List; e-Denton Subscriber
  Subject: RE: Tomcat 5.0 and JavaMail
  
  
  
  I've found that you also need activation.jar for JavaMail, do you have
  this in common/lib too?
  
  Ta
  Matt
  
  -Original Message-
  From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
  Sent: 07 July 2004 15:49
  To: Tomcat Users List
  Subject: Tomcat 5.0 and JavaMail
  
  
  I had JavaMail working in Tomcat 4, but in Tomcat 5, I am having
  trouble. I know it's something simple, perhaps you can see the problem.
  Mail.jar is in Tomcat 5.0\common\lib.
  
  I am getting this error:
  
  javax.naming.NamingException: Cannot create resource instance:
  
  Using this context in Tomcat 5.0\conf\Catalina\localhost\e_Denton.xml
  
  Context displayName=Portal Application
   debug=5
   docBase=e-Denton
   path=/e-Denton
   reloadable=true
   useNaming=true
  
  Loader checkInterval=1 /
  
   Resource name=mail/Session auth=Container
  type=javax.mail.Session /  ResourceParams name=mail/Session
parameter
 namemail.smtp.host/name
 valuemars.webappcabaret.net/value
/parameter
   /ResourceParams
  ...
  
  And this web.xml:
  
  !-- JavaMail Resource --
   resource-ref
description
Resource reference to a factory for javax.mail.Session
preconfigured to connect to the appropriate SMTP server.
/description
res-ref-namemail/Session/res-ref-name
res-typejavax.mail.Session/res-type
res-authContainer/res-auth
   /resource-ref
  
  Accessed like this:
  
try
 {
 Context initContext = new InitialContext();
 Context envContext  = (Context) initContext.lookup(java:comp/env);
 Session session = (Session) envContext.lookup(mail/Session);
 }
catch (javax.naming.NamingException ne)

Nested Exception:
java.lang.reflect.InvocationTargetException




java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRunt
imeLibrary.java:355) at
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra
ry.java:306) at
org.apache.jsp.Test_005fJavaMail_jsp._jspService(Test_005fJavaMail_jsp.java:
81) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
24) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802

Re: Tomcat 5.0 and JavaMail - solved?

2004-07-08 Thread e-Denton Subscriber
You're right! Thanks! My Tomcat 5.0.25 common/lib/naming-factory.jar doesn't
contain a org.apache.naming.factory.MailSessionFactory I'll try your
solution.

Thanks to the other posters as well. (I did forget activation.jar, even
though I hadn't hit that problem yet).

- Original Message - 
From: David Smith [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, July 08, 2004 8:34 AM
Subject: Re: Tomcat 5.0 and JavaMail


 opinion
   Don't get in the habit of putting jars in java_home/jre/lib/ext.
 Those jars get loaded before everything and ugly version conflicts among
 other problems show up.
 /opinion

 I have a different take on your problem.  Are you using Tomcat 5.0.25?
 If so, you may want to consider upgrading or just stealing
 common/lib/naming-factory.jar from a 5.0.24 version of Tomcat.
 org.apache.naming.factory.MailSessionFactory is missing from tomcat
 5.0.25.  See this message from the archives:

 http://www.mail-archive.com/[EMAIL PROTECTED]/msg128258.html

 --David

 Aris Javier wrote:

 you don't need to put activation.jar and mail.jar inside
 catalina_home\common\lib\ you need to put them inside
 java_home\jre\lib\ext...
 
 regards...
 aris
 
 -Original Message-
 From: Dale, Matt [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 07, 2004 11:23 PM
 To: Tomcat Users List; e-Denton Subscriber
 Subject: RE: Tomcat 5.0 and JavaMail
 
 
 
 I've found that you also need activation.jar for JavaMail, do you have
 this in common/lib too?
 
 Ta
 Matt
 
 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
 Sent: 07 July 2004 15:49
 To: Tomcat Users List
 Subject: Tomcat 5.0 and JavaMail
 
 
 I had JavaMail working in Tomcat 4, but in Tomcat 5, I am having
 trouble. I know it's something simple, perhaps you can see the problem.
 Mail.jar is in Tomcat 5.0\common\lib.
 
 I am getting this error:
 
 javax.naming.NamingException: Cannot create resource instance:
 
 Using this context in Tomcat 5.0\conf\Catalina\localhost\e_Denton.xml
 
 Context displayName=Portal Application
  debug=5
  docBase=e-Denton
  path=/e-Denton
  reloadable=true
  useNaming=true
 
 Loader checkInterval=1 /
 
  Resource name=mail/Session auth=Container
 type=javax.mail.Session /  ResourceParams name=mail/Session
   parameter
namemail.smtp.host/name
valuemars.webappcabaret.net/value
   /parameter
  /ResourceParams
 ...
 
 And this web.xml:
 
 !-- JavaMail Resource --
  resource-ref
   description
   Resource reference to a factory for javax.mail.Session
   preconfigured to connect to the appropriate SMTP server.
   /description
   res-ref-namemail/Session/res-ref-name
   res-typejavax.mail.Session/res-type
   res-authContainer/res-auth
  /resource-ref
 
 Accessed like this:
 
   try
{
Context initContext = new InitialContext();
Context envContext  = (Context) initContext.lookup(java:comp/env);
Session session = (Session) envContext.lookup(mail/Session);
}
   catch (javax.naming.NamingException ne)
 
 
 
 
 
 
 -
 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]



Tomcat 5.0 and JavaMail

2004-07-07 Thread e-Denton Subscriber
I had JavaMail working in Tomcat 4, but in Tomcat 5, I am having trouble. I
know it's something simple, perhaps you can see the problem. Mail.jar is in
Tomcat 5.0\common\lib.

I am getting this error:

javax.naming.NamingException: Cannot create resource instance:

Using this context in Tomcat 5.0\conf\Catalina\localhost\e_Denton.xml

Context displayName=Portal Application
 debug=5
 docBase=e-Denton
 path=/e-Denton
 reloadable=true
 useNaming=true

Loader checkInterval=1 /

 Resource name=mail/Session auth=Container type=javax.mail.Session /
 ResourceParams name=mail/Session
  parameter
   namemail.smtp.host/name
   valuemars.webappcabaret.net/value
  /parameter
 /ResourceParams
...

And this web.xml:

!-- JavaMail Resource --
 resource-ref
  description
  Resource reference to a factory for javax.mail.Session
  preconfigured to connect to the appropriate SMTP server.
  /description
  res-ref-namemail/Session/res-ref-name
  res-typejavax.mail.Session/res-type
  res-authContainer/res-auth
 /resource-ref

Accessed like this:

  try
   {
   Context initContext = new InitialContext();
   Context envContext  = (Context) initContext.lookup(java:comp/env);
   Session session = (Session) envContext.lookup(mail/Session);
   }
  catch (javax.naming.NamingException ne)






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



Upgrading to Tomcat 5.0

2004-07-07 Thread e-Denton Subscriber
I have another problem. webapps contains both an e-Denton.war file and an
already expanded .war file (e-Denton directory). My Context (e-Denton.xml)
is in Tomcat 5.0\conf\Catalina\localhost. Any idea why I would be getting
this message?

StandardHost[localhost]: Error deploying application at context path null
java.lang.IllegalStateException: Context path /e-Denton is already in use
 at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
 at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
 at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
 at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:7
6)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
 at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.apache.commons.digester.Digester.parse(Digester.java:1567)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:488)
 at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482
)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
 at org.apache.catalina.core.StandardService.start(StandardService.java:476)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)


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



Re: Upgrading to Tomcat 5.0--Fixed

2004-07-07 Thread e-Denton Subscriber
Nevermind--I figured this one out. I had saved a copy of my old web.xml,
which Tomcat was also trying to load.

- Original Message - 
From: e-Denton Subscriber [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, July 07, 2004 11:06 AM
Subject: Upgrading to Tomcat 5.0


 I have another problem. webapps contains both an e-Denton.war file and an
 already expanded .war file (e-Denton directory). My Context (e-Denton.xml)
 is in Tomcat 5.0\conf\Catalina\localhost. Any idea why I would be getting
 this message?

 StandardHost[localhost]: Error deploying application at context path null
 java.lang.IllegalStateException: Context path /e-Denton is already in use
  at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2540)
  at

org.apache.commons.digester.Digester.createSAXException(Digester.java:2566)
  at org.apache.commons.digester.Digester.endElement(Digester.java:1061)
  at

org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:7
 6)
  at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
  at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
 Source)
  at

org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
 her.dispatch(Unknown Source)
  at
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
 Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  at org.apache.commons.digester.Digester.parse(Digester.java:1567)
  at

org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
 ava:488)
  at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
  at

org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:482
 )
  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:964)
  at
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
  at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
 t.java:119)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
  at
org.apache.catalina.core.StandardService.start(StandardService.java:476)
  at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2298)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
 )
  at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
 .java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422)


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



Sysdeo, Eclipse, Tomcat

2004-07-03 Thread e-Denton Subscriber
I am trying to figure out how to debug servlets and JSPs. I am running
Windows ME,
Tomcat 5.0, Eclipse 2.1.3, and Sysdeo Tomcat Plugin 3.0.0.alpha1.

So, how should Sysdeo be set up?

Should I be able to set a breakpoint normally in a servlet?

How do I set a breakpoint in JSP?

Where is my soruce (and binaries) supposed to be?

Miscellaneous questions:

1. What is Tomcat base? (Preferences/Tomcat)
2. Any JVM settings needed? (Preferences/Tomcat/JVM settings)

Thanks for your help. I have already tried to find a tutorial on the Web,
but nothing has helped.




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



Tomcat 5.0 under Windows ME

2004-06-23 Thread e-Denton Subscriber
I just downloaded Tomcat 5.0 to run on my Windows ME system. When I try to
run the Configure Tomcat program, I get:

The tomcat5w.exe file is linked to missing export
NETAPI32.DLL:MetwkstaGetInfo.

NETAPI32.DLL seems to be a Windows XP file. I did the same download on my XP
machine and it is working.

Any idea what my problem is under Windows ME?

Thanks for your help.



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



Re: Tomcat 5.0 under Windows ME

2004-06-23 Thread e-Denton Subscriber
Thx for your help.

- Original Message - 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 11:27 AM
Subject: RE: Tomcat 5.0 under Windows ME


 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
 Subject: Tomcat 5.0 under Windows ME

 I just downloaded Tomcat 5.0 to run on my Windows ME
 system. When I try to run the Configure Tomcat program

Don't use the .exe files under older Windows versions - they are primarily
for running Tomcat as a Windows service, a concept that doesn't exist for
95/98/Me. Just use the .bat files to start it up under a DOS box. Also make
sure you have a reasonably current Sun J2SDK installed, not just a JRE.

 - Chuck

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

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



Tomcat 4.1 - 5.0

2004-06-23 Thread e-Denton Subscriber
I am converting a Struts app from Tomcat 4.1 to 5.0 and don't know how to
establish my context. Under 4.1, I placed a Context entry (at the end of
this email) in server.xml. I gather it should now be in its own xml file
within my application directory. But, where? and by what name? Is it found
automagically?



!-- portal context Chang  Wagers Associates Copyright 2004 --
Context displayName=e-Denton Portal Application
 docBase=e-Denton
 path=/e-Denton
 debug=3
 reloadable=true
 useNaming=true 
Loader checkInterval=1 /

Resource name=jdbc/portal auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/portal
  parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
parameter
nameusername/name
valuefortune/value
/parameter
parameter
namepassword/name
valuex/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name
valuejdbc:mysql://127.0.0.1:3306/x?autoReconnect=true/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
  parameter
   namemaxWait/name
   value1/value
  /parameter

/ResourceParams
/Context



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



Re: Tomcat 4.1 - 5.0

2004-06-23 Thread e-Denton Subscriber
Thanks--it works!

- Original Message - 
From: Randall Svancara [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; e-Denton
Subscriber [EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 2:23 PM
Subject: RE: Tomcat 4.1 - 5.0


I believe they go into $catalina_home/conf/Catalina/localhost/somewebapp.xml

Randall

-Original Message-
From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 1:21 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 4.1 - 5.0


I am converting a Struts app from Tomcat 4.1 to 5.0 and don't know how to
establish my context. Under 4.1, I placed a Context entry (at the end of
this email) in server.xml. I gather it should now be in its own xml file
within my application directory. But, where? and by what name? Is it found
automagically?



!-- portal context Chang  Wagers Associates Copyright 2004 --
Context displayName=e-Denton Portal Application
 docBase=e-Denton
 path=/e-Denton
 debug=3
 reloadable=true
 useNaming=true 
Loader checkInterval=1 /

Resource name=jdbc/portal auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/portal
  parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
parameter
nameusername/name
valuefortune/value
/parameter
parameter
namepassword/name
valuex/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name
valuejdbc:mysql://127.0.0.1:3306/x?autoReconnect=true/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
  parameter
   namemaxWait/name
   value1/value
  /parameter

/ResourceParams
/Context



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



Easy /servlet question

2004-06-23 Thread e-Denton Subscriber
I have a very simple question, to which neither I nor my wife can find the
answer.

My servlet is in the WEB-INF/classes directory of my application directory.
For some reason, I can't get this simple construction--it's in all the JSP
books--to work:

http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW


I get this error:

HTTP Status 404 - /e-Denton/servlet/Upload_CnW
message /e-Denton/servlet/Upload_CnW
description The requested resource (/e-Denton/servlet/Upload_CnW) is not
available.

I can get it to wotk with a sevlet mapping, but not without it.



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



Re: Easy /servlet question

2004-06-23 Thread e-Denton Subscriber
Thanks, Paul. Problem (mystery) solved.

- Original Message - 
From: Lee, Paul NYC [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, June 23, 2004 4:51 PM
Subject: RE: Easy /servlet question


 Tomcat 3.x allowed access to servlets under a common mapping (/servlet/*)
by
 default.  In Tomcat 4.x the developers stopped this behavior by default.
 This was done by the invoker servlet.

 To enable this, under $CATALINA_HOME/conf, modify the web.xml file.
Search
 for invoker and you should find something like this:

 !-- The mapping for the invoker servlet --
 !--
 servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
 /servlet-mapping
 --

 Just uncomment and it should work.  Note that /servlet/ is no longer
part
 of the specification as of 2.3.  Mapping it is recommended.

 Regards,
 Paul

 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 23, 2004 4:29 PM
 To: [EMAIL PROTECTED]
 Subject: Easy /servlet question


 I have a very simple question, to which neither I nor my wife can find the
 answer.

 My servlet is in the WEB-INF/classes directory of my application
directory.
 For some reason, I can't get this simple construction--it's in all the JSP
 books--to work:

 http://127.0.0.1:8080/e-Denton/servlet/Upload_CnW


 I get this error:

 HTTP Status 404 - /e-Denton/servlet/Upload_CnW
 message /e-Denton/servlet/Upload_CnW
 description The requested resource (/e-Denton/servlet/Upload_CnW) is not
 available.

 I can get it to wotk with a sevlet mapping, but not without it.



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



Tomcat 5.0 and NETAPI32.DLL

2004-06-22 Thread e-Denton Subscriber
Hi,

I just downloaded Tomcat 5.0 to run on my Windows ME system. When I try to
run the Configure Tomcat program, I get:

The tomcat5w.exe file is linked to missing export
NETAPI32.DLL:MetwkstaGetInfo.

NETAPI32.DLL seems to be a Windows XP file. I did the same download on my XP
machine and it is working.

Any idea what my problem is under Windows ME?

Thanks,

Will



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