[OT] : How to get a connection from Tomcat DBCP from a remote application?

2005-05-01 Thread appa rao
Hi,

I am using Tomcat 5.5.7 and configured DBCP properly to work with Oracle 9i.
Everything is working fine if I try to get the connection from the Pool from an 
application deployed in Tomcat.
 
However if I try to get the connection from the Pool from an application which 
is not deployed in Tomcat (remote client), I am getting not bound exceptions.
 
Here is the code:
 
import java.util.*;
import javax.naming.*;
import javax.sql.DataSource;
public class  ClientTest
{
 public static void main(String[] args) 
 {
  Context ctx = null;
  try
  {
   Hashtable props = new Hashtable();
   props.put(Context.INITIAL_CONTEXT_FACTORY, 
org.apache.naming.java.javaURLContextFactory);
   props.put(Context.URL_PKG_PREFIXES, org.apache.catalina.util.naming);
   ctx = new InitialContext(props);
   DataSource dataSource = (DataSource)ctx.lookup(java:/comp/env/jdbc/test);
  }
  catch(Exception e)
  {
   e.printStackTrace();
  }
 }
}
 
Stacktrace shows:
javax.naming.NameNotFoundException: Name java: is not bound in this Context
at org.apache.naming.NamingContext.list(NamingContext.java:344)
at org.apache.naming.NamingContext.list(NamingContext.java:367)
at javax.naming.InitialContext.list(InitialContext.java:387)
 
What am I doing wrong?  Is it allowed to access the Pool from remote client in 
first place?
 
Thanks in advance,
Appa

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [OT] Webapp upgrades and browser caching

2004-10-07 Thread appa rao
Hi Justin,
 
Sorry If I don't understand your question correctly, but I hope this is what you are 
looking for.   
Just add a dummy variable at the end the url. 
 
if your css file is http://www.server.com/myapp/v1/main.css, then add ?dummy=%=new 
java.util.Date().getTime()%
 
i.e., http://www.server.com/myapp/v1/main.css?dummy=%=new java.util.Date().getTime()%
 
Appa

Justin Ruthenbeck [EMAIL PROTECTED] wrote:

I'm looking for some advice about how to handle the following situation.

(1) Apache 2.x in front of Tomcat 5.x
(2) Deploy new web application. Bunch of servlets, bunch of jsps, bunch 
of static content (mainly js, css).
(3) Many users use the application, during which time their browsers 
cache lots of static content
(4) We do a major version upgrade of the webapp, including (almost) all 
new static content, but URLs stay the same (to alleviate 
bookmark-maintenance requirements).

The problem arises when the browsers continue to use their cached version 
of the static content. Now, the browsers eventually get updated, but 
immediately after deployment there are huge numbers of graphical and 
functional (js files) problems. It seems like behavior in this area is 
widely different amongst browsers and/or their settings.

I have only come up with the following option:

(1) Play with URLs. New deployments can be deployed under
a different url domain like:
http://www.server.com/myapp/v1/main.css
http://www.server.com/myapp/v2/main.css
This would force browsers to get new content since the
content appears as totally new content to the browser.

Aside from disabling static content caching, are there any other options 
out there?

Much thanks for the help!
justin




__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__


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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

RE: off-topic, need help in scrolling

2003-08-14 Thread appa rao
Have a look at this...
 
http://jsptags.com/tags/navigation/pager/index.jsp
 
appa

N.B.Bopanna [EMAIL PROTECTED] wrote:
Hey Gautham,
It is not under my control. The mail server adds it to all mails.

-Original Message-
From: Aggarwal, Gautam (IE03) 
To: Tomcat Users List 
Date: Thu, 7 Aug 2003 11:06:19 +0530
Subject: RE: off-topic, need help in scrolling

 This forum is meant for helping each other in Tomcat related problems,
 not
 for advertising your products. Please remove the advertisement footer
 from
 your mail, this will help in keeping the mail short as well.
 
 Bye,
 Gautam
 
 
 -Original Message-
 From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 07, 2003 10:12 AM
 To: [EMAIL PROTECTED]
 Subject: off-topic, need help in scrolling
 
 
 Hi All,
 I have to display rows of data after querying a table with arround 1000
 records. Only 25 rows should be displayed at a time and page numbers 
 should be provided as hyperlinks to go to the next page(as used in mail
 inbox). The server supports only JSP1.1 .
 If anyone has any idea of how to do , please help
 Bopanna,
 Software Engineer,
 RCS Technologies
 
 
 Power of Global Information Access...
 ... Browser based RCS products.
 ---
 -
 -
 Visit us at http://www.rcssoft.com/ for an online DEMO of all our web
 based
 products.
 User ID and Password will be available on request.
 
 PAYMAN - Payroll Management System
 TRAXX - Asset Management and Tracking System
 eSHOP - Online Information and Ordering System
 SALES STREAM - Sales Force Automation
 CARE - Call Management System
 DATA MINER - Query Builder and Report Generator
 
 Please write to [EMAIL PROTECTED] or reply to this mail for further
 details.
 
 
 
 -
 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]
 


Power of Global Information Access...
.. Browser based RCS products.
-
Visit us at http://www.rcssoft.com/ for an online DEMO of all our web based products.
User ID and Password will be available on request.

PAYMAN - Payroll Management System
TRAXX - Asset Management and Tracking System
eSHOP - Online Information and Ordering System
SALES STREAM - Sales Force Automation
CARE - Call Management System
DATA MINER - Query Builder and Report Generator

Please write to [EMAIL PROTECTED] or reply to this mail for further details.



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


SMS using the Yahoo! Messenger;Download latest version.

Re: How to use digital certificates

