Basic Action Question (I need more sets of eyes)
Hi I've been staring at this for a while and I can't see what's wrong. Maybe one of you can help me out. I'm trying to create a basic login form. The form validation part is working (comes back and tells me that uid or pw has to be entered if I neglected to) but it SEEMS that the LoginAction.execute() is not getting called. When I click login with username and password filled out, I get sent to a blank screen with minimal html. Help Could it be a problem with my deployment? Am I missing something else? Note that I do in fact have success.jsp and error.jsp in a subdirectory /pages Here are the parts that seem to not be working. This should be a really simple thing, no? I'd even send my WAR file to get some help at this point.. // * Action Class package com.blah.login; import javax.servlet.http.*; import org.apache.struts.action.*; public final class LoginAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ System.out.println(Text that is never seen); LoginForm f = (LoginForm) form; String userName=f.getUserName(); String password = f.getPassword(); // Will implement real PW checking when this is working :-( if(userName.equals(admin) password.equals(admin123)){ return (mapping.findForward(success)); }else{ return (mapping.findForward(failure)); } } } // !-Login.jsp -- %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html headtitleYale New Haven Health Services/title/head body h3YNHHS Login Page/h3 html:errors/ html:form action=login.do User Name:html:text property=userName/br Password:html:password property=password/br html:submit/ /html:form /body /html // Struts Config.xml * !-- == Form Bean Definitions -- form-beans form-bean name=loginForm type=com.ynhhs.login.LoginForm/ /form-beans !-- Action Mapping Definitions -- action-mappings !--Action Mappings for Login-- action path=/login type=com.ynhhs.login.LoginAction name=loginForm scope=request input=/login.jsp forward name=success path=/pages/success.jsp/ forward name=failure path=/pages/error.jsp/ /action /action-mappings // The weird nothing HTML page I end up at after loggin in !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML
RE: Basic Action Question (I need more sets of eyes) - ignore please.
Man, I'm obviously tired. Please ignore that email. Wrong list. Oops!
mod_ldap in Apache and it's limitations (using LDAP with Apache/tomcat)
Hi I have more information about my previous post relating to using Apache and Tomcat with LDAP. The situation is as follows. - The client is using Apache 2.x and Tomcat 5.x. - The application is a set of static HTML pages with the exception of one servlet to do some graphing functionality. - Access to the HTML directories is limited and users are validated using the mod_ldap and mod_auth_ldap module in Apache 2.x (http://httpd.apache.org/docs-2.0/mod/mod_auth_ldap.html) The problem : there are multiple LDAP Servers (that are really MS Active directory), the mod_auth_ldap module can only be configured to deal with (1) at a time, though I am not an expert at it, so please correct me if I'm wrong about this. Note: I have some Java utility classes that allow me to authenticate against AD using AD's LDAP interface. I'm looking for the simplest possible solution for this problem, as it's only a short term solution. Immediately, of course I thought of making this a Struts application, creating a simple login screen which uses my helper objects to validate the user then store the user information in the session, and making all the HTML files JSP files and checking the user's access rights before displaying the page..This would also imply that I'd no longer use the mod_auth_ldap module Thoughts? Is there a simple way of doing this (validating against multiple LDAP Servers)? Is there a mod_auth_ldap guru out there who has run into a similar situation before? Thanks John
Tomcat and Active Directory/LDAP (Multiple Domains) (LDAP Newbie)
Hi all I have a need to validate users that may exist in one of 4 Active Directory Domains for a web-app running on Tomcat 5.x/Apache 2.x. What's the best way to accomplish this? I have read the following thread -- http://www.mail-archive.com/[EMAIL PROTECTED]/msg130900.html which is a good start, but doesn't address the issue of multiple domains. I also see that the JNDI tutorial is something I should read thoroughly at -- http://java.sun.com/developer/technicalArticles/Programming/jndi/ Is there anyone who has already solved a similar problem out there or has some brilliant idea that will help me out? Thanks John
RE: Tomcat and Active Directory/LDAP (Multiple Domains) (LDAP Newbie)
Hi Tim Thanks for your input! I don't think there's a master domain, as the 4 domains are in separate business units that are only sort of logically grouped. Does my idea about multiple LDAP connections seem valid to you? Can you sort of describe your solution? John -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 1:24 PM To: Tomcat Users List Subject: Re: Tomcat and Active Directory/LDAP (Multiple Domains) (LDAP Newbie) I had to roll my own Realm loosely based on JNDIRealm. Working with Active Directory, especially the way it was deploy, was so painful that regressed most of the details. I am guessing you have 4 different domains under and more generic domain. For example: ad.funkman.net westcoast.ad.funkman.net eastcoast.ad.funkman.net europe.ad.funkman.net asia.ad.funkman.net All my userid's are unique on samaccount. So to authenticate, I ask ad.funkman.net for the user. Of course - no one reside on ad.funkman.net os it issues me a referal to one of the other domains. I follow the referral and perform the authentication. I'd show some code - but can't. I'd have to recommend google for more details on implementation. -Tim John Mattos wrote: Hi all I have a need to validate users that may exist in one of 4 Active Directory Domains for a web-app running on Tomcat 5.x/Apache 2.x. What's the best way to accomplish this? I have read the following thread -- http://www.mail-archive.com/[EMAIL PROTECTED]/msg130900.html which is a good start, but doesn't address the issue of multiple domains. I also see that the JNDI tutorial is something I should read thoroughly at -- http://java.sun.com/developer/technicalArticles/Programming/jndi/ Is there anyone who has already solved a similar problem out there or has some brilliant idea that will help me out? - 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: Setting up an environment variable in Tomcat 4.1
As a follow up question, how would I set this up if I'm using Tomcat as a Service? On the command line, I use... set CATALINA_OPTS=-Dindemand.env=C:\Tomcat4.0.6\conf\indemand_env_tomcat.properties Re: Setting up an environment variable in Tomcat 4.1 - From: Craig R. McClanahan Subject: Re: Setting up an environment variable in Tomcat 4.1 Date: Thu, 31 Oct 2002 12:06:13 -0800 - On Thu, 31 Oct 2002, John Mattos wrote: Date: Thu, 31 Oct 2002 12:00:56 -0800 (PST) From: John Mattos [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Setting up an environment variable in Tomcat 4.1 So how would I set up indemand.env as a system property? Also, yes, that's how I'm gettng it in code.Same way you set system property values for any other Java application -include them on the command line that starts Tomcat. You can do that bydefining an environment variable named CATALINA_OPTS that contains thecommand line options you want to pass to the JVM.set CATALINA_OPTS=-Dindemand.env=...Note that this is global to all webapps, and you'll need to restart Tomcatin order to change it.Craig--To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe#X0040;jakarta.apache.orgFor additional commands, e-mail: mailto:tomcat-user-help#X0040;jakarta.apache.org - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
Running Tomcat 4.0.6 as a service and proividing parameters?
Hi when I run Tomcat from a batch file, I supply the following parameters... set CATALINA_OPTS=-Dindemand.env=C:\Tomcat4.0.6\conf\indemand_env_tomcat.properties How do I do that when I'm starting Tomcat as a service? - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000
I'm getting the following error trying to connect to my SQL Server Database java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I'm using the driver com.microsoft.jdbc.sqlserver.SQLServerDriver, and the 3 necessary jar files are in C:\Tomcat4.0.6\lib (msbase.jar, msutil.jar and mssqlserver.jar) Any thoughts on this? Has anyone seen this before? John - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD
RE: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000
Hmm. I have the app specified in my server.xml as follows. dows anything jump out at you? I even used the IP instead of the DNS entry for the DB machine !-- iN DEMAND Clearinghouse Context -- Context docBase=indemand path=/indemand reloadable=true source=indemand Resource name=jdbc/indemand auth=SERVLET type=javax.sql.DataSource/ ResourceParams name=jdbc/indemand parameter nameuser/name valuetibco_user/value /parameter parameter namepassword/name valuetibco_user/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter namedriverName/name valuejdbc:inetdae7:10.10.0.84:1433?database=TibcoClearHouse/value /parameter /ResourceParams /Context Turner, John [EMAIL PROTECTED] wrote: Yup. It's network related. Probably the name of the database server can't be resolved into an IP address, or a connection request is being made on the wrong port. SQL Server's default port is 1433, I believe. John -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 12, 2002 2:48 PM To: [EMAIL PROTECTED] Subject: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000 I'm getting the following error trying to connect to my SQL Server Database java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I'm using the driver com.microsoft.jdbc.sqlserver.SQLServerDriver, and the 3 necessary jar files are in C:\Tomcat4.0.6\lib (msbase.jar, msutil.jar and mssqlserver.jar) Any thoughts on this? Has anyone seen this before? John - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD
RE: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000
Can I ask what your entry in the application's web.xml looks like? Turner, John [EMAIL PROTECTED] wrote: We're using 4.1.12, ours looks like this: type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ factory com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory driverClassName com.microsoft.jdbcx.sqlserver.SQLServerDataSource driverName SQLServer description SQL Server DataSource serverName our-server portNumber 1433 selectMethod cursor databaseName our-db-name user our-user password our-password loginTimeout3000 maxActive100 maxIdle10 maxWait50 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 12, 2002 2:55 PM To: Tomcat Users List Subject: RE: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000 Hmm. I have the app specified in my server.xml as follows. dows anything jump out at you? I even used the IP instead of the DNS entry for the DB machine reloadable=true source=indemand type=javax.sql.DataSource/ user tibco_user password tibco_user driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver driverName jdbc:inetdae7:10.10.0.84:1433?database=TibcoClearHouse Turner, John wrote: Yup. It's network related. Probably the name of the database server can't be resolved into an IP address, or a connection request is being made on the wrong port. SQL Server's default port is 1433, I believe. John -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 12, 2002 2:48 PM To: [EMAIL PROTECTED] Subject: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000 I'm getting the following error trying to connect to my SQL Server Database java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I'm using the driver com.microsoft.jdbc.sqlserver.SQLServerDriver, and the 3 necessary jar files are in C:\Tomcat4.0.6\lib (msbase.jar, msutil.jar and mssqlserver.jar) Any thoughts on this? Has anyone seen this before? John - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD
RE: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000
also, are you sure that this is correct (from your server.xml) parameter namedriverName/name valueSQLServer/value /parameter John Mattos [EMAIL PROTECTED] wrote:Can I ask what your entry in the application's web.xml looks like? Turner, John wrote: We're using 4.1.12, ours looks like this: type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ factory com.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory driverClassName com.microsoft.jdbcx.sqlserver.SQLServerDataSource driverName SQLServer description SQL Server DataSource serverName our-server portNumber 1433 selectMethod cursor databaseName our-db-name user our-user password our-password loginTimeout3000 maxActive100 maxIdle10 maxWait50 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 12, 2002 2:55 PM To: Tomcat Users List Subject: RE: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000 Hmm. I have the app specified in my server.xml as follows. dows anything jump out at you? I even used the IP instead of the DNS entry for the DB machine reloadable=true source=indemand type=javax.sql.DataSource/ user tibco_user password tibco_user driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver driverName jdbc:inetdae7:10.10.0.84:1433?database=TibcoClearHouse Turner, John wrote: Yup. It's network related. Probably the name of the database server can't be resolved into an IP address, or a connection request is being made on the wrong port. SQL Server's default port is 1433, I believe. John -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Tuesday, November 12, 2002 2:48 PM To: [EMAIL PROTECTED] Subject: JDBC Error, cannot establish socket - Tomcat 4.0.6/SQL Server 2000 I'm getting the following error trying to connect to my SQL Server Database java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I'm using the driver com.microsoft.jdbc.sqlserver.SQLServerDriver, and the 3 necessary jar files are in C:\Tomcat4.0.6\lib (msbase.jar, msutil.jar and mssqlserver.jar) Any thoughts on this? Has anyone seen this before? John - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD
What's wrong with my Context in my Server.xml???
All, I have no idea why this isn't working. Suggestions? !-- indemand Context -- Context docBase=indemand path=/indemand reloadable=true source=indemand Resource name=jdbc/indemand auth=SERVLET type=javax.sql.DataSource/ ResourceParams name=jdbc/indemand parameter nameusername/name valuetibco_user/value /parameter parameter namepassword/name valuetibco_user/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse/value /parameter /ResourceParams /Context - Do you Yahoo!? U2 on LAUNCH - Exclusive medley videos from Greatest Hits CD
JDBC Error with Tomcat 4.0.6
All, I need a little help with this one. I'm porting an app to Tomcat 4.0.6 from WebSphere 4.03 and I'm getting a JDBC Error, java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I've included a bit about my app to see if anyone can help me figure out where my misconfiguration is. Am I using the right driver for SQL Server 2000? (I'm using msutil.jar, mssqlserver.jar and msbase.jsr, the native drivers) Should I be using a different class? Is my JDBC URL not formed properly? I guess I need help from a SQL Server/Tomcat guru... Thanks! John Server.xml file snippet : ResourceParams name=jdbc/indemand parameter namevalidationQuery/name valueselect top 100 * from Subscriber/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse/value /parameter parameter namepassword/name valuetibco_pass/value /parameter parameter namemaxActive/name value12/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value /parameter parameter nameusername/name valuetibco_user/value /parameter /ResourceParams Web.xml file snippet: resource-ref descriptionDB Connection/description res-ref-namejdbc/indemand/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Partial Stack trace: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.init(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnectionPool.java:174) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionForTibco(ConnectionFactory.java:59) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(ConnectionFactory.java:40) at com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(DatabaseUtility.java:123) - Do you Yahoo!? HotJobs - Search new jobs daily now
Re: JDBC Error with Tomcat 4.0.6
anyone? All, I need a little help with this one. I'm porting an app to Tomcat 4.0.6 from WebSphere 4.03 and I'm getting a JDBC Error, java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. I've included a bit about my app to see if anyone can help me figure out where my misconfiguration is. Am I using the right driver for SQL Server 2000? (I'm using msutil.jar, mssqlserver.jar and msbase.jsr, the native drivers) Should I be using a different class? Is my JDBC URL not formed properly? I guess I need help from a SQL Server/Tomcat guru... Thanks! John Server.xml file snippet : validationQuery select top 100 * from Subscriber url jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse password tibco_pass maxActive 12 maxWait 5000 driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver username tibco_user Web.xml file snippet: DB Connection jdbc/indemand javax.sql.DataSource Container Partial Stack trace: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnectionPool.java:174) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionForTibco(ConnectionFactory.java:59) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(ConnectionFactory.java:40) at com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(DatabaseUtility.java:123) - Do you Yahoo!? HotJobs - Search new jobs daily now - Do you Yahoo!? HotJobs - Search new jobs daily now
Strange JDBC Error
I'm using a JDBC Datasource with Tomcat 4.1.12 as follows. Server.xml snippet: Resource name=jdbc/indemand scope=Shareable type=javax.sql.DataSource/ ResourceParams name=jdbc/indemand parameter namevalidationQuery/name valueselect top 100 * from Subscriber/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse/value /parameter parameter namepassword/name valuetibco_user/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter nameusername/name valuetibco_user/value /parameter parameter namemaxIdle/name value2/value /parameter /ResourceParams END OF Server.xml Snippet When I cause a database access within my application, I get the following horrifying result. It's the Error Establishing Socket error that's worrying me, as I'm using the native Microsoft SQL Server Drivers. The ones in my lib directory are msutil.jar, msutil.jar, and mssqlserver.jar Any thoughts? John java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.init(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnectionPool.java:174) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionForTibco(ConnectionFactory.java:59) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(ConnectionFactory.java:40) at com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(DatabaseUtility.java:123) at com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUserNamePassword(UserProfileService.jav a:16) at com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(LogonAction.java:48) at com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(AbstractAction.java:38) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:437) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:264) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at
RE: Strange JDBC Error
Yes, as follows resource-ref descriptionClearinghouse DB Connectio/description res-ref-namejdbc/indemand/res-ref-name res-typecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/res-type res-authContainer/res-auth /resource-ref Hari Venkatesan [EMAIL PROTECTED] wrote:Did you define the datasource in web.xml? ? Hari Venkatesan Performance Food Group Phone : 804 484 6263 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: Friday, November 01, 2002 3:52 PM To: Tomcat Users List Subject: Strange JDBC Error I'm using a JDBC Datasource with Tomcat 4.1.12 as follows. Server.xml snippet: type=javax.sql.DataSource/ validationQuery select top 100 * from Subscriber url jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse password tibco_user maxActive 10 maxWait 5000 driverClassName com.microsoft.jdbcx.sqlserver.SQLServerDataSource username tibco_user maxIdle 2 END OF Server.xml Snippet When I cause a database access within my application, I get the following horrifying result. It's the Error Establishing Socket error that's worrying me, as I'm using the native Microsoft SQL Server Drivers. The ones in my lib directory are msutil.jar, msutil.jar, and mssqlserver.jar Any thoughts? John java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Error establishing socket. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSConnection.(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:140) at com.thoughtworks.util.pool.JDCConnectionPool.getConnection(JDCConnection Pool.java:174) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnectionFo rTibco(ConnectionFactory.java:59) at com.thoughtworks.clearinghouse.util.ConnectionFactory.createConnection(C onnectionFactory.java:40) at com.thoughtworks.clearinghouse.util.DatabaseUtility.getUserByName(Databa seUtility.java:123) at com.thoughtworks.clearinghouse.web.service.UserProfileService.validateUs erNamePassword(UserProfileService.jav a:16) at com.thoughtworks.clearinghouse.web.servlet.LogonAction.actionExecuted(Lo gonAction.java:48) at com.thoughtworks.clearinghouse.web.servlet.AbstractAction.execute(Abstra ctAction.java:38) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:437) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 264) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239 6) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995
Setting up an environment variable in Tomcat 4.1
Strange. I've set up the envieonment variable needed for my app as follows Environment description=Clearinghouse Environment Variable name=indemand.env override=true type=java.lang.String value=c:\tomcat4.1\indemand_env_tomcat.properties/ I feel like that means it's set up. When I run the app, I get the message... indemand.env system property has not been defined What's wrong with this picture? Am I missing something? John John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now
Setting up an InitialContextFactory in a properties file...
Hi, I'm porting my application from Websphere to Tomcat, and I have a websphere properties file that contains the following line Dbase.websphere.initial.context.factory : com.ibm.websphere.naming.WsnInitialContextFactory What is the equivalent class to use in Tomcat? John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now
Re: Setting up an environment variable in Tomcat 4.1
So how would I set up indemand.env as a system property? Also, yes, that's how I'm gettng it in code. Craig R. McClanahan [EMAIL PROTECTED] wrote: On Thu, 31 Oct 2002, John Mattos wrote: Date: Thu, 31 Oct 2002 11:36:33 -0800 (PST) From: John Mattos Reply-To: Tomcat Users List , [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Setting up an environment variable in Tomcat 4.1 Strange. I've set up the envieonment variable needed for my app as follows name=indemand.env override=true type=java.lang.String value=c:\tomcat4.1\indemand_env_tomcat.properties/ I feel like that means it's set up. When I run the app, I get the message... indemand.env system property has not been defined Environment variables are *not* system properties. Indeed, system properties would not be a good choice for things like this, because they are global to an entire Tomcat installation, while environment variables are specific to a webapp. What's wrong with this picture? Am I missing something? How are you trying to retrieve this value? You should be doing something like: InitialContext ic = new InitialContext(); String value = (String) ic.lookup(java:comp/env/indemand.env); John Craig -- To unsubscribe, e-mail: For additional commands, e-mail: John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now
Testing Datasources
Is there as easy way to test datasources I set up in server.xml (or in the Administrator app)? John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now
RE: Testing Datasources
Ah... interesting. No, I can't see them loading, but they're set up at the app and global level. Why wouldn't they be loading? Here's a snippet from server.xml ResourceParams name=jdbc/indemand parameter namevalidationQuery/name valueselect top 100 * from Subscriber/value /parameter parameter nameurl/name valuejdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse/value /parameter parameter namepassword/name valuetibco_user/value /parameter parameter namemaxActive/name value12/value /parameter parameter namemaxWait/name value5000/value /parameter parameter namedriverClassName/name valueC:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserver.jar;C:\Tomcat4.1\common\lib\msutil.jar;/value /parameter parameter nameusername/name valuetibco_user/value /parameter /ResourceParams Thoughts? [EMAIL PROTECTED] wrote:Where do you setup your datasource? If Global or default context, you should be able to see JNDI reference loading when you start your tomcat. Regards, Phillip Qin Software Developer Canadian Shareowner 121 Richmond Street W, 7th Floor Toronto, ON M5H 2K1 (416) 595-9600 ext 291 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: October 31, 2002 3:33 PM To: Tomcat Users List Subject: Testing Datasources Is there as easy way to test datasources I set up in server.xml (or in the Administrator app)? John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now - Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost
Re: Testing Datasources
Ah! Thank you! Good catch. Alright 2 more dumb questions (I'm not above that) in web xml, the resource-ref is... resource-ref descriptionDB Connection/description res-ref-namejdbc/indemand/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Correct? Also, the db url I'm using is... jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHouse and I'm wondering if that's in the right format... Thanks John shawn [EMAIL PROTECTED] wrote:driverClassName is : com.microsoft.jdbc.sqlserver.SQLServerDriver driverClassName com.microsoft.jdbc.sqlserver.SQLServerDriver Not : C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserver.jar;C:\Tomcat4.1\common\lib\msutil.jar these need to be somewhere in your classpath Also do not forget the resource-ref in web.xml On Thursday 31 October 2002 01:49 pm, John Mattos wrote: Ah... interesting. No, I can't see them loading, but they're set up at the app and global level. Why wouldn't they be loading? Here's a snippet from server.xml validationQuery select top 100 * from Subscriber url jdbc:microsoft:sqlserver://vc34:1433;databaseName=TibcoClearHousealue password tibco_user maxActive 12 maxWait 5000 driverClassName C:\Tomcat4.1\common\lib\msbase.jar;C:\Tomcat4.1\common\lib\mssqlserv er.jar;C:\Tomcat4.1\common\lib\msutil.jar; username tibco_user Thoughts? [EMAIL PROTECTED] wrote:Where do you setup your datasource? If Global or default context, you should be able to see JNDI reference loading when you start your tomcat. Regards, Phillip Qin Software Developer Canadian Shareowner 121 Richmond Street W, 7th Floor Toronto, ON M5H 2K1 (416) 595-9600 ext 291 -Original Message- From: John Mattos [mailto:mattosj;yahoo.com] Sent: October 31, 2002 3:33 PM To: Tomcat Users List Subject: Testing Datasources Is there as easy way to test datasources I set up in server.xml (or in the Administrator app)? John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws - Do you Yahoo!? HotJobs - Search new jobs daily now - Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost -- To unsubscribe, e-mail: For additional commands, e-mail: - Do you Yahoo!? HotJobs - Search new jobs daily now