Re: Fwd: J2EE on Mac

2009-02-22 Thread Edoardo Panfili
Mighty Tornado ha scritto: Hi, I installed Tomcat on my mac OS X and it's running. I also have Eclipse Europa. Now I don't think I have J2EE installed - How do I do it? You can download different eclipse packages, "Eclipse IDE for Java EE Developers" is more comfortable. I went to Sun's web

Re: Fwd: J2EE on Mac

2009-02-22 Thread Edoardo Panfili
Mighty Tornado ha scritto: Hi, I installed Tomcat on my mac OS X and it's running. I also have Eclipse Europa. Now I don't think I have J2EE installed - How do I do it? You can download different eclipse packages, "Eclipse IDE for Java EE Developers" is more comfortable. I went to Sun's web

how to make more than one web applications run without context root name on tomcat (Virtual hosting)

2009-02-22 Thread sweta bachhety
I am trying to configure my server(tomcat 5.5.26) in a way that i can access two applications without mentioning their context name. I have googled for it and done the following configuration in my server.xml I have two application, App1 and App2 now i want that both should run with out contex

Fwd: J2EE on Mac

2009-02-22 Thread Mighty Tornado
Hi, I installed Tomcat on my mac OS X and it's running. I also have Eclipse Europa. Now I don't think I have J2EE installed - How do I do it? I went to Sun's website and it gave me an archive with GlassFish which I don't need. Can somebody please tell me where I can download the latest J2EE for Ma

Re: Authenticating Users

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, Wow. On 2/22/2009 8:52 PM, Martin Gainty wrote: >> Alan Chaney wrote: >> >> To summarize >> >> 1. password be case insensitive [I may be able to talk them out of this] > MG>handled from java.lang.String toUpperCase/toUpperCase > http://java.s

