Re: Opinions on detecting browser type for WML vs. HTML
Hi, You could also check the accept request header for an explicit mention of wml, which should only be present in a WAP/WML browser. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Servlets and JSP Error Pages
Hi, Is there a way to route exceptions thrown in servlets to a JSP error page? Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: Cookies.
Hi, [EMAIL PROTECTED] said: : I am sending a cookie of 6402 bytes from Internet Explorer to tomcat, : but tomcat tell's me that the received length is 5095 bytes ? : The data is a very simple strings (comma separated values) the strings : are escaped/unescaped before sending. You're trying to put too much data into the cookie. With anything more than a few bytes (>128 or so, in my experience), you're better off storing the information locally and passing the user some sort of key that you can use to retrieve that information for them. As I recall, the 'original' Netscape cookie spec limited the size of the data being passed in cookies to 4K, but I can't find the spec on Netscape's web site any more Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: JDBC Connection Pool Theory ??
Hi Jon, [EMAIL PROTECTED] said: : What I want to know is how much of a difference connection pooling : really makes? My application isn't taking a lot of hits, so, maybe if : it was, I would notice the difference, but, right now, I see no need : to use connection pooling. : Jon Part of the reason behind connection pooling is simply that building a connection to the database can be quite expensive (in terms of time), so in order to make your application appear more responsive, having a pool of pre-built connections which you can use right away makes the overall response time that much shorter, since each request isn't going through the effort of building (and, at the end, tearing down) the database connection. It's entirely possible that you feel that the responsiveness of your application is adequate at the moment, if you're not getting a lot of traffic, that's certainly reasonable. It's just that the facility is there, should your application's user base grow to the point where you need it. No one's holding a gun to your head and insisting that you should use it. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: File not readable
Hi, Any chance that Apache/Tomcat is running under a different (i.e., less privileged) user than your user id, and thus not able to read the file? Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: Accessing certificate from servlet
Hi, I've gotten this working before, using Apache 1.3.19 and the corresponding, earlier version of mod_ssl, but the rest of my configuration is the same. One thing that I don't see is the 'SSLVerifyClient require' directive in your httpd.conf. I don't think that Apache actually prompts the client for a certificate unless that's present. Are you being prompted to select the certificate to use? My configuration looks essentially like yours, but with a couple of differences: Alias /ttest "/usr/local/jakarta-tomcat-3.2.1/webapps/ttest/" Options Indexes SSLRequireSSL SSLOptions +StdEnvVars +ExportCertData +StrictRequire SSLVerifyClient require SSLVerifyDepth 1 This is all in my mod_jk.conf file, but the location shouldn't make a difference. I am requiring SSL in the /ttest directory, and SSL with a Client Certificate in the /ttest/login directory. Netscape does prompt me to specify the certificate to use for authentication since I have more than one available. The SSLVerifyDepth directive (set to 1) is appropriate in my situation, where I am using certificates generated by a local CA (done with OpenSSL), but may not be appropriate for other purposes -- you'll probably want to verify what exactly you need with someone who's a bit more security-issue-literate than I am before doing anything serious. The reason for all the stuff is that the server is sometimes brought up without SSL support for testing (this is a development server, not a live one). Brendan : Hi! : I have Apache 1.3.20 + mod_ssl 2.8.4 + Tomcat 3.2.1, using Ajp13 with : mod_jk. : From a servlet I need to access the SSL environment variable containing : information about the certificate sent by the client's browser : (SSL_CLIENT_CERT). Although I seem to have all the necessary configuration : lines in place nothing seems to work. For instance, I have the following : lines in httpd.conf: : : : - : SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire : : SSLOptions +StdEnvVars +ExportCertData : : : SSLOptions +StdEnvVars +ExportCertData : : : AddModule mod_jk.c : : : JkExtractSSL On : JkHTTPSIndicator HTTPS : JkSESSIONIndicator SSL_SESSION_ID : JkCIPHERIndicator SSL_CIPHER : JkCERTSIndicator SSL_CLIENT_CERT : JkWorkersFile /usr/local/tomcat/conf/workers.properties : JkLogFile logs/jk.log : JkLogLevel warn : JkMount /*.jsp ajp13 : JkMount /servlet/* ajp13 : : : - : : : Any guesses?? I would be really thankful! : : Best Regards, : : André Rocha : __ : PT Inovação,S.A. Tel: +351 222 079 325 : Largo de Mompilher, 22, 2ºA Fax:+351 222 079 303 : 4050-392 Porto - Portugal [EMAIL PROTECTED] : http://www.ptinovacao.pt : : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: I need help in tomcat configuration with Oracle 8.1.7
Hi, If I remember correctly, you have to be using at least jdk1.2 in order to run Tomcat, but the classes111.zip file is intended for use with jdk1.1. You might have better luck if you used classes12.zip (which you can get from technet.oracle.com). Brendan : Hello, : : I would like to know whether anyone is able to give me a hint towards = : solving the following scenario. If anyone is available on consultation = : basis, it is fine too. : : I have developed website personalization engine in java that comes with = : it's own kind of application server to handle the client access requests = : to the oracle 8.1.7 db through the use of tomcat 3.1 I am using the = : oracle thin driver and classes111.zip in order to handle the requests = : through the jdbc. However tomcat giving me serious errors and my client = : application can't login to the database. Would anyone be able to help me = : on that matter?=20 : : Thanks : : Tobias Hansen : : : : : : : : : : : Hello, : : I would like to know whether anyone is able to give me a : hint towards solving the following scenario. If anyone is available on : consultation basis, it is fine too. : : I have developed website personalization engine in : java that comes with it's own kind of application server to handle the : client access requests to the oracle 8.1.7 db through the use of tomcat 3.1 I am : using the oracle thin driver and classes111.zip in order to handle the requests : through the jdbc. However tomcat giving me serious errors and my client : application can't login to the database. Would anyone be able to help me on that : matter? : : Thanks : : Tobias Hansen : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: mod_ssl?
: : Hi all! : : Would someone be able to tell me where to find mod_ssl? www.modssl.org : Thanks. : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: javax.xml.parsers.* not found
Hi, Perhaps it's a typo but the directory should be: c:\jdk1.3\jre\lib\ext (you forgot the last subdirectory) Brendan : Hello, : : I am trying to write a testing xml program. I downloaded jaxp.jar, : crimson.jar and xalan.jar files from sun and put them in c:\jdk1.3\jre\lib. : and in classpath. In my testing program, I import javax.xml.parsers.*. When : I compiled the program, I got error message "Package javax.xml.parsers not : found in import." Any idea for what am i wrong? : : Thanks, : Jack Li : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: jsp and servlet
Hi, : Hi, : : in a jsp page I have an object with scope application. Can I use this object : from a servlet? Yes, in the servlet, use this.getServletContext() to get the ServletContext, then use getAttribute(name) to retrieve the attribute. The ServletContext is the application scope. : : Thanks : Andrea : : Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: to obtain browser name and version
Hi, : Hello, : : Is there a way to obtain the browser name and version in JSP? request.getHeader("user-agent"); You'll have to decode the string you get back a bit, but that's how you do it... : : Thanks, : Jack Li : : Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: Obtaining SSL Certificate in Servlet/JSP Page?
Hi, A little follow-up to my own message, sorry. - You have to use the ajp13 interface from Apache to Tomcat. - You have to have your apache properly set up (we had an error in ours). - The certificate is then available as the javax.servlet.request.X509Certificate attribute on the HttpServletRequest object associated with the request, the cipher suite is available as: javax.servlet.request.cipher_suite, and the SSL session is javax.servlet.request.ssl_session (depending on exactly what parameters you've specified in your mod_jk.conf file (this is with all the default values selected). Thanks to Thomas Bezdicek for pointing me in the right direction. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Obtaining SSL Certificate in Servlet/JSP Page?
Hi, We are using the following environment: Linux / Apache 1.3.19/mod_ssl/mod_jk / Tomcat 3.2.1 In a portion of our application, we're using apache/mod_ssl to require the user to present us with a client certificate. All of this works fine. Where we're having a problem is in getting the certificate that the client has passed to apache in our JSP pages and Servlets running under Tomcat. Is this even possible? We've looked at the various javax.servlet.* API's and it doesn't seem to be. Have also looked over various portions of the Tomcat code and don't really see anything there. Does anyone have any clues as to how we can do this? Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: Error when compiling mod_jk under HPUX 11.00 : jk_global.h
Hi, In general, it's an iterative process. You don't have sys/select.h on your machine. Fine. Comment it out and try your compile again. This time it'll fail because those items that it expected to find definitions for in that header file aren't there. So you'll need to find where on your system those items are defined. (In this case, you're going to need to find where the select(2) call is defined on your system, as well as the macros that are used with it. Your system's man pages are a good place to start your search.) Where you commented out the '#include ', now add in the correct includes for your system. And so on... Repeat this process for all of the headers you don't have, until you don't get any errors any more. I don't have access to an HPUX system, so I can't help any more than that, sorry. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: ODBC-JDBC ** with JSP ** : 'No suitable driver'
Hi, If you unzipped the file into the WEB-INF/lib directory, then you did it in the wrong place. They should go in the WEB-INF/classes directory. I've been using that approach successfully here for a while now. Brendan : Ok, I'll try that. : Nevertheless, I already tried to put the developped classtree of : classes12.zip (oracle.jdbc) in the lib directory (unzipped file), and : it didn't work properly either. I may guess that renaming the .zip in .jar : would have the same (non-)effect, wouldn't it ? : : Jean-François : : -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: TOMCAT and ORACLE
Hi, Is the listener running, and does your connection URL specify the correct host and port for it? Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Re: Accessing Context Parameters from JSP Page...
Hi Milt, Thanks for responding. I've actually figured out my problem, and it was (unfortunately) far more mundane. What I'd done was the following: "/> Which, of course, cause the problem because of the quoting. Once I changed the outer quotes from double quotes to single quotes, everything worked fine. I actually used to live in Urbana, many many moons ago (I left in 1977), I imagine it's changed a bit in the interim Thanks again. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065
Accessing Context Parameters from JSP Page...
Hi, Newbie question here. I've looked in the FAQ (and, for that matter, in the Servlet API specs) and am having trouble figuring out how to access parameters specified via in my JSP pages. Am trying to use <%= application.getInitParameter() %>, but Jasper complains that the parameter has no value. This -seemed- to me to be the way to do it. I've also tried using config.getInitParameter(), to no avail. I am certain that the matching parameters have values in the web.xml file, and that the names that I am using match the names specified. So I figure that I must be doing something else wrong... Now, if only one of you kind souls could point out the error of my ways for me. Brendan -- Brendan McKennaEmail: [EMAIL PROTECTED] Development Strategist Phone: +353-61-338177 Taringold Ltd. Fax: +353-61-338065