2003-06-21 Thread appa rao
HTTPS is working properly(I configured SSL properly).  I installed the root/chain cert 
in Tomcat and User certs in browser.  I set the clientauthentication to true in 
server.xml.  It is working properly.  The only thing I need is to pick the 
username/password from the user cert and authenticate.  As said, I think I'll have to 
write custom Realm.  Where can I get more information on getting the usernames from 
the certficates?

Appa
Bill Barker [EMAIL PROTECTED] wrote:
Assuming that iPlanet is sending a normal x509 chain, then it should be
mostly working. You'll have to make certain that the root-CA is installed
in cacerts (I'm assuming that you are using JSSE) so that the client-cert
can be verified. At least with the Sun JVM, I believe that only Verisign
and Thwate are installed by default.

Getting the name is a bit more of a problem. It is usually the CN of the
Subject, but not always. If this is the case with your certs, then you'll
need a custom Realm that extracts the CN and validates the user (MemoryRealm
uses the full Subject as the user-name).

appa rao wrote in message
news:[EMAIL PROTECTED]
 Thanks for the reply..
 let me clearly tell you the problem..
 we use certificates generated by iPlanet Certificate Server. All the
client(user) certificates are on a swipe card which are read by Gemplus card
reader using USB port The problem is when the user swipes it, user
should automatically be authenticated..(currently we have another web
application running on iPlanet web server - which picks up username from the
card and authenticates against LDAP). Is this possible in Tomcat? SSL is
working fine - only problem is authentication..

 Thanks
 Appa

 Bill Barker wrote:
 Ok, everyone else is signing their replies. I can do that too ;-).

 Out-of-the-box, TC 4.1.24 has very limited support for x509 auth. Only the
 (deprecated) MemoryRealm actually supports it. Also, only the Stand-Alone
 JSSE Connector will correctly retrieve the x509 certs in the current
release
 version (the Jk-Coyote Connector is fixed in the CVS, and the fixes for
the
 Stand-Alone PureTLS Connector will show up before 4.1.25 comes out).


 Mario Ivankovits wrote in message
 news:[EMAIL PROTECTED]
  I have developed a solution, where you can use client-certificates for
 user
  authentication.
 
  You can find information at
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7831
 
  Currently an implementation for Standard LDAP and Windows-2000
  ActiveDirectory is available.
  Using W2K-AD you might have troubles, since i have tested it only with
two
  different client-certificates.
 
  Mainly you have to import the certificate in your LDAP Server, and then
 the
  user-mapping is done by my JNDIRealm* classes.
 
  Mario
 
 
  - Original Message -
  From: appa rao
  To:
  Sent: Friday, June 20, 2003 7:33 AM
  Subject: How to use digital certificates
 
 
   Hi,
  
   Can any one give me an example of how to use Digital Certificates for
  authentication and authorizatioin in Tomcat? I am struggling to under
the
  concept of certificates and their use in authentication and
 authorization..
  I am using Tomcat - 4.1.24.
  
   Thanks in advance..
  
   appa
  
   SMS using the Yahoo! Messenger;Download latest version.
 
  ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s
 SMS using the Yahoo! Messenger;Download latest version.




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

SMS using the Yahoo! Messenger;Download latest version.

Re: How to use digital certificates

2003-06-20 Thread appa rao
Thanks for the reply.. 
let me clearly tell you the problem..
we use certificates generated by iPlanet Certificate Server. All the client(user) 
certificates are on a swipe card which are read by Gemplus card reader using USB 
port The problem is when the user swipes it, user should automatically be 
authenticated..(currently we have another web application running on iPlanet web 
server - which picks up username from the card and authenticates against LDAP).  Is 
this possible in Tomcat?  SSL is working fine - only problem is authentication..
 
Thanks
Appa

Bill Barker [EMAIL PROTECTED] wrote:
Ok, everyone else is signing their replies. I can do that too ;-).

Out-of-the-box, TC 4.1.24 has very limited support for x509 auth. Only the
(deprecated) MemoryRealm actually supports it. Also, only the Stand-Alone
JSSE Connector will correctly retrieve the x509 certs in the current release
version (the Jk-Coyote Connector is fixed in the CVS, and the fixes for the
Stand-Alone PureTLS Connector will show up before 4.1.25 comes out).


Mario Ivankovits wrote in message
news:[EMAIL PROTECTED]
 I have developed a solution, where you can use client-certificates for
user
 authentication.

 You can find information at
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7831

 Currently an implementation for Standard LDAP and Windows-2000
 ActiveDirectory is available.
 Using W2K-AD you might have troubles, since i have tested it only with two
 different client-certificates.

 Mainly you have to import the certificate in your LDAP Server, and then
the
 user-mapping is done by my JNDIRealm* classes.

 Mario


 - Original Message -
 From: appa rao 
 To: 
 Sent: Friday, June 20, 2003 7:33 AM
 Subject: How to use digital certificates


  Hi,
 
  Can any one give me an example of how to use Digital Certificates for
 authentication and authorizatioin in Tomcat? I am struggling to under the
 concept of certificates and their use in authentication and
authorization..
 I am using Tomcat - 4.1.24.
 
  Thanks in advance..
 
  appa
 
  SMS using the Yahoo! Messenger;Download latest version.

 ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s 
SMS using the Yahoo! Messenger;Download latest version.

How to use digital certificates

2003-06-19 Thread appa rao
Hi,
 
Can any one give me an example of how to use Digital Certificates for authentication 
and authorizatioin in Tomcat?  I am struggling to under the concept of certificates 
and their use in authentication and authorization..  I am using Tomcat - 4.1.24.
 
Thanks in advance..
 
appa

SMS using the Yahoo! Messenger;Download latest version.