Re: Standard SSL question
I have done something similar.. by checking the start of the String returned by request.getHeader(host) And do a response.semdRedirect to the secure version of the page. if(!request.getHeader(host).startsWith(https:)) response.sendRedirect(https://www.domain.com/securePage.jsp;); Or you can redirect to an error page.. and have it META REFRESH and link to the secure version. Hope that helps. Cj Steve Mactaggart wrote: Hello all, I need to make it that certain pages on the site are accessed via SSL, is there a way in tomcat to reject the connection of http to a specific page (ie securePage.jsp) but still allow http access to other pages (ie. standardPage.jsp). Pages like login, CC submission etc.. need to be secure and I want to make sure that they are always accessed via SSL. Hope there's an answer.. Steve Mactaggart Senior Java Developer / Team Leader 303 Sport BH: 9620 7477 FAX 9620 7377 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- corey a. johnson cni 1.321.259.1984 1.800.264.5547 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Standard SSL question
man.. i really need to read ALL of the API docs... :) Cj Brian Adams wrote: actually you can just use request.isSecure(); it is built in to ServletRequest :) -Original Message- From: Corey A. Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 5:55 PM To: Tomcat Users List Subject: Re: Standard SSL question I have done something similar.. by checking the start of the String returned by request.getHeader(host) And do a response.semdRedirect to the secure version of the page. if(!request.getHeader(host).startsWith(https:)) response.sendRedirect(https://www.domain.com/securePage.jsp;); Or you can redirect to an error page.. and have it META REFRESH and link to the secure version. Hope that helps. Cj Steve Mactaggart wrote: Hello all, I need to make it that certain pages on the site are accessed via SSL, is there a way in tomcat to reject the connection of http to a specific page (ie securePage.jsp) but still allow http access to other pages (ie. standardPage.jsp). Pages like login, CC submission etc.. need to be secure and I want to make sure that they are always accessed via SSL. Hope there's an answer.. Steve Mactaggart Senior Java Developer / Team Leader 303 Sport BH: 9620 7477 FAX 9620 7377 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- corey a. johnson cni 1.321.259.1984 1.800.264.5547 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- corey a. johnson cni 1.321.259.1984 1.800.264.5547
ServerName
Hello all, Does anyone know how to control what is returned by the method: request.getServerName(); The site is hosted with a ISP.. with other sites on the same server... And the above method returns what is set via the Apache directive: ServerName And i need to be able to detect what URL was used to access the page... and make routing decisions based on the info.. Since i have about 10 domains that point to the same virtual server Does any one have any ideas on how i can detect what URL was used? In the index.jsp that is all the sites home page? Thanks in advance... Cj -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Null refrenece from Lookup
can you send a code snippet? are you setting a SearchControl? Did you specify the scope of your search? Cj Sri K Ganjam wrote: Hi, I created a DataSource JNDI resource. The resource is successfully binded into the tree. but I am getting null reference when I try to lookup. can anyone help me out Regards, Sri K Ganjam -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Why am I getting a Javascript file instead of my servlet ?
Sounds like you may have a: script language=JavaScript src=filename.js statement in your returned HTML code.. and the .js file can not be found... hope that helps. Cj James Adams wrote: I have a page (JSP) which contains a form with a servlet as the action of the form. However whenever I submit the form I am getting a Not Found 404 error telling me that a Javascript file which is used for Javascript on the page is not found. I am perplexed as to why this is happening, especially since the Javascript is working as it should. I should instead be forwarded to the servlet which will handle the form parameters. Can anyone suggest ways to find out what is going wrong ? Thanks in advance for any suggestions... -James -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Solaris Problem
Here you go. Solaris 2.7 SPARC Tomcat 3.2 JDK 1.2.2 and Solaris 2.7 intel Tomcat 3.2 JDK 1.3 Cj Roy K. Mayr R. wrote: Hi, I would like to know if anyone out there is successfully using Tomcat with Solaris and if so what version of Solaris and what jdk version. Thanks Roy -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: User IP Address
one thing to note that i discovered the hard way.. referrer should be spelled as so: request.getHeader(referer) not sure why... but i beat my head against the wall for an hour... until i tried the alternate spelling... Cj Randy Layman wrote: request.getRemoteAddr() will get the user's IP Address requet.getRemoteHost() will do DNS lookup on the address request.getHeader(Referrer) is the referrer, I believe. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 10:55 AM To: [EMAIL PROTECTED] Subject: RE: User IP Address Should be able to query the HTTPServletRequest object to get this information, try looking there -Original Message- From: Mark Muffett [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 9:50 AM To: [EMAIL PROTECTED] Subject: User IP Address Anyone know if it's possible to use JSP / Tomcat to get user IP addresses (for logging)? - or any other user info that might go to the server (like referrer)? Ideas and sample code would be very welcome... Thanks Mark -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: User IP Address
case matters as well i believe.. Cj Randy Layman wrote: Does the case matter here, or just dropping the r? Randy -Original Message- From: Corey A. Johnson [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 11:58 AM To: [EMAIL PROTECTED] Subject: Re: User IP Address one thing to note that i discovered the hard way.. referrer should be spelled as so: request.getHeader(referer) not sure why... but i beat my head against the wall for an hour... until i tried the alternate spelling... Cj Randy Layman wrote: request.getRemoteAddr() will get the user's IP Address requet.getRemoteHost() will do DNS lookup on the address request.getHeader(Referrer) is the referrer, I believe. Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 10:55 AM To: [EMAIL PROTECTED] Subject: RE: User IP Address Should be able to query the HTTPServletRequest object to get this information, try looking there -Original Message- From: Mark Muffett [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 9:50 AM To: [EMAIL PROTECTED] Subject: User IP Address Anyone know if it's possible to use JSP / Tomcat to get user IP addresses (for logging)? - or any other user info that might go to the server (like referrer)? Ideas and sample code would be very welcome... Thanks Mark -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: JSP website hosting ?
plugmy company offers JSP/J2EE hosting./plug we use Sun SPARC systems, Apache/TOMCAT and jBoss. Dedicated instance of TOMCAT... ;-) Cj SIMONIN Alexandre wrote: Hi, My apologies if this may not be the ideal place for such question... I'm looking for a company which could host two sites written in JSP ? One site has a .fr extension and the other a .com. Any suggestions ? Thanks in advance Alexandre -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: Tomcat providers
shameless plug The company i work for offers JSP/Servlet/EJB hosting... all accounts get dedicated JVM and TOMCAT instance... we use Sun SPARC Servers.. and we offer LDAP/MySQL/MSSQL7/JBoss access as well... http://www.cniweb.net/ /shameless plug ;-) Sachin Phatak wrote: Hi! Cristoph You could check out www.podc.com thanks sachin - Original Message - From: Christoph Rooms [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 2:22 AM Subject: Tomcat providers Hi, I'm looking for a host firm that will host my site and my java servlet. (tomcat ?) Do you guys have got any good references ? I'm not a bussiness so I'm not looking for an expensive solution :))) thanks ! Christoph -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: File Upload
i 2nd that. no problem at all. with binary and ascii data. post a code snippet. Simon Chatfield wrote: I'm using that package as well, but have never had the problem you're describing. All datatypes work fine. Fabien Modoux wrote: Hello, I am using Tomcat with Apache on Linux. I am using the OReilly package to upload files through a servlet, but it only works for text files. I found several messages in the archive about that, but haven't been able to find a good solution. Does anyone know how to go around or fix this problem. Thanks, -Fabien -- Simon Chatfield VP, Software Development Inteflux Inc. -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984
Re: tomcat not working totally...
What JDK version do you have installed? It looks to me like the file tools.jar is not in your CLASSPATH. Should be located in JAVA_HOME/lib Let me know if that helps. Cj Andrew Y Ng wrote: Hi, I'm new to tomcat, I am running NetBSD 1.4.1 (sorry, no time to upgrade) on i386, with the apache-1.3.17.1 package. I installed the jakarta-tomcat-3.1.1 binary package and ran the startup script. I tried out the JSP and servlet examples and some of them did not work, I suspect it's a CLASSPATH problem but after looking at the tomcat.sh script, i think all i need is JAVA_HOME to be set right, and the script sets CLASSPATH so at least JSP and servlet engines would run. If you guys can take a look at http://guadalupe.rem.cmu.edu:8080 and give me ideas as to what's wrong, i'd really appreciate that. I have a feeling that this is something trivial and you guys have probably seen this many times. Thanks! /ayn -- Andrew Y Ng | [EMAIL PROTECTED] | http://andrew.Ngbert.org/ -- (-) please finger [EMAIL PROTECTED] if u need more info... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: tomcat not working totally...
Yep. That will do it. Grab JDK 1.2.. That will take care of your problem. Cj Andrew Y Ng wrote: java -version gives me: java version "1.1.6" there is not a tools.jar anywhere, maybe i need to update my JDK? /ayn On Tue, 27 Feb 2001, Corey A. Johnson wrote: What JDK version do you have installed? It looks to me like the file tools.jar is not in your CLASSPATH. Should be located in JAVA_HOME/lib Let me know if that helps. Cj Andrew Y Ng wrote: Hi, I'm new to tomcat, I am running NetBSD 1.4.1 (sorry, no time to upgrade) on i386, with the apache-1.3.17.1 package. I installed the jakarta-tomcat-3.1.1 binary package and ran the startup script. I tried out the JSP and servlet examples and some of them did not work, I suspect it's a CLASSPATH problem but after looking at the tomcat.sh script, i think all i need is JAVA_HOME to be set right, and the script sets CLASSPATH so at least JSP and servlet engines would run. If you guys can take a look at http://guadalupe.rem.cmu.edu:8080 and give me ideas as to what's wrong, i'd really appreciate that. I have a feeling that this is something trivial and you guys have probably seen this many times. Thanks! /ayn -- Andrew Y Ng | [EMAIL PROTECTED] | http://andrew.Ngbert.org/ -- (-) please finger [EMAIL PROTECTED] if u need more info... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Andrew Y Ng | [EMAIL PROTECTED] | http://andrew.Ngbert.org/ -- (-) please finger [EMAIL PROTECTED] if u need more info... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: JDBC Connection Pooling
sure does. you need a pool manager i believe though. check out: http://www.codestudio.com/PoolMan/index.shtml Cj "Nazzaro, Mark (Mark)" wrote: Does anyone know if Tomcat supports JDBC connection Pooling similar to WebSphere? Any information would be appreciated. Thank you, Mark Nazzaro eAssociate Lucent Technologies (908) 559-6105 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
MySQL JDBC Driving problems
Hello all, I have a weird problem... that hopefully is simple... I have a servlet that is function fine on an older Apache/Linux/Jserv box.. The servlet simply adds a record to a MySQL DB. I moved the servlet to my Tomcat installation... and i keep getting Exceptions when trying to access the MySQL DB server... I have placed the twz1 MySQL drivers in my CLASSPATH... but i get the following two errors... in my tomcat.log: The first time the servlet executes, i get: java.lang.VerifyError: (class: twz1/jdbc/mysql/jdbcMysqlBase, method: isMultiple Query signature: (Ltwz1/jdbc/mysql/jdbcMysqlConnex;)Z) Illegal use of nonvirtual function call at twz1.jdbc.mysql.jdbcMysqlDriver.init(jdbcMysqlDriver.java) And then, each subsequent time (until i restart tomcat) i get: Context log: path="" Error in Watch service() : twz1/jdbc/mysql/jdbcMysqlDriver java.lang.NoClassDefFoundError: twz1/jdbc/mysql/jdbcMysqlDriver at java.lang.Class.forName0(Native Method) So it does seem to find the driver.. based on the first message... This is driving me crazy... i must be totally missing something... and again, it works fine on the old Jserv install... Any insight would be truly appreciated.. Thanks in advance, Cj -- Corey A. Johnson Creative Network Innovations http://www.cniweb.net/ 1-800-CNi-5547 ** 1-321-259-1984