Re: How to close open connections after application stop?

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, On 2/22/2009 10:26 AM, Martin Gainty wrote: > catch (SQLException sqlEx) > { > try > { > resultset.close(); > statement.close(); > connection.close(); > } It's kind of silly to call close() on all thes

RE: Authenticating Users

2009-02-22 Thread Martin Gainty
> > Martin Gainty wrote: > > Which specific attributes are you seeking that are not in DataSourceRealm? > > >dataSourceName="jdbc/authority" > >userTable="users" userNameCol="user_name" userCredCol="user_pass" > >userRoleTable="user_roles" roleNameCol="role_name"/> > > http://tomcat.

Re: Authenticating Users

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan, On 2/22/2009 4:47 PM, Alan Chaney wrote: > From my point of view, as I don't use hashed passwords at the moment the > easiest thing to do is to modify the DataSourceRealm as suggested by > Mark Thomas. However, I think that the ability to extend

Re: Getting the tomcat server IP

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yuval, On 2/21/2009 1:44 PM, Yuval Perlov wrote: > Also, from the socket object you can always call > socket.getLocalAddress() on an outgoing connection. This is useful if > you want to make sure you are getting the IP for a particular network. Aren'

Re: Authenticating Users

2009-02-22 Thread Alan Chaney
Martin Gainty wrote: Which specific attributes are you seeking that are not in DataSourceRealm? http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm ? To summarize I (or,actually my "marketing dept') have the following requirements. 1. password be case insensitive [I

RE: Authenticating Users

2009-02-22 Thread Martin Gainty
Which specific attributes are you seeking that are not in DataSourceRealm? http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#DataSourceRealm ? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates

Re: Authenticating Users

2009-02-22 Thread Alan Chaney
Gregor Schneider wrote: To the OP: 1. May I ask what database it is you're using? Postgres - but a more general solution would be nice. 2- I'd go for the following solution: Create a JSP-page accepting the credentials. The username should be converted to uppercase. The password should be l

Re: Authenticating Users

2009-02-22 Thread Robert Koberg
(function() { var doLogin = function() { var uname = doc.byId("name").toLowerCase(); var passw = doc.byId("password").toLowerCase(); //var digest = sha1.digest(uname + ":My Realm:" + passw); xhr.send(...); } return { login: function() { doLogin(); return false

Re: Authenticating Users

2009-02-22 Thread Gregor Schneider
To the OP: 1. May I ask what database it is you're using? 2- I'd go for the following solution: Create a JSP-page accepting the credentials. The username should be converted to uppercase. The password should be left as is so that case-sensivity here is maintained. Don't know if I'm missing some

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Mark Thomas ha scritto: Edoardo Panfili wrote: Using this code in destroy() method of a servlet marked as 1 Yep - that is the sort of code you'd need. Using a context listener would be a better solution as Tomcat is free to call destroy() on your Servlet whenever it likes. Thank again (to you

Re: How to close open connections after application stop?

2009-02-22 Thread Mark Thomas
Edoardo Panfili wrote: > Using this code in destroy() method of a servlet marked as > 1 Yep - that is the sort of code you'd need. Using a context listener would be a better solution as Tomcat is free to call destroy() on your Servlet whenever it likes. Mark ---

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Alan Chaney ha scritto: I don't think so. Let me recap your problem: When you undeploy an application from tomcat (using the DBCP pooling mechanism) you can't make STRUCTURAL changes to the database because it complains that connections are still in use. This is exactly what one would expect

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Alan Chaney ha scritto: Edoardo wrote I have resultset.close(); statement.close(); connection.close(); in my code. and connection = dataSource.getConnection(); seems very close to my ambiente = (Context) new InitialContext().lookup("java:comp/env"); pool = (DataSource) ambiente.look

Re: How to close open connections after application stop?

2009-02-22 Thread Alan Chaney
Edoardo wrote I have resultset.close(); statement.close(); connection.close(); in my code. and connection = dataSource.getConnection(); seems very close to my ambiente = (Context) new InitialContext().lookup("java:comp/env"); pool = (DataSource) ambiente.lookup("jdbc/myApp); Connec

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Martin Gainty ha scritto: javax.sql.DataSource dataSource ; java.sql.Connection connection; java.sql.Statement statement; java.sqlResultset resultSet; code.. try{ connection = dataSource.getConnection(); statement = connection.prepareStatement("SELECT FU FROM BAR"); resul

RE: How to close open connections after application stop?

2009-02-22 Thread Martin Gainty
javax.sql.DataSource dataSource ; java.sql.Connection connection; java.sql.Statement statement; java.sqlResultset resultSet; code.. try { connection = dataSource.getConnection(); statement = connection.prepareStatement("SELECT FU FROM BAR");

Re: Authenticating Users

2009-02-22 Thread Alan Chaney
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, I was the OP on this one. Mark just made a couple of suggestions. On 2/21/2009 4:06 PM, Mark Thomas wrote: 5. Patch DataSourceRealm 6. Make case sensitivity configurable and contribute your patch back to th

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Edoardo Panfili ha scritto: Mark Thomas ha scritto: Edoardo Panfili wrote: Hy, I have one webapp in Tomcat 6.0.18 with this context: After application stop (using tomcat manager) I'd like to (drastic example) rename the db, but I can't do it because there are open connections. There ar

Re: How to close open connections after application stop?

2009-02-22 Thread Mark Thomas
Edoardo Panfili wrote: > Mark Thomas ha scritto: >> Edoardo Panfili wrote: >>> Hy, >>> >>> I have one webapp in Tomcat 6.0.18 with this context: >>> >>> >>> >> type="javax.sql.DataSource" >>> maxActive="8" maxIdle="5" maxWait="300" >>> username="myApp" password="passwd" >>>

Re: How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Mark Thomas ha scritto: Edoardo Panfili wrote: Hy, I have one webapp in Tomcat 6.0.18 with this context: After application stop (using tomcat manager) I'd like to (drastic example) rename the db, but I can't do it because there are open connections. There are no other application using

Re: very slow class loading on initial JSP/servlet request after restart

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sam, On 2/20/2009 6:44 PM, Sam Hokin wrote: > Thanks, Chris. I ran e2fsck with the -c option, which runs badblocks, > when I tested it earlier. And I just ran badblocks again - 0 bad blocks > found. Did you run badblocks on the array, or on an indi

Re: Record and simulate a web app

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Taylan, On 2/22/2009 8:26 AM, Taylan Develioglu wrote: > Guys, I've been following this thread for a while now, but doesn't > Jmeter already do what you're trying to accomplish here? No. We're not trying to reply requests to the server. We're trying

Re: Authenticating Users

2009-02-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 2/21/2009 4:06 PM, Mark Thomas wrote: > 5. Patch DataSourceRealm > > 6. Make case sensitivity configurable and contribute your patch back to > the ASF. 7. Use securityfilter to write your realm, and not be tied to Tomcat. 8. Many databases

RE: IIS6, Tomcat 6.0, ISAPI redirector 1.2.27 - no log on one server

2009-02-22 Thread Martin Gainty
Rick To redirect requests to a program1. In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties. 2. Click the Home Directory, Virtual Directory, or Directory tab. 3. Under The content for this source should come from, click A re

Re: How to close open connections after application stop?

2009-02-22 Thread Mark Thomas
Edoardo Panfili wrote: > Hy, > > I have one webapp in Tomcat 6.0.18 with this context: > > > type="javax.sql.DataSource" > maxActive="8" maxIdle="5" maxWait="300" > username="myApp" password="passwd" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresq

RE: Record and simulate a web app

2009-02-22 Thread Taylan Develioglu
Guys, I've been following this thread for a while now, but doesn't Jmeter already do what you're trying to accomplish here? I've used jmeter's proxy to record and replay http requests/responses before with success. Or am I missing something here? Here's a link to some instructions : http://jakar

How to close open connections after application stop?

2009-02-22 Thread Edoardo Panfili
Hy, I have one webapp in Tomcat 6.0.18 with this context: After application stop (using tomcat manager) I'd like to (drastic example) rename the db, but I can't do it because there are open connections. There are no other application using myApp db, but with "ps ax" I can see: 189 ?