Re: java certification
I believe the latest issue of "Java Pro" does a break down of what certification is worth. I believe is was substantial $$$. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of John Horan Sent: Thursday, June 01, 2000 10:24 AM To: [EMAIL PROTECTED] Subject: Re: java certification Sanjay, I took the Sun Certifiied Programmer for Java 1.2 exam. Marketvalue-wise I'm not sure what it gives me - I suspect not a big deal, but then again everything helps :-) For my own personal benefit however I did find it very helpful - I studied for it as I was working with Java for the first time and it filled gaps in my knowledge (hadn't previously needed to use the java.io or the java.awt packages for instance) and forced me to learn the basics of the language thoroughly. So I thought it was worthwhile. Also, from a market value viewpoint if I became a certified Developer and then a certified Architect I'd say that is quite an impressive thing to have on your cv - I notice a lot of the published Java writers have such a qualification J -Original Message- From: Sanjay V Mistry [SMTP:[EMAIL PROTECTED]] Sent: 01 June 2000 05:04 To: [EMAIL PROTECTED] Subject:java certification hi guys, this is little off-bit topic, but I wanna know something about java certification exam. what is advantage of giving that exam ? what is the market value of it ? does it really helps ? Can someone throw more light on this ? Thanks. Sanjay Mistry Get your FREE Email at http://mailcity.lycos.com Get your PERSONALIZED START PAGE at http://my.lycos.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html *** This email and any files transmitted with it are confidential and are solely for the use of the individual or organisation to whom they are addressed. If you have received this mail in error please notify the system administrator at +353 1 6399700 or by email to [EMAIL PROTECTED] This email message has been swept for computer viruses. Managed Solutions Corporation, Enterprise Customer Relationship Management, Workflow and Contract Administration. Tel: 353 1 639 9700 Fax: 353 1 639 9701 Don't forget to visit our website at http://www.managed-solutions.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Applet to Servlet Communication ..please help
Hi Ram, Pretty much the "Bible" for servlet programming is Jason Hunter's book Java Servlet Programming, published by O'Reilly. You will hear this book referred to "a-lot" on this list. It has some very good examples, including Applet to Servlet communication. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of ram muna Sent: Sunday, May 28, 2000 10:03 AM To: [EMAIL PROTECTED] Subject: Applet to Servlet Communication ..please help Hi all, I have started learning servlets recently. Can anyone please give me a simple example of Applet to Servlet communication. If you can tell me the source, book, or web site which can help me understand this process, I will greatly appreciate your help. Thanking you all in advance, Ram __ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Help please
Yes it is but why? Everything you need is included with the Weblogic "application server". You don't need Apache or anything else You don't need anything except perhaps to download a database driver. Check out there website. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of K Ramesh Sent: Saturday, May 27, 2000 7:31 AM To: [EMAIL PROTECTED] Subject: Help please Hi everybody This is a offtopic question but i am sure lots will be interested. I just installed WEblogic application server in my machine. Now, how do i plug it with the webserver. lets say that i want weblogic to be plugged with apache. is it possible? Enlighten me Thanks K Ramesh ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Query on SQL server
Hello S.S.Rajagopal, Since you are shifting from Access (for development only) to MS-SQL-Server-7 (a real database) I'm assumming you're also shifting from the odbc/jdbc bridge to a straight JDBC Driver (type vary from 1-4). In a nut shell, connection pooling is simply software that allocates connections to your database. When the connection is no longer needed it relinquishes it back to the pool to be used again. Several free ones are available. Not so with a JDBC driver for MS-SQL-7, expect to pay. When you refer to locking, I assume you mean row level locking??? This is internal to your database and probably doesn't have anything to do with your problem. I would suggest refering to Jason Hunters book to learn more about connection pooling. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of SSRAJAGOPAL Sent: Sunday, May 14, 2000 11:22 PM To: [EMAIL PROTECTED] Subject: Re: Query on SQL server Hi, I have already tried closing the result set connection but met with the same problem.Can some one give some info on locking and connection pooling in SQL server Regards, S.S.Rajagopal On Fri, 12 May 2000, blueads.com wrote: Just a guess, but it sounds like your not closing your resultset or connection. Have you thought about going with JDBC and a connection pool? Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of SSRAJAGOPAL Sent: Thursday, May 11, 2000 10:13 PM To: [EMAIL PROTECTED] Subject: Query on SQL server Hi all, I am doing my project using servlets . Recently I shifted my application from MS-Access to SQL Server 7.0 . When i try to access the application and run any of the servlets it gives me the following error " Connection is busy with results of another hstmt")ODBC -HY Has anyone encountered this problem . ?If so what should be done to remove this ?. Note : I am using IIS and Servlet Exec utility ro run my servlets Thanx in advance Regards, S.S.Rajagopal ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html "Nobody is perfect in this world and since i am nobody .." __o__ oOo oOo oOOOo oOOOo oOOOo oOOO* *OO* *o oOOO o oo oOOo oOo oOo o OOO o oOO OOO OOo *O O O* *OO *O* OO* *OO *OOO* OO* *OOo *OOO* oOO* *OOOo *O* oOOO* *o *OOO* o* *o o* *O* ""o"" * S.S.RAJAGOPAL permanent address: * * SYSTEMS EXECUTIVE no 3 ,pushpha colony * *saligramam* * INFOTECH SERVICES DIVISION chennai:600093 * * GODREJ BOYCE tel:(044)4813161 * * * * VIKHROLI MUMBAI-400079 temporary address: * * F2/56,l.b.marg * * email : [EMAIL PROTECTED] godrej colony* * vikhroli
Re: Query on SQL server
Just a guess, but it sounds like your not closing your resultset or connection. Have you thought about going with JDBC and a connection pool? Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of SSRAJAGOPAL Sent: Thursday, May 11, 2000 10:13 PM To: [EMAIL PROTECTED] Subject: Query on SQL server Hi all, I am doing my project using servlets . Recently I shifted my application from MS-Access to SQL Server 7.0 . When i try to access the application and run any of the servlets it gives me the following error " Connection is busy with results of another hstmt")ODBC -HY Has anyone encountered this problem . ?If so what should be done to remove this ?. Note : I am using IIS and Servlet Exec utility ro run my servlets Thanx in advance Regards, S.S.Rajagopal ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Space Character In URL
Hi Danny, The the URL encoder from the java.net package was the solution. Got that answer several days ago. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Danny Rubis Sent: Wednesday, May 10, 2000 5:12 PM To: [EMAIL PROTECTED] Subject: Re: Space Character In URL Hey! I am coming in late to this discussion. Is there a reason why you can't use the URL encoder from the java.net package? Sans adieu, Danny Rubis "blueads.com" wrote: - I am running into the same problem as another poster had with spaces in a URL. I have tried replacing the space with a '+' sign using the code below. This worked fine with Internet Explorer but Not with Netscape. // String phrase needs '+' signs between spaces for http links. int length = phrase.length(); String temp = phrase; char linkPhrase[] = temp.toCharArray(); for (int i = 0; i length; i++) { if(linkPhrase[i] == ' '){ linkPhrase[i] = '+'; } } - Someone suggested that using %20 works. How would I implement it based on the sample code above? Thanks, Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Space Character In URL
- I am running into the same problem as another poster had with spaces in a URL. I have tried replacing the space with a '+' sign using the code below. This worked fine with Internet Explorer but Not with Netscape. // String phrase needs '+' signs between spaces for http links. int length = phrase.length(); String temp = phrase; char linkPhrase[] = temp.toCharArray(); for (int i = 0; i length; i++) { if(linkPhrase[i] == ' '){ linkPhrase[i] = '+'; } } - Someone suggested that using %20 works. How would I implement it based on the sample code above? Thanks, Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Printing through servlet?
I would like to have a servlet print a formatted page. Is this possible through the LPT1 port? Any examples appreciated. Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Printing through servlet?
I will check it out, thanks. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of P.Yesudason Sent: Friday, April 28, 2000 6:46 AM To: [EMAIL PROTECTED] Subject: Re: Printing through servlet? In java we have a class called printerJob , that will do it for you. Go thru it .. -Yesudason P "blueads.com" wrote: I would like to have a servlet print a formatted page. Is this possible through the LPT1 port? Any examples appreciated. Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html -- I am free and have a destination too far, I will keep flying. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: JDBC-ODBC
rs returns a boolean true / false, so if there is more data it returns a true, if not it returns a false. Opps...Sorry my name is Tom not Zulfi :-) -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of P.Yesudason Sent: Wednesday, April 26, 2000 12:56 AM To: [EMAIL PROTECTED] Subject: Re: JDBC-ODBC Zulfi, If rs is null ., what will happen? Yesudas zulfi wrote: if(rs.next()) { data in resultset... } else no data... thanx zulfi - Original Message - From: Pavan Sulibhavi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 26, 2000 12:11 PM Subject: JDBC-ODBC Hi, I'm getting the invalid cursor state error message (SQLException). well, this is because the returned ResultSet contains no data, and i'm trying to access it. How to find out whether the ResultSet returned by method - executeQuery(query) contains any data at all ?? PLEASE reply as soon as possible.. thanks a lot! Pavan ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html -- I am free and have a destination too far, I will keep flying. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: SQL SERVER 7.0 Problem !!!!!!!!!!!!!!!
Hi lalith, Rather than use the jdbc/odbc bridge you can use a jdbc driver and set it to match the port of your database. There are several types and brands available. Type-1 through type-4 depending on your needs and budget. There is a URL on the SUN site that has a list of driver manufactuers, perhaps someone out there can send you the URL. Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Lalith Jayaweera Sent: Monday, April 24, 2000 8:31 AM To: [EMAIL PROTECTED] Subject: SQL SERVER 7.0 Problem !!! Hi, Rather than connecting through a ODBC data source ; How can we connect through it's port (1433). What is the code behind that, what is the driver I should use. Thanks in Advance lalith ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Missing email link
I have developed a servlet that kicks of every night and goes through a database looking for matches to input a user has put in. It then generates an email message and sends them the link where to find what they are looking for. It works fine in IE but not in Netscape 4.5. The link comes back like this http://www.mysite.com/search?SearchWord=tools +as+wellDateId=ClassifiedAd=SearchByWord (Note: there is NO spaces the between string.)When is should come back as http://www.mysite.com/search?SearchWord=tools+as+wellDateId=Cl assifiedAd=SearchByWord Does anyone know a fix for this? Thanks Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Are servlets being used in large sites ???
Just curious Joanquin, You work for IBM. Doesn't your company sell WebSphere? I maybe going out on a limb here, but don't they do enterprise applications? :-) Not to be a smart a-- here. I know Delta Airlines uses servlets, Amazon.com uses some servlets and EJB. Sincerely, Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Joaquin Rapela Sent: Monday, April 17, 2000 2:20 PM To: [EMAIL PROTECTED] Subject: Are servlets being used in large sites ??? Hello, Can anybody send me a listing of sites using servlet technology. My group is evaluating whether to use servlets or CGI's. I have found several old postings about the advantages/disadvantages of each technology. We would like to browse sites that are successfully using servlet technology. Any help will be greatly appreciated, Joaquin Joaquin Rapela Staff Software Engineer IBM Almaden Research Center ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: checking for null in a doPost method
Hi Stephen, I noted there is not a space between the pQ2="", so maybe put pQ2=" " or pQ2=' ' where a single quotation mark denotes a char space. The difference between == and .equals() should not matter since you are working with a String A.K.A. an Object. Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Lambert, Stephen : CO IR Sent: Monday, April 17, 2000 5:40 PM To: [EMAIL PROTECTED] Subject: checking for null in a doPost method I'm trying to pass blanks for a null into my db from an html form. Code as follows: String pQ2 = request.getParameter("check2"); if (pQ2.equals("null") {pQ2=""; } I end up with the error "java.lang.NullPointerException". Even though when I display the variable pQ2, it gives me "null"(no quotes) using: out.println(pQ2); Anybody know how to check for null data from a doPost method? Thanks, Stephen. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: checking for null in a doPost method
I stand corrected, However, I believe that there need to be a space between the quotes if null. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Milt Epstein Sent: Monday, April 17, 2000 8:19 PM To: [EMAIL PROTECTED] Subject: Re: checking for null in a doPost method On Mon, 17 Apr 2000, blueads.com wrote: Hi Stephen, I noted there is not a space between the pQ2="", so maybe put pQ2=" " or pQ2=' ' where a single quotation mark denotes a char space. The difference between == and .equals() should not matter since you are working with a String A.K.A. an Object. I hate to respond to such an off-topic post, but this response has some serious misinformation. There is a *huge* difference between == and .equals(), and that in fact is causing the problem here, as a couple of other posters have pointed out. Basically, using .equals() accesses a method of an object, and if that object is null, voila, NullPointerException. You want to check if it is == null, i.e. if it doesn't refer to anything. There is a bit of confusion added here by the fact that a null String object prints out as "null" (no strings), which I'm not sure was the greatest decision in the world. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Lambert, Stephen : CO IR Sent: Monday, April 17, 2000 5:40 PM To: [EMAIL PROTECTED] Subject: checking for null in a doPost method I'm trying to pass blanks for a null into my db from an html form. Code as follows: String pQ2 = request.getParameter("check2"); if (pQ2.equals("null") {pQ2=""; } I end up with the error "java.lang.NullPointerException". Even though when I display the variable pQ2, it gives me "null"(no quotes) using: out.println(pQ2); Anybody know how to check for null data from a doPost method? Thanks, Stephen. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Timing in Servlets
Hi Krishnan, What you may consider doing is using the calender class and using the SimpleDateFormat() with it as an easy method to calculate the start and end time that the user has spent being logged in. When the user logs in you would start that time and when the user logs off you would store (and maybe do a calculationg to determine time spent logged in). Of course this only works if the user logs off. Then when the user logs off you would update your database (as you stated in your post). calendar = Calendar.getInstance(); formatter = new SimpleDateFormat("DDDHHmmssSSS"); // Many formats available. Sincerely, Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Krishnan Srinivasan Sent: Sunday, April 16, 2000 4:01 PM To: [EMAIL PROTECTED] Subject: Timing in Servlets Hi, How do I keep track of the user timing from the logon to the logoff.Do I start a timer when the session starts for the user and insert the timer when he logs off and update the database(Oracle)?. I would like to store this infrmation in a log file for the administrator to see at the end of the day. This is what I am storing eg. UserName, IpAddress,RemostHost,TimeSpent(min),No.Times R/W to the DB ABC 123.453.34.345usa.gov.org 435 DEF 132.345.24.234 microsoft.com 323 The Last Column of the READ/WRITE. I thought of keeping a counter everytime a button which calls a servelt is going to be clicked and always add that to the session table . I guess the session is really useful here Let me know. Thanks Krishnan Ps* Has anyone used the verisign for user authentication in Java Webserver2.0? I am trying to .. __ Get Your Private, Free Email at http://www.hotmail.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Hiding a link on html generated page.
I have a servlet that generates an html page with an underlined link on it. For example: http://somewhere/12345 I would like to hide this link from appearing at the bottom of the browser when the cursor goes over the link and it turns into a hand. Is there a way to do it? Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Servlet - Cookie Problem
Hi Jochen, Since you are sending it secure, you might try: .setSecure(true); // Change to true when using SSL. Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Jochen Vastmans Sent: Friday, April 14, 2000 7:41 AM To: [EMAIL PROTECTED] Subject: Servlet - Cookie Problem Hello, I'm using JavaWebServer 2.0, and I'm trying to send cookies to the client, but I can't find them, not when I'm using NN(under linux .netscape/cookies) not with IE...(windows/cookies) The cookies are send when the webserver is in secure mode... This is some code from servlets... Can someone tell me what is wrong or what the problem is? Thanks, Best Regards, Jochen Vastmans e-mail: [EMAIL PROTECTED] // SENDING COOKIES cookies = req.getCookies(); cust = (Customer)cs.getCustomer(); long cid = cust.getID(); String id = String.valueOf(cid); if(cookies != null){ for(int i=0;icookies.length;i++){ if(cookies[i].getName().equals("CID")){ customerId = (Cookie)cookies[i].clone(); customerId.setValue(id); customerId.setComment("Kuleuven Online Store"); customerId.setDomain(HOST); customerId.setMaxAge(1000); //customerId.setSecure(true); } } } if(customerId == null){ customerId = new Cookie("CID",id); customerId.setValue(id); customerId.setComment("Kuleuven Online Store"); customerId.setDomain(HOST); customerId.setMaxAge(1000); //customerId.setSecure(true); } res.addCookie(customerId); // RECIEVING COOKIES cookies = req.getCookies(); if(cookies != null){ for(int i=0;icookies.length;i++){ if(cookies[i].getName().equals("CID")){ c = (Cookie)cookies[i].clone(); try{ cid = (long) Integer.valueOf(c.getValue()).intValue(); break; } catch(NumberFormatException nfe){} } } } ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Java Security
Hi Krishnan, Getting a seccure link involves several factor. The first one is setting up a login and password, you can use something like the code below (borrowed from another user on this list, Credit goes to Abhishek Sharan). Secondly you must make sure that your server support Secure Socket Layer (either 64 bit exportable or 128-bit U.S.A). Then you use a certificate. Check out www.verisign.com or www.Thawrte.com for specifics. You use a different socket for SSL and your links always start with https:// Setting up you SSL depends on your servlet engine so check your documentation. Hope this sheds some light on the subject. Sincerely Tom Kochanowicz /code begins import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; public class Verify extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { Connection con = null; Statement stmt = null; ResultSet rs = null; int verified = 0; res.setContentType("text/html"); PrintWriter out = res.getWriter(); String userName = req.getParameter("txtUserName"); String password = req.getParameter("txtPassword"); try { // Initialize driver... Class.forName(database driver); // Connect... con = DriverManager.getConnection(database connection with username and password); stmt = con.createStatement(); rs = stmt.executeQuery("SELECT USERNAME, PASSWORD FROM JOJOUSERS" + " WHERE USERNAME = '" + userName + "'"); // HTML Header... out.println("HTMLHEADTITLEVerification Result" + "/TITLE/HEAD"); out.println("BODY"); while(rs.next()) { if(rs.getString("password").trim().equals(password.trim())) { verified = 1; } } if(verified == 1) { out.println("User verified: Access Granted"); } else { out.println("Access Denied...BRUser not found or " + "Incorrect Password!"); } // HTML footer... out.println("/BODY/HTML"); } catch(ClassNotFoundException e) { out.println("Couldn't load database driver: " + e.getMessage()); } catch(SQLException e) { out.println("SQLException caught: " + e.getMessage()); } finally { try { if (con != null) con.close(); } catch (SQLException ignored) { } } } public String getServletInfo() { return "Login verification sample... "; } } // end of the code -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Krishnan Srinivasan Sent: Friday, April 14, 2000 2:53 PM To: [EMAIL PROTECTED] Subject: Re: Java Security Hi Mr.Tom Kochanowicz, I read one of your replies and I saw the "SSL" word. I was wondering if you could throw light on setting up a secure link during the LOGIN of my servlet. When people log in my site I want to give them an option like some websites do "click here to logon for a secure site" Is this done using JSSE ? (java security which has the HTTP for SSL). Thanks SK __ Get Your Private, Free Email at http://www.hotmail.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Jdbc driver for Apache Jserv on Redhat Linux
BEA WebLogic has a real good one, but it's not cheep. Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Suresh Sharma Sent: Friday, April 14, 2000 7:25 PM To: [EMAIL PROTECTED] Subject: Jdbc driver for Apache Jserv on Redhat Linux Hi all. I need JDBC drivers for MS SQL and Oracle 8i for my Apache Jserv web server which is instslled on my Linux Redhat 6.1 machine.Any suggestion will be of great help.Thank you. Suresh ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Db connection crashes servlet server
Barranger, Try something like. while(dataResultSet.next()){ if (result.getString("Password").trim()){ return true; } else return false; } Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Barranger Ridler Sent: Saturday, April 08, 2000 3:09 PM To: [EMAIL PROTECTED] Subject: Db connection crashes servlet server Hello there, I have a simple servlet that connects to an access database to check the name and password of a user. While it does check this correctly, the server will crash a few minutes later (Possibly when the distroy() method is called?? which has no code). Anyways any help would definately help. Here's the code that is used to connect. Sorry about the length Barranger /** * Check the User Name and Password */ public boolean login(String name, String pwd) { //Set the Variables to connect to the Database String URL = "jdbc:odbc:Mail"; String username = ""; String password = ""; //Try to load the appropriate Driver try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch (Exception e) { return false; } //Declare the Objects Statement stmt = null; Connection con = null; //Create the Objects try { con = DriverManager.getConnection (URL, username, password); stmt = con.createStatement(); } catch (Exception e) { return false; } //Declare and Create the ResultSet object try { ResultSet result = stmt.executeQuery ( "SELECT * FROM user WHERE user_name = '" + name + "' AND user_password = '" + pwd + "';" ); //If there are any records then the user exists if(result.next()) { return true; } else { return false; } } catch (Exception e) { return false; } } ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Pure jdbc drivers
I don't know about free, but I can tell you that WebLogic WebExpress has type-4 (pure java) drivers for all leading databases and a great connection pool, servlet engine, and html server, ALL for the price of what some places I've tried want for just the drivers. I use it for my site with MS-SQL-7 Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Patrick Clark Sent: Thursday, April 06, 2000 10:02 PM To: [EMAIL PROTECTED] Subject: Re: Pure jdbc drivers I am on the lookout for a pure jdbc driver as well (type 4). I need one for MS SQL7. Preferably one that is free. thanks in advance From: Papaya Head [EMAIL PROTECTED] Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology." [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Pure jdbc drivers Date: Thu, 6 Apr 2000 21:06:50 CDT what kind of DBMS are you using? From: RAJA [EMAIL PROTECTED] Hi all, I am on the look out for pure jdbc drivers (type 4 ) . Currently I am using jswdk2.0 which has type1 driver. Can any one tell me whether they can be down loaded from a site. Thanx in advance. Regards, S.S.Rajagopal __ _ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html __ Get Your Private, Free Email at http://www.hotmail.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html __ Get Your Private, Free Email at http://www.hotmail.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Handling large records
Hi Eric, Look at Karl Mosses book "Java Servlets", there is a good example of what you are trying to do in there (somewhere). You need support for JDBC-2 if you want to do the BACK button using the previous() method. If you don't have JDBC 2 you can use javascript putting code in like below which puts a back button in: outputToBrowser.println("div align=\"right\"INPUT TYPE=\"button\" VALUE=\"Back\" ONCLICK=\"history.go(-1)\""); Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Eric Noriega Sent: Friday, April 07, 2000 2:08 PM To: [EMAIL PROTECTED] Subject: Re: Handling large records You can use SQL cursors if the DB supports them, and if the jdbc drivers support them. This requires that you hold the DB connection open for long periods of time though, and is usually avoided. Another way is to fetch and cache the results on the servlet server. Both have their down sides. On Wed, 5 Apr 2000, Umashankar Balasubramanian wrote: I get a huge number of records (in thousands) when I issue query from a servelet. Presently I pump all this info. to the browser and it is very slow. I want to implement prev/next buttons on the browser so that only a set of records is fetched from the servlet. What changes need to be done on the servlet (I have the constraint of not issuing the query more than once) Regards, Uma __ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Sending anonymous email
Pretty close Danny, I've been looking at other sites that have anonymous sendmails and it looks like they are using a key field of the database record and when you click on the link it sends the parameter to a servlet (or cgi) which looks up the email address that corelates with the key field and brings up a servlet (cgi) generated html page for some one to type there email into. The link below is an example of what I am trying to do (The part that says "reply to ad") when I mean anonymous email. http://www.discoveromaha.com/cgi-bin/freecls/freecls.cgi?db=generalwebsite= session_key=search_and_display_db_button=onresults_format=longdb_id=3058 query=retrievalcategory=Auto+Parts Tom K. Subject: Re: Sending anonymous email Hey! One way this can be done, if I interpret your question correctly, you can set up servlet properties, either by fussing with the servlets.properties file or use you servlet engine's administration applet and add email addresses aliases like this: Johnny[EMAIL PROTECTED] Janie[EMAIL PROTECTED] Then you can send Johnny or Janie as parameters and no one will know the E-address. Am I on track with your question? Sans adieu, Danny Rubis "blueads.com" wrote: I noted at some sites instead of using mailto:[EMAIL PROTECTED] they have a link that is underlined and brings up a form with the recipients email kept anonymous so that the email collectors don't Spam them. I already have a servlet that a user can fill in to send an anonymous email. What I would like is to have a way of passing an email address to the servlet by simply clicking on a link that would NOT identify the recipient but pass there email to my email form servlet. Any ideas? (The only option I can think of is a query to the database bringing up the recipients email address and passing it to the servlet). Sincerely, Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Sending anonymous email
I noted at some sites instead of using mailto:[EMAIL PROTECTED] they have a link that is underlined and brings up a form with the recipients email kept anonymous so that the email collectors don't Spam them. I already have a servlet that a user can fill in to send an anonymous email. What I would like is to have a way of passing an email address to the servlet by simply clicking on a link that would NOT identify the recipient but pass there email to my email form servlet. Any ideas? (The only option I can think of is a query to the database bringing up the recipients email address and passing it to the servlet). Sincerely, Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Executing a servlet at a Certain Time
Title: RE: Executing a servlet at a Certain Time The idea of running an SQL job sounds O.K. I need to check this option (if possible)using MS-SQL-Server-7 -Original Message-From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Jay BakerSent: Friday, March 31, 2000 9:30 AMTo: [EMAIL PROTECTED]Subject: Re: Executing a servlet at a Certain Time Well, there is no way to not have SOMETHING running and be able to execute ANYTHING at some scheduled time, short of training a monkey to hit the enter key when the big hand is on the 12 and the little hand is on the 9. Whatever you do, there is going to be a sleep() involved one way or another. You could run a SQL job and piggy-back on that service, doing away with the servlet altogether. -- Jay -Original Message- From: blueads.com [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 30, 2000 11:39 PM To: [EMAIL PROTECTED] Subject: Executing a servlet at a Certain Time I am using NT on a weblogic 4.5.1 server. - I would like to execute a servlet that does a database update once a day. I would like to do this with out having a sleep() or while loop active. In other words, I want to eat as little cpu time as possible. I know this topic was brought up before, with answers suggesting what I don't want to do. Does anyone have a good solution to this? Sincerely, Tom Kochanoiwcz ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Executing a servlet at a Certain Time
Grant, Thanks for the "idea" of a solution. The "AT" command sounds like a crontab in UNIX. Does anyone on the list know if it is possible (have an example) to execute a servlet with the "AT" command? Sincerely, Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Grant Cullen Sent: Friday, March 31, 2000 9:17 AM To: [EMAIL PROTECTED] Subject: Re: Executing a servlet at a Certain Time If the servlet can be invoked from a command line, use the NT "AT" command. This will allow you to run on a schedule. Grant Cullen UNIX System Admin [EMAIL PROTECTED] 416-935-6558 -Original Message- From: blueads.com [mailto:[EMAIL PROTECTED]] Sent: Friday, March 31, 2000 0:39 To: [EMAIL PROTECTED] Subject: Executing a servlet at a Certain Time I am using NT on a weblogic 4.5.1 server. - I would like to execute a servlet that does a database update once a day. I would like to do this with out having a sleep() or while loop active. In other words, I want to eat as little cpu time as possible. I know this topic was brought up before, with answers suggesting what I don't want to do. Does anyone have a good solution to this? Sincerely, Tom Kochanoiwcz ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Invoking a servlet from main()
Is there a way to invoke a servlet from mail? e.g. public static void main(String args[]){ myServlet new = myServlet(); // Then call doPost(), doGet() or service() } I know it's an od question, but It is for a special need. Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Invoking a servlet from main()
I meant main() not mail. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of blueads.com Sent: Friday, March 31, 2000 2:47 PM To: [EMAIL PROTECTED] Subject: Invoking a servlet from main() Is there a way to invoke a servlet from mail? e.g. public static void main(String args[]){ myServlet new = myServlet(); // Then call doPost(), doGet() or service() } I know it's an od question, but It is for a special need. Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Executing a servlet at a Certain Time
Thanks Craig, The example is just what I needed! Sincerely, Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Craig R. McClanahan Sent: Friday, March 31, 2000 2:50 PM To: [EMAIL PROTECTED] Subject: Re: Executing a servlet at a Certain Time "blueads.com" wrote: Grant, Thanks for the "idea" of a solution. The "AT" command sounds like a crontab in UNIX. Does anyone on the list know if it is possible (have an example) to execute a servlet with the "AT" command? This is actually pretty easy, thanks to the java.net.URLConnection class. You can just write a little Java application that performs a request to the appropriate URL to trigger the action you want. There is example code for using this class in the Java Language Tutorial at http://java.sun.com/docs/books/tutorial, in the networking trail. Craig McClanahan ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Executing a servlet at a Certain Time
I am using NT on a weblogic 4.5.1 server. - I would like to execute a servlet that does a database update once a day. I would like to do this with out having a sleep() or while loop active. In other words, I want to eat as little cpu time as possible. I know this topic was brought up before, with answers suggesting what I don't want to do. Does anyone have a good solution to this? Sincerely, Tom Kochanoiwcz ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
SQL/Servlet Question
In my servlet, I am doing a query of one table bringing back the data with the method dataResultSet1.getString() then using what I get back to look for a match in another table using the sql LIKE syntax. I just want to count the matches from my first table that match my second table. I interate through them using an outer and innner while statement. - Should I be using sql COUNT and if so, how do I get the count into a variable I can use in my servlet? - What other options do I have? Sincerely, Tom Kochanowicz Here is what I have so far // Outer loop checks for email phrase. while(dataResultSet1.next()){ //if(dataResultSet1.getString("Email").trim().equals("[EMAIL PROTECTED] t")){ //System.out.println("THE PHRASE IS " + dataResultSet1.getString("Phrase").trim()); String phrase = dataResultSet1.getString("Phrase").trim(); String email = dataResultSet1.getString("Email").trim(); // Inner loop checks if the Phrase found above matches any of the WhatAdSays01 info. stmt2 = dbConnection.createStatement(); dataResultSet2 = stmt2.executeQuery("select WhatAdSays01 from AdInfoView WHERE WhatAdSays01 LIKE '%" + phrase + "%'"); while(dataResultSet2.next()){ // Count the number of matches. countForMatches++; ///outputToBrowser.println(" WE HAVE A MATCH" + countForMatches); } outputToBrowser.println("WE HAVE FOUND " + countForMatches + " matches for your search word(s) " + phrase + " "); count++; } ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: SQL/Servlet Question
Thanks Kevin, It works. Here is an example for anyone else who wants to count matching Stings from two different tables. Sincerely, Tom Kochanowicz Statement stmt1 = null; ResultSet dataResultSet1 = null; Statement stmt2 = null; ResultSet dataResultSet2 = null; PrintWriter outputToBrowser = response.getWriter(); stmt1 = dbConnection.createStatement(); dataResultSet1 = stmt1.executeQuery("SELECT Email, Phrase, EndDate FROM Look4U"); response.setContentType("text/html"); int countForMatches = 0; // HTML Header outputToBrowser.println("HTMLHEADTITLELook4U Results/TITLE/HEAD"); outputToBrowser.println("BODY"); // Outer loop checks for email phrase. while(dataResultSet1.next()){ //System.out.println("THE PHRASE IS " + dataResultSet1.getString("Phrase").trim()); String phrase = dataResultSet1.getString("Phrase").trim(); String email = dataResultSet1.getString("Email").trim(); // Inner loop checks if the Phrase found above matches any of the WhatAdSays01 info. stmt2 = dbConnection.createStatement(); dataResultSet2 = stmt2.executeQuery("select COUNT(WhatAdSays01) from AdInfoView WHERE WhatAdSays01 LIKE '%" + phrase + "%'"); int numRows = 0; while(dataResultSet2.next()){ // Count the number of matches. numRows = dataResultSet2.getInt(1); countForMatches++; } if(numRows 0){ outputToBrowser.println("DATA RESULT SET 2 = " + numRows + " Matching the Phrase " + phrase + " Your email address is: " + email + "P"); } } outputToBrowser.println(getServletInfo()); } -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Mukhar Sent: Wednesday, March 29, 2000 5:33 PM To: [EMAIL PROTECTED] Subject: Re: SQL/Servlet Question "blueads.com" wrote: In my servlet, I am doing a query of one table bringing back the data with the method dataResultSet1.getString() then using what I get back to look for a match in another table using the sql LIKE syntax. I just want to count the matches from my first table that match my second table. I interate through them using an outer and innner while statement. - Should I be using sql COUNT and if so, how do I get the count into a variable I can use in my servlet? For the second query, yes. Using the COUNT SQL statement will return a single row with a single record. Read it with getInt(). K Mukhar ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Servlet Threading issue question
Magesh, Normally this would not be a problem, even when the user hits the submit button multiple times expecially if you are using a connection pool. There is a way to prevent the using from hitting the submit button multiple time by using a short javascript (It only takes the first submit request). I use it on my site and you can view it at www.blueads.com Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mageshkumar Maruthapillai Sent: Monday, March 27, 2000 7:58 AM To: [EMAIL PROTECTED] Subject: Servlet Threading issue question Hi, I have an a sample form which posts to a servlet say. Well, due to slow internet connections etc.. the servlet response takes some time to reach the browser. An impatient user can press the submit button many times. Say 20. Does this mean that for from this particular user there will be 20 concurrent threads excecuting concurrently in the servlet instance. Will this cause a synchronisation problem w.r.t. individual user session data.?? I think it should. Does the Servlet container serialize multiple requests for the same servlet instance from the same client browser Any answers towards this rather overlooked problem is appreciated. Thanks, Magesh. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Error with weblogic driver and MS SQL7.0
Joe, Here is an example of how I connect to MS SQL7.0 using weblogic's connection pool. Make sure you have downloaded the latest driver that supports varchar(8000). Version: 4.5.1.1 Tom Kochanowicz protected String dbURL = "jdbc:weblogic:pool:myPool"; public void init(ServletConfig config) throws ServletException { super.init(config); // use println statements to send status messages to web server console try { System.out.println("SubmitServlet init: Start"); p.put("user", "UserNameHere"); p.put("password", "YourPassword"); // FOR TESTING // Compiler.disable(); //turn off JIT so we can see line numbers when debugging dbConnection = null; Class.forName("weblogic.jdbc.pool.Driver").newInstance(); Connection dbConnection = DriverManager.getConnection("jdbc:weblogic:pool:myPool", p); System.out.println("SubmitServlet init: Loading Database Driver"); System.out.println("SubmitServlet init: Getting a connection to - " + dbURL); synchronized(dbConnection){ // Put prepared statement below if you want or synchonize only the prepared statements(better choice). System.out.println("SubmitServlet init: End"); } } catch (Exception e) { cleanUp(); e.printStackTrace(); } } -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Joe Oh Sent: Tuesday, March 21, 2000 2:54 PM To: [EMAIL PROTECTED] Subject: Error with weblogic driver and MS SQL7.0 Hello, everyone. I'm implementing one servlet that connect to MS SQL server7.0 with your weblogic db driver. Here is my part of codes: try { trace("Trying the JDBC driver."); Class.forName(szDriver); String szURL = "jdbc:" + szDriverType + ":" + szDatabase; trace("Getting a database connection."); Connection dbConnect = DriverManager.getConnection( szURL, szUserName, szPassword); checkForWarning(dbConnect.getWarnings()); //--The error(warning) occurs here!!! trace("Connected to database."); return dbConnect; } catch(SQLException eSQLException) { trace("An SQL Exception was thrown:\n" + eSQLException); } catch (Exception eException) { // some other kind of exception occurred so dump the call stack eException.printStackTrace(); } While I'm connecting to DB with that code, I keep getting the error(warning) below. == SQL State : null Message : Could not determine default character set because weblogic.b.j:Database meta data query failed. Vendor : 0 == Please help, it's urgent. Thanks. Joe Oh Ignition State ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Best Servlet Engine
Title: Best Servlet Engine Delta AirLines, Amazon.com Priceline.com, E-Trade etc. use BEA WebLogic. -Original Message-From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Maria TurkSent: Monday, March 20, 2000 8:09 AMTo: [EMAIL PROTECTED]Subject: Best Servlet Engine What is the best Servlet engine as far as scalability and performance is concerned. I'm currently using tomcat is it any good..
Re: NetDynamics or WebSphere?
NeitherUse Weblogic WebExpress, great support, connection pooling and database drivers for all popular databases. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kelley Foust [GTLLP] Sent: Friday, March 10, 2000 7:32 AM To: [EMAIL PROTECTED] Subject: Re: NetDynamics or WebSphere? I have been using NetDynamics for almost 4 years. Are you aware that they have been bought by Sun and that their product will be replaced by iPlanet this summer. In fact I don't think there will be another release of NetDynamics. -Original Message- From: Serge Belolipetski [mailto:[EMAIL PROTECTED]] Sent: Friday, March 10, 2000 2:57 AM To: [EMAIL PROTECTED] Subject: NetDynamics or WebSphere? Hi all! Is anybody there using NetDynamics or WebSphere? I'm interesting in both products and wishing to define key positions to use one server vs. another or vice versa. --- Sincerely, Serge Belolipetski, [EMAIL PROTECTED] ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from any computer. (e0) ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Want to use the back button
I have a servlet that gererates a confirmation page and then a final submission page. I would like to be able to hit the back button (back two pages) to the original static html page, but the back button is blanked out. Why is this? I use to have the following code in servlet, but commented it out. //response.setHeader("Expires", "Mon, 01 Jan 1990 06:00:01 GMT"); //response.setHeader("Cache-Control", "no-cache"); //response.setHeader("Pragma", "no-cache"); Thanks, Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Killing a session
I would like to kill a servlet session (logout) from a servlet generated html page using a submit button. Can I put the code (shown below) in the same servlet that generated the html page and call it again to kill the session using a submit button? If so, how? Sincerely, Tom K. else if(choice.equals("EndSession")){ try{ session.invalidate(); response.sendRedirect(request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + "/login.html"); return; } catch(IllegalStateException e) { System.out.println("Exception " + e); } } ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
email check
Does anyone have a good example of checking for valid email that they care to share? Better than this one? // Make sure email it is not null if(email == null) return false; int length=email.length(); if((length 3 length 31) (email.indexOf('@') -1) (email.indexOf('.') -1)) return true; else return false; Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Running Servlets in WebLogic4.5.1
Check with weblogic, they have great support for first time users or users who are not familiar with there product. You can also thy there website. www.weblogic.com Tom K, -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of puppala sreenivas Sent: Friday, February 11, 2000 3:35 PM To: [EMAIL PROTECTED] Subject: Running Servlets in WebLogic4.5.1 Hi All, Can any body outline the steps to be followed in running servlets(not the examples given there) in WebLogic 4.5.1.The examples are running OK.If the documentation only had these steps it would have been a great help. tia vas __ Get Your Private, Free Email at http://www.hotmail.com ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: email check
Bingo Ernie, I realize that there are some browsers that do not support javascript so I want the error checking done on the server because of it's importance. What I have for checking is OK but I want to go a step further and check for .net, .com .edu etc. No problem, I will figure it out, just thought someone had something so I wouldn't have to reinvent the wheel. Sincerely, Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Ernie V Sent: Monday, February 14, 2000 5:06 PM To: [EMAIL PROTECTED] Subject: Re: email check Depending on how complex your validation schema is, may be one factor in determine if JavaScript is appropriate or if server-side processing is the right thing to do. For example, you may have complex validation logic, or require that a dynamic page be presented under certain error conditions, or serve up messages from a database. There are many other reasons that I have come across where server side proccessing is the best solution. Another thought... a site may have requirements to gaurd against browsers that don't support JavaScript. This is especially true with sites that require adherence to accessibility standards. W3C standards for accessibility discourage the use of client side processing because it makes the page less accessible to those who are vision impaired or with other accessibility needs. In these cases, the only solution is server side proccessing. As to the code below, the logic seems perfectly acceptable, but it is simple enough that one might want to consider client side processing using JavaScript. As with most web architectures, there is hardley ever a "one size fits all" solution. -ernie David Mossakowski wrote: First of all form validation should proabaly be done in JavaScript on the client (too silly to come back to server for) and second of all that's pretty much all you can do. Some mail servers allow for checking if a given user exists on them but this can't be relied upon. dave. "blueads.com" wrote: Does anyone have a good example of checking for valid email that they care to share? Better than this one? // Make sure email it is not null if(email == null) return false; int length=email.length(); if((length 3 length 31) (email.indexOf('@') -1) (email.indexOf('.') -1)) return true; else return false; Tom K. ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html -- David Mossakowski [EMAIL PROTECTED] Programmer 212.310.7275 Instinet Corporation "I don't sit idly by, I'm planning a big surprise" ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Slashes to improve performance?
In the March issue of Web Techniques magizine there is a small article on page 114 that in a nutshell states that all URL's should end with a '/' to keep the server from being hit twice. Does anyone have knowledge of this as it pertains to servlets. For example, should a query string that looks like http://www.someWhere.com/search?SearchWord=ClassifiedAd=Computers%2FSoftwar eDateId= Have a / at the end of it? Tom Kochanowicz ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
test Please delete
test Please delete ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: how do you use servlet html tag?
Brett, Here is a simple snippet of code for a server-side-include in an html page: ! Server Side Include servlet name=SSICounter /servlet /FORM /BODY /HTML doGet doPost depends on what data you are sending and how you want it formated. For example sending a large amount of data, you want to use doPost. You also need so use doPost if you are using SSL. doGet works a better (faster) if sending small amounts of data. Don't know the spec's off the top of my head. Bottom line is you can use doGet or doPost with SSI Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kaylor, Brett Sent: Monday, January 24, 2000 10:43 AM To: [EMAIL PROTECTED] Subject: how do you use servlet html tag? I am working with jswdk-1.0.1. I can use/modify the examples for without problems. But I cannot create an html page with the servlet tag and get it to work. Can anyone show me a simple working example? Also, which method does the servlet tag execute (i.e. doGet)? Thanks, Brett ~~ Brett B. Kaylor Software Engineer GENERAL DYNAMICS Electronic Systems 1805 West Drake Drive Tempe, AZ 85283 Tel: 480.777.1725 Fax: 480.777.1717 Email: [EMAIL PROTECTED] ~~ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: [ANN] Need Java Training?: Servlets, JSP and XML
Chad, I've read several of your articles on servlet technology from the leading Java mags. Thanks for sharing this information with the servlet interest group. From many of the questions on this list I'm sure many can benifit including myself. Tom K. -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Leonard, Ed Sent: Monday, January 10, 2000 1:33 PM To: [EMAIL PROTECTED] Subject: Re: [ANN] Need Java Training?: Servlets, JSP and XML Thank you. I hope that it goes well for you, but I don't think that this forum is for advertisements. -Original Message- From: Chad Darby [mailto:[EMAIL PROTECTED]] Sent: Monday, January 10, 2000 12:37 PM To: [EMAIL PROTECTED] Subject: [ANN] Need Java Training?: Servlets, JSP and XML Hello, Learning Tree International has released a new Java training course. "Java for Web Application Development: Servlets, JSP and XML" In the course, you will learn how to: - - Build data-driven Web applications with server-side Java technologies - Add a Web interface to your databases using Java servlets - Generate dynamic, interactive Web pages with JavaServer Pages (JSP) - Personalize content for users with cookies and sessions using the Java Servlet API - Extend Web application functionality using distributed objects - Use XML as a data-exchange mechanism View the course details on-line: http://www.learningtree.com/us/ilt/courses/570.htm Course Dates, Location and Price: - The course is offered in the U.S., Canada, U.K, and Sweden. Visit the Learning Tree web site for details of dates, location and price. U.S. Info:http://www.learningtree.com/us/ilt/courses/570.htm Canada Info: http://www.learningtree.com/cn/ilt/courses/570.htm U.K. Info:http://www.learningtree.com/uk/ilt/courses/uk570.htm Sweden Info: http://www.learningtree.com/se/ilt/courses/se570.htm About Learning Tree --- Learning Tree currently offers more than 150+ instructor-led course titles, which are scheduled regularly in major cities worldwide, as well as at client facilities. Find out more information about Learning Tree at: http://www.learningtree.com BTW: I'm the course author :-) -- --- Chad (shod) Darby|J9 Consulting, Inc. [EMAIL PROTECTED] |http://www.j-nine.com --- Info on my upcoming presentations: --- "JavaServer Pages (JSP)""Developing Web Apps w/ JSP XML" - SIGS Object Expo - Evolve 2000 - Feb 23, 2000 in NYC, NY - Feb 28, 2000 in Sydney, Australia - http://www.objectexpo.com - http://www.dstc.edu.au --- ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Who is using servlets?
Nic, This is a valid question. When I tried out servlets and decided to use the weblogic server engine, I wanted to know who was using it besides Delta Air Lines and E-Trade. Check out the following web-site. http://www.beasys.com/customers/weblogic/server/websites.html Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Nic Ferrier Sent: Monday, January 10, 2000 10:02 PM To: [EMAIL PROTECTED] Subject: Re: Who is using servlets? Betty Jo Booth [EMAIL PROTECTED] 11-Jan-00 2:23:48 AM I am asking because I have had concerns stressed to me regarding the ability of servlets to provide a scalable solution. One of the most popular remarks is that you never hear of any larger web applications using this technology. Is this true? You'll get lots of replies here telling you that it isn't. BT run Talk21 (a free email system with over a million users) on 8 machines with JRUN 2.0 on them. Nearlly all the issues we've had have been with back end directory and mail servers and none with the Java end. Nic Ferrier ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: e-mail apology
Paresh, Chad already appoligized. You might want to be nice to this guy since he is an authority on servlets and one great author! Tom Kochanowicz -Original Message-From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Paresh GheewalaSent: Monday, January 10, 2000 11:28 PMTo: [EMAIL PROTECTED]Subject: Re: e-mail apologyHey Chad Darby, Who is this guy and sending such type of junk mails. This E-Servlets Technical Forum and not your advertising WEB site. Don't send this types of mails and don't disturb technical people and waste the important time. Paresh Chad Darby wrote: Hello, Please accept my apology for advertising the servlets course on the servlets jsp lists. In the future, I will not send any advertisements to the lists. Corrective action has been taken. -- --- Chad (shod) Darby | J9 Consulting, Inc. [EMAIL PROTECTED] | http://www.j-nine.com --- ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: PreparedStatement trouble
It looks like you are using "name_of_table" where it should be the "column_name_of_table" Tom Kochanowicz protected final int COLUMN_POSITION = 1; displayStatementWordAdInfoView.setString(COLUMN_POSITION, some_variable_from_getParameter); -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Robert Pimentel Sent: Thursday, January 06, 2000 10:17 AM To: [EMAIL PROTECTED] Subject: PreparedStatement trouble Hi :) I apologize, slightly off-topic. I'm hoping a few people here have worked with JDBC. Having trouble with my preparedStatment. I'm trying to assign a value to my placeholder.The SQLException is raised. Error ORA-00903 Invalid table name. Here's some of the code. PreparedStatement pstmt = conn.prepareStatement("Select * from ?"); pstmt.setString(1, "name_of_table"); ResultSet rset = pstmt.executeQuery(); I've tried using different table names. No luck. I also tried assigning the value to a String first (i.e String tab_name = "name_of_table";). No luck. I've also tried PreparedStatement pstmt = conn.prepareStatement("Select column1 from ?"); In case the '*' was causing a problem. Still no luck. Is it even possible to dynamically assign the name of a table with a PreparedStatement?? Am I forgetting something?? Tia, -Robert- ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: Java Mail
What you may try to do is ping the smtp server first. This will tell you if you can "see" it from your server. Next, using your msgsend.class applet try : java msgsend -M mailhost.your_mail_host.att.net and see if it works. You should not need a password if your smtp host is configured correctly. If push comes to shove, ask your administrator if you can run the msgsend.class on the mail server. If it works there you know its not recognizing your server. By the way if you have a dial-up connection with some ISP and know the smtp mailhost the command mentioned above will work fine... I do it all the time. Tom Kochanowicz -Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Telmo Sá Sent: Wednesday, January 05, 2000 11:22 AM To: [EMAIL PROTECTED] Subject: Re: Java Mail Hi! About MSExhange. I have talked to my sys admin and e verified that we have SMTP and X400 installed. We have MSExchage4.0. (Can it be because of this??) I dont know what to do anymore. Is there anything in MSExchange that prevents users to telnet port 25? I am trying this: java msgsend -L smtp://me:[EMAIL PROTECTED] I still cant connect. What can i do? Telmo -Original Message- From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, January 05, 2000 3:47 PM To: [EMAIL PROTECTED] Subject: Re: Java Mail Telmo Sá wrote: Hello! I am trying to connect to MSExchange server from a servlet using Java Mail API. Has anyone successfuly did this or something close? I realy could use some hints on it. Every time i try to connect i get an error. I cant even connect using telnet to port 25. Thank you! Telmo I have a production application that sends hundreds of messages per day -- subscribed-to reports -- this way (via MS Exchange). Sounds like SMTP support is not enabled in your MS Exchange configuration. Have your mail admin check that out. If you cannot telnet to port 25 yourself, there's no way that Java will be able to either :-). Craig __ _ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Re: [Re: credit card validation servlet]
-Original Message- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Johnston Sent: Friday, December 31, 1999 6:50 PM To: [EMAIL PROTECTED] Subject: Re: [Re: credit card validation servlet] You don't need or want to dedicate something as heavyweight as a servlet to this, just a single object will do. Here's a package I wrote to do this... http://www.stanford.edu/~pcj/luhn/luhn1_0/ Paul -Original Message- From: Mahesh Patil [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday, December 29, 1999 8:38 AM Subject: Re: [Re: credit card validation servlet] If possible, please send me the same. Mahesh sachin rameshrao zingade [EMAIL PROTECTED] wrote: - Attachment: MIME Type: multipart/alternative - RE: credit card validation servletif possible please send the same to me Sachin - Original Message - From: Srinivas_Kondamudi To: [EMAIL PROTECTED] Sent: Thursday, December 09, 1999 11:12 AM Subject: Re: credit card validation servlet I am also working on an application that requires credit card validation. I am also interested in the same. Please send the servlet code to me also. Thanks in advance srinivas -Original Message- From: Rogatkin, Dmitry M [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 09, 1999 5:57 AM To: [EMAIL PROTECTED] Subject:Re: credit card validation servlet We have such part in the code of our servlet. If you are interested in, I can send this part to you. Dmitry. - Original Message - From: "Sameer Tyagi" To: [EMAIL PROTECTED] Sent: Wednesday, December 08, 1999 7:41 AM Subject: credit card validation servlet Hi, Does anyone know of any Java class /servlet that does basic credit card number validations ? -Sam ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html Get free email and a permanent address at http://www.netaddress.com/?N=1 ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html