[ANNOUNCEMENT]: Check out GlassFish, Sun's J2EE 5 codebase.
GlassFish https://glassfish.dev.java.net is a gathering place for developers who wish to participate in the community development of the latest version of Sun's Java System Application Server PE 9. This project provides a structured process for developing a better quality application server platform that makes the new features of J2EE 5 available faster than ever before while maintaining the most important feature of J2EE - compatibility. It is the response to Java developers who want access to the source code and want to contribute to the development of Sun's next generation application server. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
HTML: Get Method: Query String Length Check
Hi all, We are submitting a HTML form using GET method. Before submitting we need to find out whether the query string in the URL exceeds the maximum limit. The query string also contains multi byte charachters (like japanese,chinbese,korean... characters). Any pointers on, How to do the same? Regards, Arvind === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: TimeStamp Check
You will need to import and use java.util.Calendar java.util.GregorianCalendar I think the GregorianCalendar is much more useful. If you look up the API javadocs you will get a very nice example to start off with. With regards Rajesh Thiharie Aithent, New Delhi, India 91 124 6455511 x 109 Work I have to check two dates(TimeStamps) ,based on hours I will display the results. How can I check two timestamps Results I want in terms of hours... === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
TimeStamp Check
Hi, I have some problem in my project. Please help me. I have to check two dates(TimeStamps) ,based on hours I will display the results. How can I check two timestamps Results I want in terms of hours... Thanks and Regars srinivas MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Reading Check Boxes
Hi, Try with below java script code. Call a java script function b4 u submit the form and there u can set the check box values. /* for(var i=0;i4;i++){ if(document.form.elements[i].checked==true) document.form.elements[i].value=Y; else { document.form.elements[i].checked=true document.form.elements[i].value=N; } } */ Shamshad Alam [EMAIL PROTECTED] wrote: Dear All Hi-Tech-Minds I am using 3 checkboxes in an HTML form and initially all are checked with values Y. A JSP page reads these values by using ' String Array[] = rquest.getParameterValues(Checks) ' When all the checkboxes are checked the array contains 3 elements whose values are all Y .. But if any of the checkboxes in any order is UNCHECHED the array contains only those values which are checked and no value at all for the unchecked one. Is there any way to capture a different value of unchecked boxes in the same array? Looking forward to get your help. Thank you. --Shamshad Alam - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Reading Check Boxes
Dear All Hi-Tech-Minds I am using 3 checkboxes in an HTML form and initially all are checked with values Y. A JSP page reads these values by using ' String Array[] = rquest.getParameterValues(Checks) ' When all the checkboxes are checked the array contains 3 elements whose values are all Y .. But if any of the checkboxes in any order is UNCHECHED the array contains only those values which are checked and no value at all for the unchecked one. Is there any way to capture a different value of unchecked boxes in the same array? Looking forward to get your help. Thank you. --Shamshad Alam - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Reading Check Boxes
Questions much like this have been asked many times, so I would recommend that you check the list archives for a complete answer: http://archives.java.sun.com/jsp-interest.html For a short answer, no, there is no way to capture unchecked boxes. There is another solution though: name each checkbox differently, and create a hidden companion for each one. Example: input type=checkbox name=bob value=true input type=hidden name=bob value=false Then on the receiving end: String[] values = request.getParameterValues(); String bob = values[0]; The hidden will always be submitted, so if bob is not checked the value will be false, if bob is checked the value will be true. If you want all three checkboxes to have the same name, I don't believe there is a solution to your problem. Lance Lavandowska http://www.brainopolis.com - Original Message - From: Shamshad Alam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 07, 2002 12:40 PM Subject: Reading Check Boxes Dear All Hi-Tech-Minds I am using 3 checkboxes in an HTML form and initially all are checked with values Y. A JSP page reads these values by using ' String Array[] = rquest.getParameterValues(Checks) ' When all the checkboxes are checked the array contains 3 elements whose values are all Y .. But if any of the checkboxes in any order is UNCHECHED the array contains only those values which are checked and no value at all for the unchecked one. Is there any way to capture a different value of unchecked boxes in the same array? Looking forward to get your help. Thank you. --Shamshad Alam === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Reading Check Boxes
Tell me if I understood your problem correctly. Your problem: If you set values of all 3 checkboxes to Y, you don't really know which has been checked unless all three are checked or unchecked. If yes, the simple answer is to set values of checkboxes differently. So, when you read values using request.getParameterValues(checkBoxNames), you will be able to tell which has been checked and which has been unchecked. Hope this helps. June - Original Message - From: Shamshad Alam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 08, 2002 3:40 AM Subject: Reading Check Boxes Dear All Hi-Tech-Minds I am using 3 checkboxes in an HTML form and initially all are checked with values Y. A JSP page reads these values by using ' String Array[] = rquest.getParameterValues(Checks) ' When all the checkboxes are checked the array contains 3 elements whose values are all Y .. But if any of the checkboxes in any order is UNCHECHED the array contains only those values which are checked and no value at all for the unchecked one. Is there any way to capture a different value of unchecked boxes in the same array? Looking forward to get your help. Thank you. --Shamshad Alam - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ¡.a¨h gÊ«~·É¨h¡Êi×kz˶m§ÿæj)rj(r¢éì¹»®Þ¨¥¶b²Û®øÚ½«.ÊÂ+anr²('¡÷ÉHò LDDI1hØ zËfj)m¢X¬¶Ç«¾6¯j˧r°Ø[¡Ü¬zÒRSL2$Ò¢g«zW¯j{E(ý'«¾W±Æ§mçèºwZ¶m§ÿÚÈb½ë#jö¬ºw(øì¦)íz·¬¶fm§ÿãjö¬ºw(úk¡Û¶Ïã²ßj¨mXm¶ÿà ²«j{h¢¸'Ïøì§øì¥öªÊa¶Úÿ0«¹Êýöªþ)Ý{ì¦m§ÿðÃì¦)ì׫r
Re: Reading Check Boxes
HTML script function disp(i){ if(document.frm1.ch1[i].checked){ document.frm1.h1[i].value=Y; } else{ document.frm1.h1[i].value=N; } } /script % String v[] = request.getParameterValues(h1); for(int i=0;i3;i++){ if (v[i]==null || v[i].equals()){ v[i]=~; } out.println(v[i]); } % BODY form name=frm1 method=post action=ch1.jsp input type=checkbox name=ch1 checked onclick=disp(0) input type=hidden name=h1 value=Y input type=checkbox name=ch1 checked onclick=disp(1) input type=hidden name=h1 value=Y input type=checkbox name=ch1 checked onclick=disp(2) input type=hidden name=h1 value=Y input type=submit name=s1 value=Submit /form /BODY /HTML i hope it will help u Regards Vaishali Reliance Ind Ltd Ahmedabad Shamshad Alam [EMAIL PROTECTED]To: [EMAIL PROTECTED] .IN cc: Sent by: A Subject: Reading Check Boxes mailing list about Java Server Pages specification and reference JSP-INTEREST@JAV A.SUN.COM 07/07/02 11:10 PM Please respond to A mailing list about Java Server Pages specification and reference Dear All Hi-Tech-Minds I am using 3 checkboxes in an HTML form and initially all are checked with values Y. A JSP page reads these values by using ' String Array[] = rquest.getParameterValues(Checks) ' When all the checkboxes are checked the array contains 3 elements whose values are all Y .. But if any of the checkboxes in any order is UNCHECHED the array contains only those values which are checked and no value at all for the unchecked one. Is there any way to capture a different value of unchecked boxes in the same array? Looking forward to get your help. Thank you. --Shamshad Alam - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Check This
Hi Vaishali Check This if (mode.equals(1)){ String name=request.getParameter(ename); if( !name.length() ==0 || !name == null) { String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; }else { out.println(name); } } === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check This
but it always returns null in name i used this type of statement in my othere jsp and it works fine but here it is not see the emp.jsp !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN %@ page import = java.sql.*% %@ page import = pkgs.*% %! public static String nulltostring(String obj){ if(obj == null) { obj = ; } obj = obj.replace('',' '); return obj; } % % MyConnection con=new MyConnection(); Statement stmt = null; ResultSet rs = null; String qry =; int i = 1; try{ stmt = con.getCon(1); } catch(Exception e){ out.println(e); } String emp=request.getParameter(emp); if (emp==null){ emp=0; } % HTML HEAD TITLE Employee Master /TITLE META NAME=Generator CONTENT=EditPlus META NAME=Author CONTENT=Vaishali Pandya META NAME=Description CONTENT=Emplyee Master /HEAD script function doenable(){ parent.f1.document.emp_menu.per.disabled=false; parent.f1.document.emp_menu.off.disabled=false; parent.f1.document.emp_menu.acc.disabled=false; parent.f1.document.emp_menu.join.disabled=false; parent.f1.document.emp_menu.exp.disabled=false; parent.f3.emp_smenu.saveall.disabled=false; parent.f3.emp_smenu.resetall.disabled=false; } /script BODY BGCOLOR=B0B0B0 onload=doenable() CENTER h2 Employee Master /h2 /center % String mode = request.getParameter(mode); if (mode == null){ mode = 0; } if (mode.equals(1)){ String name=request.getParameter(ename); String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; out.println(updqry); // stmt.executeUpdate(updqry); } % form name=femp method=post action=emp.jsp % qry = Select * from hrm_employee_mas where emp_employee_no = + emp; rs = stmt.executeQuery(qry); if (rs.next()){ % a name=personal Personal TABLE border=2 width=100% tr td align=rightEmployee No /td tdinput style=width:100% type=text name=emp_no value =%=nulltostring(rs.getString(emp_employee_no))% /td /tr tr td align=rightOld Employee No /td tdinput style=width:100% type=text name=old_no value =%=nulltostring(rs.getString(emp_old_empno))% /td /tr tr td align=rightName /td tdinput style=width:100% type=text name=ename value=%=nulltostring(rs.getString(emp_empname))% /td /tr /TABLE /a % } rs.close(); stmt.close(); % /form /BODY /HTML Hi Vaishali Check This if (mode.equals(1)){ String name=request.getParameter(ename); if( !name.length() ==0 || !name == null) { String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; }else { out.println(name); } } === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check This
This code will surely throw up an error if name variable is null you have to check like if(!name == null || !name.length() ==0 ) { instead... because you are checking the lenght of the String first which possibly null... Happy Programming.. YOgaraj -Original Message- From: Daniel Jayapaul [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:13 PM To: [EMAIL PROTECTED] Subject: Check This Hi Vaishali Check This if (mode.equals(1)){ String name=request.getParameter(ename); if( !name.length() ==0 || !name == null) { String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; }else { out.println(name); } } === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check This
sigh if ( (name != null) (name.length() != 0) ) { } -Original Message- From: It, Cockpit (CAP, Contractor) [SMTP:[EMAIL PROTECTED]] Sent: 07 June 2002 10:53 To: [EMAIL PROTECTED] Subject: Re: Check This This code will surely throw up an error if name variable is null you have to check like if(!name == null || !name.length() ==0 ) { instead... because you are checking the lenght of the String first which possibly null... Happy Programming.. YOgaraj -Original Message- From: Daniel Jayapaul [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:13 PM To: [EMAIL PROTECTED] Subject: Check This Hi Vaishali Check This if (mode.equals(1)){ String name=request.getParameter(ename); if( !name.length() ==0 || !name == null) { String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; }else { out.println(name); } } == = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. == = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com -- ** The Truworths e-mail facility may not be used for the distribution of chain letters or offensive email. Truworths hereby distances itself from and accepts no liability for the unauthorised use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. Truworths furthermore disclaims liability for any unauthorised instruction for which permission was not granted. Please report abuse to [EMAIL PROTECTED] === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check This
update hrm_employee_mas set emp_empname = 'null' where emp_employee_no = 10018 this is the updstr it generates This code will surely throw up an error if name variable is null you have to check like if(!name == null || !name.length() ==0 ) { instead... because you are checking the lenght of the String first which possibly null... Happy Programming.. YOgaraj -Original Message- From: Daniel Jayapaul [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 2:13 PM To: [EMAIL PROTECTED] Subject: Check This Hi Vaishali Check This if (mode.equals(1)){ String name=request.getParameter(ename); if( !name.length() ==0 || !name == null) { String updqry=update hrm_employee_mas set emp_empname = ' + name + ' where emp_employee_no = + emp; }else { out.println(name); } } === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are notified that any dissemination, distribution or copy of this communication is strictly Prohibited. If you have received this message by error, please notify us immediately, return the original mail to the sender and delete the message from your system. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: How to check valid date?
See Validation taglib from Coldtags suite: http://www.servletsuite.com/jsp.htm -- Coldbeans Software - server-side Java (tm) components http://www.servletsuite.com __ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
How to check valid date?
Hi, How to check date (from input form) is valid date or not? (ie. 30 Feb 2003 is not valid date). Tks. -- sdgkhsf [EMAIL PROTECTED] -- http://fastmail.fm - Win a free email account: click here! === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: How to check valid date?
Take a look at java.util.Calendar Probably you are looking for the getActualMaximum method Jose Andrés -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of sdgkhsf Sent: miércoles, 29 de mayo de 2002 15:18 To: [EMAIL PROTECTED] Subject: How to check valid date? Hi, How to check date (from input form) is valid date or not? (ie. 30 Feb 2003 is not valid date). Tks. -- sdgkhsf [EMAIL PROTECTED] -- http://fastmail.fm - Win a free email account: click here! == = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: check file size before upload a file ?
hi, i have used the oreilly package for file uploading. over there the check is made for the file size. the max. limit is 1mb which is checked like // Check the content length to prevent denial of service attacks int length = req.getContentLength(); if (length maxSize) //maxSize is 1MB { throw new IOException(Posted content length of +length+ exceeds limit of + maxSize); } Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-3140 -Original Message- From: Gerald Reed [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 1:13 PM To: [EMAIL PROTECTED] Subject: check file size before upload a file ? Hi JSP developers, Is there an easy way to check the file size (and then stop the process if the file is larger than a predefined size) before upload a file? I briefly checked the discussion thread on file upload in this list. I did not see a direct answer. But, I am sure someone has worked out a solution. Thanks in advance! __ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
check file size before upload a file ?
Hi JSP developers, Is there an easy way to check the file size (and then stop the process if the file is larger than a predefined size) before upload a file? I briefly checked the discussion thread on file upload in this list. I did not see a direct answer. But, I am sure someone has worked out a solution. Thanks in advance! __ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
I think that the original poster was referring to server-side detection of whether checkboxes are checked. If so then I use this % String[] checkboxes = request.getParameterValues(checkboxname); if (checkboxes == null) { // none checked } else { // extract the values from the String array. } If not, this question concerns Javascript and not JSP. Soefara. From: Philip Steel [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check boxes Date: Tue, 12 Mar 2002 16:10:26 - yep - 5% are Netscape 4.** users - on a site getting 20,000 hits a day that's 1,000 potentially. If you're running an e-commerce site, 1,000 Netscape users suddenly become an important reason to make a site NS compliant. ;-) -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 16:01 To: [EMAIL PROTECTED] Subject: Re: Check boxes Do you know any other browser than IE? :-) - Original Message - From: Philip Steel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:40 Subject: Re: Check boxes except it's not cross-browser :-( -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 15:27 To: [EMAIL PROTECTED] Subject: Re: Check boxes This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp
Check boxes
Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
Correction: if (type == checkbox id== checked) - Original Message - From: Sami Saul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:26 Subject: Re: Check boxes This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
except it's not cross-browser :-( -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 15:27 To: [EMAIL PROTECTED] Subject: Re: Check boxes This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
Do you know any other browser than IE? :-) - Original Message - From: Philip Steel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:40 Subject: Re: Check boxes except it's not cross-browser :-( -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 15:27 To: [EMAIL PROTECTED] Subject: Re: Check boxes This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
netscape and opera for some of us linux only users;) -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 11:01 AM To: [EMAIL PROTECTED] Subject: Re: Check boxes Do you know any other browser than IE? :-) - Original Message - From: Philip Steel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:40 Subject: Re: Check boxes except it's not cross-browser :-( -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 15:27 To: [EMAIL PROTECTED] Subject: Re: Check boxes This way (array) can be very slow if you have a lot of checkboxes (I have a page with 1000). Try something like this: var cbs = document.all.tags(INPUT); for (var i=0; icbs.length; i++) with(cbs [i]) if (type == checkbox id= checked) doSomethng(); It's much more faster than use an array. Best regards, Sami - Original Message - From: Lai, Kenny [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 17:05 Subject: Re: Check boxes you need to put it in a javascript for or while loop, and check the formvalues as a ARRAY. (since checkboxes can be the same name for all the elements, javascript creates an array for this.) while in your for loop, if the condition meets, do such and such.. kenny -Original Message- From: Panayiotis Periorellis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: Check boxes Hello All, Can someone let me know how do we retrieve the value of a check box. How can I say in pseudo.. If (chekcbox C1 is checked) { Do this }// and if I would appreciate a response panos ==To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check boxes
Philip Steel wrote: yep - 5% are Netscape 4.** users - on a site getting 20,000 hits a day that's 1,000 potentially. If you're running an e-commerce site, 1,000 Netscape users suddenly become an important reason to make a site NS compliant. Not to mention: http://www.theregister.co.uk/content/4/24364.html If it's true (and with the register you never know), people operating IE 'optimized' websites are going to be in for an awful shock. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Check account using Java Mail
Hi list, Is there any way in Java Mail API to find if an account exists in a mail server. For example in [EMAIL PROTECTED]how do I find out if myAccount exists in domain.com before actually sending e-mail to that ID. Thanks, Srini === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
I don't think this is possible. Pls correct me if I am wrong. Thanks and Regards, Sabari Arasu AIG - TCS Chennai India -Original Message- From: srinivasan [SMTP:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 3:16 PM To: [EMAIL PROTECTED] Subject: Check account using Java Mail Hi list, Is there any way in Java Mail API to find if an account exists in a mail server. For example in [EMAIL PROTECTED]how do I find out if myAccount exists in domain.com before actually sending e-mail to that ID. Thanks, Srini == = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
Try sending VRFY command, but not all smtp server support it. At 05:04 AM 2/19/2002 -0500, you wrote: I don't think this is possible. Pls correct me if I am wrong. Thanks and Regards, Sabari Arasu AIG - TCS Chennai India === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
Will VRFY command return true or false. I don't think so... Thanks and Regards, Sabari Arasu AIG - TCS Chennai India -Original Message- From: Next Step [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:50 PM To: [EMAIL PROTECTED] Subject: Re: Check account using Java Mail Try sending VRFY command, but not all smtp server support it. At 05:04 AM 2/19/2002 -0500, you wrote: I don't think this is possible. Pls correct me if I am wrong. Thanks and Regards, Sabari Arasu AIG - TCS Chennai India == = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
No. You have to figure out yourself. VRFY root 250 2.1.5 [EMAIL PROTECTED] VRFY baduser 550 5.1.1 baduser... User unknown quit At 05:46 AM 2/19/2002 -0500, you wrote: Will VRFY command return true or false. I don't think so... Thanks and Regards, Sabari Arasu AIG - TCS Chennai India -Original Message- From: Next Step [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:50 PM To: [EMAIL PROTECTED] Subject: Re: Check account using Java Mail Try sending VRFY command, but not all smtp server support it. At 05:04 AM 2/19/2002 -0500, you wrote: I don't think this is possible. Pls correct me if I am wrong. Thanks and Regards, Sabari Arasu AIG - TCS Chennai India === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
where to use this VRFY command . Is this command related to windows? how to test this command. please throw some light if any one knows about this. Thanks Regards, Suryanarayana Murthy A Email: [EMAIL PROTECTED] Ph: 8291680 Ext:1137 / 1136 Dial-Comm: 8* 742-1114/1118 === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
VRFY is an internal SMTP command. There's no way to directly issue it using JavaMail, since it abstracts away that level of complexity. Suffice to say that there is no sure fire way to automatically verify a user's email address. Any email system that has an administrator with any brains has disabled the VRFY command in the server so that it will not work, plus it only works with SMTP servers to begin with. The only way to verify an email address is to send an email to it and watch for rejections or bounces. Or even better, make them reply to the mail before you'll consider it verified. You might have better luck with JavaMail questions in the JavaMail Interest List. (*Chris*) - Original Message - From: Suryanarayana Murthy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 6:02 AM Subject: Re: [JSP-INTEREST] Check account using Java Mail where to use this VRFY command . Is this command related to windows? how to test this command. please throw some light if any one knows about this. Thanks Regards, Suryanarayana Murthy A Email: [EMAIL PROTECTED] Ph: 8291680 Ext:1137 / 1136 Dial-Comm: 8* 742-1114/1118 === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Check account using Java Mail
Check out this site, they have some utilities you can use to validate email addresses. http://www.jscape.com/emailinspector/index.html Eric - Original Message - From: Chris Pratt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 01:43 pm Subject: Re: Check account using Java Mail VRFY is an internal SMTP command. There's no way to directly issue it using JavaMail, since it abstracts away that level of complexity. Suffice to say that there is no sure fire way to automatically verify a user's email address. Any email system that has an administrator with any brains has disabled the VRFY command in the server so that it will not work, plus it only works with SMTP servers to begin with. The only way to verify an email address is to send an email to it and watch for rejections or bounces. Or even better, make them reply to the mail before you'll consider it verified. You might have better luck with JavaMail questions in the JavaMail Interest List. (*Chris*) - Original Message - From: Suryanarayana Murthy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 6:02 AM Subject: Re: [JSP-INTEREST] Check account using Java Mail where to use this VRFY command . Is this command related to windows? how to test this command. please throw some light if any one knows about this. Thanks Regards, Suryanarayana Murthy A Email: [EMAIL PROTECTED] Ph: 8291680 Ext:1137 / 1136 Dial-Comm: 8* 742-1114/1118 === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: browswer check
Hi Rajinder, To see the result of change why don't you compile and run this piece of Java code: class Test { public static void main(String[] args){ long start1, start2, time1, time2; boolean junk; start1 = System.currentTimeMillis(); for (int i = 0; i 1000; i++){ if (Math.random() 0.5){ junk = true; } else { junk = false; } } time1 = System.currentTimeMillis() - start1; start2 = System.currentTimeMillis(); for (int i = 0; i 1000; i++){ junk = Math.random() 0.5; } time2 = System.currentTimeMillis() - start2; System.out.println(first: + time1 + second: + time2); } } Run the program a couple of times and see for yourself. Rajinder Sandhu wrote: can u tell me except redability, what else this modification has done ?? From: Ashish [mailto:[EMAIL PROTECTED]] Couldn't help modifying this! Let us avoid if (someBooleanExpression) { someVal = true; } else { someVal = false; } try instead to write someVal = someBooleanExpression; -- Ashish Shrestha Gha 2-482, Balajutar, Kathmandu, Nepal Phone: 977-1-350593. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: browswer check
Couldn't help modifying this! Let us avoid if (someBooleanExpression) { someVal = true; } else { someVal = false; } try instead to write someVal = someBooleanExpression; So: boolean isNetscape = userAgent.toLowerCase().indexOf(msie) == -1 userAgent.toLowerCase().indexOf(spoofer) == -1; Rajinder Sandhu wrote: %@ import=java.io.*,java.util.*,java.lang.Object,java.text.Format % % // using Java, determine if the browser is Netscape or MSIE boolean isNetscape = false; String userAgent = request.getHeader(User-Agent); if ( userAgent.toLowerCase().indexOf(msie) ==-1 userAgent.toLowerCase().indexOf(spoofer)==-1 ) { isNetscape = true; // browser is Netscape } else { isNetscape = false; // browser is NOT Netscape } % -- Ashish Shrestha Gha 2-482, Balajutar, Kathmandu, Nepal Phone: 977-1-350593. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: browswer check *some pitfalls*
hi, Don't rely entirely upon the user agent string. It will work only when the client computer connects directly with your server. If it comes through a proxy any of the following can happen - the client machine gets a cached copy in the proxy cache. so it might get the right version intended for it - the proxy might send its own user agent like mozilla (border manager/3.0) when a IE 5.0 browser might have made the actual request. In this case, the user agent detection logic will tell that the request is coming from a netscape browser! There are different variations of what these proxies can do! Regards, Nagarajan. -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Rajinder Sandhu Sent: Tuesday, December 18, 2001 8:05 AM To: [EMAIL PROTECTED] Subject: Re: browswer check %@ import=java.io.*,java.util.*,java.lang.Object,java.text.Format % % // using Java, determine if the browser is Netscape or MSIE boolean isNetscape = false; String userAgent = request.getHeader(User-Agent); if ( userAgent.toLowerCase().indexOf(msie) ==-1 userAgent.toLowerCase().indexOf(spoofer)==-1 ) { isNetscape = true; // browser is Netscape } else { isNetscape = false; // browser is NOT Netscape } % Hope this helps. Cheers!! Raj -Original Message- From: Sami Saul [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 12:28 PM To: [EMAIL PROTECTED] Subject: Re: browswer check Try request.getHeader(User-Agent) Regards, Sami Can anybody direct me to some code that will check browser version and type via jsp or tag? I don't particularly want to use javascript. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
browswer check
hey all, Can anybody direct me to some code that will check browser version and type via jsp or tag? I don't particularly want to use javascript. Thanks, Eric ___ eSafe Protect Gateway has scanned this mail for viruses, vandals and suspicious attachments.
Re: browswer check
Tryrequest.getHeader("User-Agent") Regards, Sami Can anybody direct me to some code that will check browser version and type via jsp or tag? I don't particularly want to use javascript.
Re: browswer check
%@ import="java.io.*,java.util.*,java.lang.Object,java.text.Format" %%// using Java, determine if the browser is Netscape or MSIEboolean isNetscape = false;String userAgent = request.getHeader("User-Agent");if ( userAgent.toLowerCase().indexOf("msie") ==-1 userAgent.toLowerCase().indexOf("spoofer")==-1 ){ isNetscape = true; // browser is Netscape} else{ isNetscape = false; // browser is NOT Netscape}% Hope this helps. Cheers!! Raj -Original Message-From: Sami Saul [mailto:[EMAIL PROTECTED]]Sent: Tuesday, December 18, 2001 12:28 PMTo: [EMAIL PROTECTED]Subject: Re: browswer check Tryrequest.getHeader("User-Agent") Regards, Sami Can anybody direct me to some code that will check browser version and type via jsp or tag? I don't particularly want to use javascript.
Re: browswer check
String userAgent = request.getHeader("User-Agent"); if ( userAgent.toLowerCase().indexOf("win") = 0 )// Windows userif ( userAgent.toLowerCase().indexOf("mac") = 0 ) // Apple/Mac userif ( userAgent.toLowerCase().indexOf("msie") ==-1 userAgent.toLowerCase().indexOf("spoofer")==-1 ) // browser is Netscape -Original Message-From: Sami Saul [mailto:[EMAIL PROTECTED]]Sent: Tuesday, December 18, 2001 12:28 PMTo: [EMAIL PROTECTED]Subject: Re: browswer check Tryrequest.getHeader("User-Agent") Regards, Sami Can anybody direct me to some code that will check browser version and type via jsp or tag? I don't particularly want to use javascript.
pls help to check if it is syntax error
here is the source code, for some reason, the balance just add up in string instead of amount, let's say original balance has $2000, after update $1000 its should has total $3000, but the the fact is $20001, pls help me out thanks! Franco String updatebalance =Update dsnuser set balance= balance+'+damount+' from dsnuser where cardnumber='+cardnumber+' ; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); if(updateCount 0) === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: pls help to check if it is syntax error
Take out the quotes around damount: String updatebalance =Update dsnuser set balance= balance+ +damount+ from dsnuser where cardnumber='+cardnumber+' ; -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Miao, Franco CAWS:EX Sent: Monday, November 12, 2001 2:12 PM To: [EMAIL PROTECTED] Subject: pls help to check if it is syntax error here is the source code, for some reason, the balance just add up in string instead of amount, let's say original balance has $2000, after update $1000 its should has total $3000, but the the fact is $20001, pls help me out thanks! Franco String updatebalance =Update dsnuser set balance= balance+'+damount+' from dsnuser where cardnumber='+cardnumber+' ; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); if(updateCount 0) === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: pls help to check if it is syntax error
Hello Miao: Assuming that cardnumber is of type string and balance is defined as number type in your DB, try this: String updatebalance =Update dsnuser set balance= + (balance+damount) + where cardnumber='+cardnumber+'; If balance is defined as a string, do this: String updatebalance =Update dsnuser set balance=' + (balance+damount) + ' where cardnumber='+cardnumber+'; Syed PS. FYI, I haven't tested this code. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
pls help to check if it is SQL syntax error
I put two SQL update statement in one Smt string get error, but when I put the same thing in SQL Squery Analyzer, it works fine no error. String updatebalance =Update dsnuser set balance= balance++tamount+ from dsnuser where fname='+fname+' lname='+lname+' Update dsnuser set balance= balance-+tamount+ from dsnuser where uname='+tname+' ; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); javax.servlet.ServletException: Line 1: Incorrect syntax near 'lname'. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: pls help to check if it is SQL syntax error
You are missing an and between +' and lname Margaret -Original Message- From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 3:51 PM To: [EMAIL PROTECTED] Subject: pls help to check if it is SQL syntax error I put two SQL update statement in one Smt string get error, but when I put the same thing in SQL Squery Analyzer, it works fine no error. String updatebalance =Update dsnuser set balance= balance++tamount+ from dsnuser where fname='+fname+' lname='+lname+' Update dsnuser set balance= balance-+tamount+ from dsnuser where uname='+tname+' ; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); javax.servlet.ServletException: Line 1: Incorrect syntax near 'lname'. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
pls help to check if syntax error
i am trying this way, but got problem in if(updateCount01 0 updateCount02 0) String updatestring01 =Update dsnuser set balance= balance++tamount+ from dsnuser where fname='+fname+' and lname='+lname+'; ; String updatestring02 =Update dsnuser set balance= balance-+tamount+ from dsnuser where uname='+tname+' ; // Get result code int updateCount01 = SQLStatement.executeUpdate(updatestring01); int updateCount02 = SQLStatement.executeUpdate(updatestring02); if(updateCount01 0 updateCount02 0){ out.println( );} else { .. } Franco === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: pls help to check if it is SQL syntax error
Try putting a semi-colon (;) between the 2 SQL statements. The Statement should look like : UPDATE dsnuser set balance= ..; Update dsnuser set balance= . If that does not work, check to see what is the Delimiter defined in the database. The same query may be working in SQL Query Analyser because you might have pressed the Enter key between the 2 statements - That also serves as a statement delimiter. Miao, Franco CAWS:EX To: [EMAIL PROTECTED] Franco.Miao@GEMS7. cc: GOV.BC.CASubject: pls help to check if it is SQL syntax error Company Name: Sent by: A mailing (for outgoing fax only) list about Java Comp Server PagesC specification and reference JSP-INTEREST@JAVA. SUN.COM 13/11/01 07:50 AM Please respond to A mailing list about Java Server Pages specification and reference I put two SQL update statement in one Smt string get error, but when I put the same thing in SQL Squery Analyzer, it works fine no error. String updatebalance =Update dsnuser set balance= balance++tamount+ from dsnuser where fname='+fname+' lname='+lname+' Update dsnuser set balance= balance-+tamount+ from dsnuser where uname='+tname+' ; // Get result code int updateCount=SQLStatement.executeUpdate(updatebalance); javax.servlet.ServletException: Line 1: Incorrect syntax near 'lname'. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com NOTICE: This communication is meant only for the addressee(s) named above and may contain information which is confidential and/or legally privileged. If you are not the named addressee(s), or the agent responsible for receiving and delivering this communication to the named addressee(s), this communication has been sent to you in error. If so, kindly notify the sender and delete the information immediately. Unauthorised dissemination, distribution, copying or reliance on this communication is prohibited and may attract criminal penalties. Thank you. === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
??? Newbie TagExtraInfo.isValid() Sanity Check ???
Hello, I'm new to Taglibs and I wanted to verify my understanding about the TagExtraInfo.isValid() method. I have a validation rule that requires me to examine the *value* of an attribute on a custom tag. As a simple example, let's say I have this: mz:SomeTag attrib=xxx/ If the attrib value is xxx I want the isValid() method to return true, otherwise, return false. So far, so good. But what should I do when the value for attrib can be a runtime expression like this: mz:SomeTag attrib=%=someVar/ In this case the isValid() method cannot determine the value of the runtime expression, since isValid() is called at translation time. I'm guessing I will have to verify the value of the attrib from within the doStartTag() method. Am I missing something here? Is there a simple way to examine a runtime attribute from within the isValid() method?? Thanks very much, Mari __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
To check the field
All, Anyboyd would like to share how easy to check the field which is string but only 1 or 1.0 or 2.1 such data can be entered. I could do it if I put the data field as number(10,1) something, but it can not be retrieved from the perl script. So I put the data field as varchar2 (oracle db), and now I need to validate the data entry in the user interface. User can not put string 'a', or 'a.a' . Thanks, Carol === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: To check the field
We do this using Java Script as follow function isCurrency(userEntry) { var decimalPoint = /\./; var digitsAfterDecimal = /\..{1,2}$/; if (decimalPoint.test(userEntry) == true){ if (digitsAfterDecimal.test(userEntry)==false) return false; else return true; } else return true; } if (isCurrency(txtAmount) == false){ alert("Item price should have only 2 digits after decimal point"); frmDelivery.txtPrice.focus(); return false; } if (txtAmount).indexOf('.')) == -1) (txtAmount.length 11)) || (((txtAmount).indexOf('.')) 11)){ alert("Item price is too big "); frmDelivery.txtPrice.focus(); return false; } Trust this will help Have a nice day Balkrishna R Parab Global TeleSystem Ltd Although Champions dont always win, winners ,it seems always have champions. -Original Message- From: Carol Geng [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 12:43 PM To: [EMAIL PROTECTED] Subject: [JSP-INTEREST] To check the field All, Anyboyd would like to share how easy to check the field which is string but only 1 or 1.0 or 2.1 such data can be entered. I could do it if I put the data field as number(10,1) something, but it can not be retrieved from the perl script. So I put the data field as varchar2 (oracle db), and now I need to validate the data entry in the user interface. User can not put string 'a', or 'a.a' . Thanks, Carol === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
Ok. So let's call it a role instead of a priv (a role being a set of privs). Somehow the work to tie the user making a webserver request to a role has to be done in order for the javabean to return its boolean response: utils:ifInRole name="managers" a href="managerlink/" ManagerLink /a /utils:ifInRole The javabean might as well be called "ifUserInRole". So, the question is how are you authenticating universally that the user is in the role. You can go to the DB every time that you see this bean, but you pay to do that if the whole site is role based, or you can store the roles (as very small strings) in the servlet session. From: Joseph Ottinger [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Thu, 22 Feb 2001 10:34:03 -0500 I still disagree, and here's why: privileges should be assigned to roles, not specific users. I don't know of a web server that doesn't support the concept of a role; the idea is "don't expose this section of the web site to people who aren't in this role," which means that the authentication mechanism STILL takes care of it. If you're trying to not even expose a link to a protected resource, it gets a TAD more complicated, but not by much: you'd wrap the links in an if, based on role validation. In tag parlance: utils:ifInRole name="managers" a href="managerlink/" ManagerLink /a /utils:ifInRole Using scriptlets wouldn't be much different. This way, the container is still maintaining this information, and your app doesn't have to know about it - to me, this is STILL a more elegant solution. I don't mean that you simply cannot win the "JBO Seal of Approval" (a very valuable award - it, plus three quarters, will buy you a cup of coffee and a lot of strange looks in most places) if you store user information in a session - but that you don't have to store user information in sessions to achieve what you're talking about. And you're also correct in that it's not always black and white - but it is for most cases. (If you're in one of the myriad cases where it's NOT black and white, then you generally know what to do about it anyway.) From: Tom Preston [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Thu, 22 Feb 2001 15:20:45 - There are cases where you may need to store some info about the user's authentication or privilege information in a session. Saying "don't ever put authentication information in a session" is wrong. You may have a set of private pages (or sites) that should only be seen by a certain set of users. It is not unacceptable on user login to store some info about this user's privs in the sessionthat way you don't continually go back to the db to check if it is ok for the user to see this page. You prob don't want to store the username/password in the session, but storing the users privs in memory is not necessarily badthese auth questions often have to do with number of sites/pages that you support, different sets of users that you support, and total number of users that you support. This is not so black and white. From: Joseph Ottinger [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Wed, 21 Feb 2001 09:05:46 -0500 The *protocol* doesn't do anything but support the transmission of authentication information. When a request for a protected resource is made, the server sends back a response saying "You need to send me authentication information for realm XYZ," which the browser turns into a dialog box (for BASIC authentication; there are other methods, such as form-based, and certificate-based.) Form-based is closer to what people expect here, but it's J2EE-specific as far as I know; see the J2EE spec for more details. The end result in *all* cases, however, is that the container manages the autentication, which is what it's supposed to do - not what you're supposed to do. From: Piyush Jain [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] Subject: RE: Check security for userID password Date: Wed, 21 Feb 2001 10:14:29 - Dear Mr.Joseph, I did not understand that how HTTP protocol will authenticate the user. If you could give me some example or link describing the same, i would be grateful to you. I am presently doing the same using static hashmap from a java class whose instance i am calling in every jsp page and the comparing the value of the key. hope i am not disturbing you and clear in my question. Best Regards piyush. -Original Message- From: Joseph
Re: Check security for userID password
The *protocol* doesn't do anything but support the transmission of authentication information. When a request for a protected resource is made, the server sends back a response saying "You need to send me authentication information for realm XYZ," which the browser turns into a dialog box (for BASIC authentication; there are other methods, such as form-based, and certificate-based.) Form-based is closer to what people expect here, but it's J2EE-specific as far as I know; see the J2EE spec for more details. The end result in *all* cases, however, is that the container manages the autentication, which is what it's supposed to do - not what you're supposed to do. From: Piyush Jain [EMAIL PROTECTED] To: "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] Subject: RE: Check security for userID password Date: Wed, 21 Feb 2001 10:14:29 - Dear Mr.Joseph, I did not understand that how HTTP protocol will authenticate the user. If you could give me some example or link describing the same, i would be grateful to you. I am presently doing the same using static hashmap from a java class whose instance i am calling in every jsp page and the comparing the value of the key. hope i am not disturbing you and clear in my question. Best Regards piyush. -Original Message- From: Joseph Ottinger [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 9:19 PM To:[EMAIL PROTECTED] Subject: Re: Check security for userID password You're doing too much work. The HTTP protocol allows authentication and authorization to be handled by the web server; it's usually easier to maintain, and is much faster than handling it yourself. Adding an interception servlet is all well and good, but adds a manual interception point; if the protocol supports it, it's going to be faster and more portable than a hand-written solution. Don't store user/pass in sessions! From: CJ Smessaert [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Tue, 20 Feb 2001 09:24:50 -0600 i solved this using a bit of a 'hybrid'. basically, i registered an authentication servlet as an alias within the servlet container, mapped to /. so, anytime a user requests a url with the alias in it, the servlet gets executed, checking whether the user is authenticated. if they aren't, they get redirected to login. if they are, they see the requested item. nice thing is, it works for ANY content requested (.html, .pdf, etc) and not just .jsp. -Original Message- From: Hines, Bill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password But also, doing it this way (with no tags in the page), you are allowing a non-logged in user to see the JSP page. In some cases this is unacceptable, and you must have a tag at the top of each page that checks to see if the user is logged in. Bill Hines Hershey Foods. -Original Message- From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpag
Re: Check security for userID password
Check for userid . and if thats not available redirect him to login page . this is how we do it userID and role is in session if ((session.getValue("userId") == null) || (session.getValue("role") == null)) { % jsp:forward page="../../user/Login2.jsp"/jsp:forward % } else { strUserId = (String)session.getValue("userId"); strUserRole = (String)session.getValue("role"); } trust this will help u BR - Original Message - From: "Sebastien Cesbron" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 19, 2001 11:42 PM Subject: Re: [JSP-INTEREST] Check security for userID password But, even if you are using the Model2 architecture, the user can access directly the other JSP pages by writing the URL in his navigator. So how do you handle this problem without scriplet ? Seb Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Thuy Murphy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 20, 2001 1:42 AM Subject: Check security for userID password I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. Thanks in advance!! __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
But also, doing it this way (with no tags in the page), you are allowing a non-logged in user to see the JSP page. In some cases this is unacceptable, and you must have a tag at the top of each page that checks to see if the user is logged in. Bill Hines Hershey Foods. -Original Message- From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
i solved this using a bit of a 'hybrid'. basically, i registered an authentication servlet as an alias within the servlet container, mapped to /. so, anytime a user requests a url with the alias in it, the servlet gets executed, checking whether the user is authenticated. if they aren't, they get redirected to login. if they are, they see the requested item. nice thing is, it works for ANY content requested (.html, .pdf, etc) and not just .jsp. -Original Message- From: Hines, Bill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password But also, doing it this way (with no tags in the page), you are allowing a non-logged in user to see the JSP page. In some cases this is unacceptable, and you must have a tag at the top of each page that checks to see if the user is logged in. Bill Hines Hershey Foods. -Original Message- From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
You're doing too much work. The HTTP protocol allows authentication and authorization to be handled by the web server; it's usually easier to maintain, and is much faster than handling it yourself. Adding an interception servlet is all well and good, but adds a manual interception point; if the protocol supports it, it's going to be faster and more portable than a hand-written solution. Don't store user/pass in sessions! From: CJ Smessaert [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Tue, 20 Feb 2001 09:24:50 -0600 i solved this using a bit of a 'hybrid'. basically, i registered an authentication servlet as an alias within the servlet container, mapped to /. so, anytime a user requests a url with the alias in it, the servlet gets executed, checking whether the user is authenticated. if they aren't, they get redirected to login. if they are, they see the requested item. nice thing is, it works for ANY content requested (.html, .pdf, etc) and not just .jsp. -Original Message- From: Hines, Bill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password But also, doing it this way (with no tags in the page), you are allowing a non-logged in user to see the JSP page. In some cases this is unacceptable, and you must have a tag at the top of each page that checks to see if the user is logged in. Bill Hines Hershey Foods. -Original Message- From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
protocol handling by the web server is definitely the more desired method, however, based on my applications requirement (custom authentication against user database, minimal server configuration/administration overhead, ie. multiple users and/or basic challenge, and no basic challenge login box), it was throw-out for the current implementation of using a servlet alias. right or wrong, my solution addressed the requirements. and if anyone's successfully managed the authentication headers via java, i'd love to see their code. btw, i agree with not storing user/pw in sessions. i only store an authenticated boolean. -Original Message- From: Joseph Ottinger [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 9:49 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password You're doing too much work. The HTTP protocol allows authentication and authorization to be handled by the web server; it's usually easier to maintain, and is much faster than handling it yourself. Adding an interception servlet is all well and good, but adds a manual interception point; if the protocol supports it, it's going to be faster and more portable than a hand-written solution. Don't store user/pass in sessions! From: CJ Smessaert [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Date: Tue, 20 Feb 2001 09:24:50 -0600 i solved this using a bit of a 'hybrid'. basically, i registered an authentication servlet as an alias within the servlet container, mapped to /. so, anytime a user requests a url with the alias in it, the servlet gets executed, checking whether the user is authenticated. if they aren't, they get redirected to login. if they are, they see the requested item. nice thing is, it works for ANY content requested (.html, .pdf, etc) and not just .jsp. -Original Message- From: Hines, Bill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 8:11 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password But also, doing it this way (with no tags in the page), you are allowing a non-logged in user to see the JSP page. In some cases this is unacceptable, and you must have a tag at the top of each page that checks to see if the user is logged in. Bill Hines Hershey Foods. -Original Message- From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:54 AM To: [EMAIL PROTECTED] Subject: Re: Check security for userID password Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets ==
Check security for userID password
I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. Thanks in advance!! _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
Don't do this. This is not an application-level problem; this is a container-level problem, and as such, whatever server you're using is responsible for handling user logins. Doing it manually is easy, but wrong. From: Thuy Murphy [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Check security for userID password Date: Mon, 19 Feb 2001 15:12:22 -0500 I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
HI, set a flag (lets say "isLogged") in session in login page to true when you have verified the login name. then if user wants to go to any other page (which require him/her to login first), Simply check for the true value of "isLogged" flag. if the value is true and not null then allow the display of current page else ... redirect the flow to login page or some error page. I hope this will help. :) Yours Sincerely, Jabran Asghar -Original Message- From: Thuy Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 1:12 AM To: [EMAIL PROTECTED] Subject: Check security for userID password I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. Thanks in advance!! _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Thuy Murphy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 20, 2001 1:42 AM Subject: Check security for userID password I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. Thanks in advance!! _ Get your FREE download of MSN Explorer at http://explorer.msn.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Check security for userID password
But, even if you are using the Model2 architecture, the user can access directly the other JSP pages by writing the URL in his navigator. So how do you handle this problem without scriplet ? Seb Two ways of doing it depending on which architecture model are you using Assuming you have a Login Bean which would hold the user name and password which is placed into the users session when the user successfully logs in. If you are using the Model 2 architecture keep a check (an if statement) in the controller servlet which would try to get the Login Bean from the users session (using the getAttribute() method ). If it returns null then redirect the user to the login page, if not give him the access. In case you are using the Model 1 architecture, you would need to place the check (an if statement) in every jsp page that requires the user to be logged in. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Thuy Murphy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 20, 2001 1:42 AM Subject: Check security for userID password I need help on how to keep user id password so I can check to make sure if somone select a page without login it will display login page and ask the user to enter user name password. I know that we can keep them in session (how?)... I also know the session will be expired in 30 minutes or so... If you know how to solve this problem, please reply the answer I will be appriciated. Thanks in advance!! __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
Thanks dear, But I am unaware about controller servlet. Can u give me some example or some code that can guide me for this. Also I found in servlet help I didnt get anything like this. So please guide me for this in some details. Thanks Taral Shah ([EMAIL PROTECTED]) - Original Message - From: Marco M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 17, 2001 1:14 PM Subject: Re: please Help --session check hi if you are using JSP Model 2 architecture, or Struts, you can check everything in the controller servlet i got the same problem (and i had 50 JSP already done after my manager told me that he forgot to tell me to check if the user was null.) i did not want to change all the Action classes, or all the JSPs..so i checked in the servlet hope this helps br marco -Original Message- From: ext Claudio Lorico [mailto:[EMAIL PROTECTED]] Sent: 16. January 2001 18:45 To: [EMAIL PROTECTED] Subject: Re: please Help --session check What you're thinking is quite right and it can be better if you will use a custom tag for that purpose. --- Deepak C S [EMAIL PROTECTED] wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
Hey.. Ive finally decide to put the Session Checking logic in a Bean...any comments on this??? -- From: Marco M[SMTP:[EMAIL PROTECTED]] Reply To: A mailing list about Java Server Pages specification and reference Sent: Wednesday, January 17, 2001 1:14 PM To: [EMAIL PROTECTED] Subject: Re: please Help --session check hi if you are using JSP Model 2 architecture, or Struts, you can check everything in the controller servlet i got the same problem (and i had 50 JSP already done after my manager told me that he forgot to tell me to check if the user was null.) i did not want to change all the Action classes, or all the JSPs..so i checked in the servlet hope this helps br marco -Original Message- From: ext Claudio Lorico [mailto:[EMAIL PROTECTED]] Sent: 16. January 2001 18:45 To: [EMAIL PROTECTED] Subject: Re: please Help --session check What you're thinking is quite right and it can be better if you will use a custom tag for that purpose. --- Deepak C S [EMAIL PROTECTED] wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
hi, i would have preferred to put in the servlet-controller :-) -Original Message- From: ext Deepak C S [mailto:[EMAIL PROTECTED]] Sent: 17. January 2001 11:40 To: [EMAIL PROTECTED] Subject: Re: please Help --session check Hey.. Ive finally decide to put the Session Checking logic in a Bean...any comments on this??? -- From: Marco M[SMTP:[EMAIL PROTECTED]] Reply To: A mailing list about Java Server Pages specification and reference Sent: Wednesday, January 17, 2001 1:14 PM To: [EMAIL PROTECTED] Subject: Re: please Help --session check hi if you are using JSP Model 2 architecture, or Struts, you can check everything in the controller servlet i got the same problem (and i had 50 JSP already done after my manager told me that he forgot to tell me to check if the user was null.) i did not want to change all the Action classes, or all the JSPs..so i checked in the servlet hope this helps br marco -Original Message- From: ext Claudio Lorico [mailto:[EMAIL PROTECTED]] Sent: 16. January 2001 18:45 To: [EMAIL PROTECTED] Subject: Re: please Help --session check What you're thinking is quite right and it can be better if you will use a custom tag for that purpose. --- Deepak C S [EMAIL PROTECTED] wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
yes u can definitely keep the authentication part of code in a separate JSP file and then include that file either static include or dynamic.. Static include: %@ include file="relativeURL" % The include directive inserts a file of text or code in a JSP file at translation time, when the JSP file is compiled. The include process is static. A static include means that the text of the included file is added to the JSP file. or dynamic include: jsp:include page="{ relativeURL | %= expression %} flush="true" / The jsp:include tag allows you to include either a static or dynamic file. A static file is parsed and its content included in the calling JSP page. A dynamic file acts on the request and sends back a result that is included in the JSP page. I think this should help u... Meghana. On Tue, 16 Jan 2001, Deepak C S wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets ** We have no right to ask when sorrow comes, "Why did this happen to me?" Unless we ask the same question for every moment of happiness that comes our way. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
What you're thinking is quite right and it can be better if you will use a custom tag for that purpose. --- Deepak C S [EMAIL PROTECTED] wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
hi u put all the session authentication logic in one file and include that file in every file where u want to check the authentication. This would be much better, since any change required may be simply changed in one page Hope this helps --Raghu - Original Message - From: Deepak C S [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 1:37 PM Subject: please Help --session check hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please Help --session check
hi if you are using JSP Model 2 architecture, or Struts, you can check everything in the controller servlet i got the same problem (and i had 50 JSP already done after my manager told me that he forgot to tell me to check if the user was null.) i did not want to change all the Action classes, or all the JSPs..so i checked in the servlet hope this helps br marco -Original Message- From: ext Claudio Lorico [mailto:[EMAIL PROTECTED]] Sent: 16. January 2001 18:45 To: [EMAIL PROTECTED] Subject: Re: please Help --session check What you're thinking is quite right and it can be better if you will use a custom tag for that purpose. --- Deepak C S [EMAIL PROTECTED] wrote: hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
please Help --session check
hi people, As a part of authentication check, I am checking for a session attribute to validate user login across pages. eg: if (session.getAttr("user")==null){ sendRedirect(loginpage); } But now, I am keeping these lines in all my jsp files(cut and paste)..If I have to change somethg with that I need to change in all jsp pages.. Is there any better way than this?? like keeping session -checking code in seperate file and including in all pages?? pls help. Thanx in adv, Deeps === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
hey there casey, howya doing? i went on a java course for two days, i come back and what's waiting for me? about 16 thousand jsp-interest emails. it's amazing how many you get, mostly repeats and "i'm out of the office" messages. so, what's new in the town of wash? maurice. JSP Insider wrote: A nice email Javascript I have used in the past goes as follows function emailCheck (emailStr) { var emailPat=/^(.+)@(.+)$/ var specialChars="\\(\\)@,;:\\\"\\.\\[\\]" var validChars="\[^\\s" + specialChars + "\]" var firstChars=validChars var quotedUser="(\"[^\"]*\")" var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ var atom="(" + firstChars + validChars + "*" + ")" var word="(" + atom + "|" + quotedUser + ")" var userPat=new RegExp("^" + word + "(\\." + word + ")*$") var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$") var matchArray=emailStr.match(emailPat) if (matchArray==null) {alert("E-mail address seems incorrect (check @ and .'s)") return false } var user=matchArray[1] var domain=matchArray[2] // See if "user" is valid if (user.match(userPat)==null) { // user is not valid alert("The username section of the e-mail address doesn't seem to be valid.") return false } /* if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid. */ var IPArray=domain.match(ipDomainPat) if (IPArray!=null) { // this is an IP address for (var i=1;i=4;i++) { if (IPArray[i]255) { alert("Destination IP address is invalid!") return false } } return true } // Domain is symbolic name var domainArray=domain.match(domainPat) if (domainArray==null) { alert("The domain name doesn't seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length2 || domArr[domArr.length-1].length3) { // the address must end in a two letter or three letter word. alert("The address must end in a three-letter domain, or two letter country.") return false } if (domArr[domArr.length-1].length==2 len3) { var errStr="This address ends in two characters, which is a country" errStr+=" code. Country codes must be preceded by " errStr+="a hostname and category (like com, co, pub, pu, etc.)" alert(errStr) return false } if (domArr[domArr.length-1].length==3 len2) { var errStr="This address is missing a hostname!" alert(errStr) return false } return true; } Hope this helps Casey Kochmer [EMAIL PROTECTED] www.jspinsider.com From: "Jan D. Herzhoff" [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: check emailadress Date: Wed, 20 Sep 2000 10:56:23 +0200 Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, J/~\n === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets -- Maurice Coyle, Sun Microsystems Ireland. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
check emailadress
Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, J/~\n === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
hava a try this if (email.indexOf("@")=0) { alert("invalid email address"); return; } Xia Yu P.R.China - Original Message - From: "Jan D. Herzhoff" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 20, 2000 4:56 PM Subject: check emailadress Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, J/~\n === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
Hi, I think you should better do it with JavaScript. It's better because it's done in client side. - Mensaje Original - De: "Jan D. Herzhoff" [EMAIL PROTECTED] Fecha: Miércoles, Septiembre 20, 2000 9:56 am Asunto: check emailadress Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, J/~\n === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
You can do this with JavaScript. Here is a sample Javascript code for validating e-mail address. /* == FUNCTION: isValidEmail INPUT: str (string) - an e-mail address to be tested RETURN: true, if the string contains a valid e-mail address which is a string plus an '@' character followed by another string containing at least one '.' and ending in an alpha (non-punctuation) character. false, otherwise CALLS: isBlank(), isAlpha() which are defined elsewhere in the Script Library PLATFORMS: Netscape Navigator 3.01 and higher, Microsoft Internet Explorer 3.02 and higher, Netscape Enterprise Server 3.0, Microsoft IIS/ASP 3.0. == */ function isValidEmail( str ) { // Return immediately if an invalid value was passed in if (str+"" == "undefined" || str+"" == "null" || str+"" == "") return false; var isValid = true; str += ""; namestr = str.substring(0, str.indexOf("@")); // everything before the '@' domainstr = str.substring(str.indexOf("@")+1, str.length); // everything after the '@' // Rules: namestr cannot be empty, or that would indicate no characters before the '@', // domainstr must contain a period that is not the first character (i.e. right after // the '@'). The last character must be an alpha. if (isBlank(str) || (namestr.length == 0) || (domainstr.indexOf(".") = 0) || (domainstr.indexOf("@") != -1) || !isAlpha(str.charAt(str.length-1))) isValid = false; return isValid; } // end isValidEmail -- Cheers, Vinod -Original Message- From: Jan D. Herzhoff [mailto:[EMAIL PROTECTED]] Sent: 20 September 2000 18:56 To: [EMAIL PROTECTED] Subject: check emailadress Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
Hello: Javascript is the solution. The code HTML for the form is: form action="YourJSP.jsp" method="POST" name="alta" e-mail: input type="Text" name="email" size="20" maxlength="50" br input type="button" value="Registrarme" name="Button" onclick="javascript:chequear()" /form The code javascript for test de email is: // The script use a regular expresion for test de string. function chequear() { if (document.layers||document.all) { var filter=/^.+@.+\..{2,3}$/ var str = document.alta.email.value; if (filter.test(str)){ document.alta.submit(); } else{ alert("The e-mail is bad "+ str) document.alta.email.focus(); return; } } else{ if(document.alta.email.value.length6){ alert("The e-mail is bad ") document.alta.email.focus(); return; } else document.alta.submit(); } } /script -Original Message- From: Jan D. Herzhoff [mailto:[EMAIL PROTECTED]] Sent: 20 September 2000 18:56 To: [EMAIL PROTECTED] Subject: check emailadress Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets -- - Miguel Angel Fernandez Roiz LoboCom Sistemas, s.l. web: http://www.lobocom.es e-mail: [EMAIL PROTECTED] - === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: check emailadress
A nice email Javascript I have used in the past goes as follows function emailCheck (emailStr) { var emailPat=/^(.+)@(.+)$/ var specialChars="\\(\\)@,;:\\\"\\.\\[\\]" var validChars="\[^\\s" + specialChars + "\]" var firstChars=validChars var quotedUser="(\"[^\"]*\")" var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/ var atom="(" + firstChars + validChars + "*" + ")" var word="(" + atom + "|" + quotedUser + ")" var userPat=new RegExp("^" + word + "(\\." + word + ")*$") var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$") var matchArray=emailStr.match(emailPat) if (matchArray==null) {alert("E-mail address seems incorrect (check @ and .'s)") return false } var user=matchArray[1] var domain=matchArray[2] // See if "user" is valid if (user.match(userPat)==null) { // user is not valid alert("The username section of the e-mail address doesn't seem to be valid.") return false } /* if the e-mail address is at an IP address (as opposed to a symbolic host name) make sure the IP address is valid. */ var IPArray=domain.match(ipDomainPat) if (IPArray!=null) { // this is an IP address for (var i=1;i=4;i++) { if (IPArray[i]255) { alert("Destination IP address is invalid!") return false } } return true } // Domain is symbolic name var domainArray=domain.match(domainPat) if (domainArray==null) { alert("The domain name doesn't seem to be valid.") return false } var atomPat=new RegExp(atom,"g") var domArr=domain.match(atomPat) var len=domArr.length if (domArr[domArr.length-1].length2 || domArr[domArr.length-1].length3) { // the address must end in a two letter or three letter word. alert("The address must end in a three-letter domain, or two letter country.") return false } if (domArr[domArr.length-1].length==2 len3) { var errStr="This address ends in two characters, which is a country" errStr+=" code. Country codes must be preceded by " errStr+="a hostname and category (like com, co, pub, pu, etc.)" alert(errStr) return false } if (domArr[domArr.length-1].length==3 len2) { var errStr="This address is missing a hostname!" alert(errStr) return false } return true; } Hope this helps Casey Kochmer [EMAIL PROTECTED] www.jspinsider.com From: "Jan D. Herzhoff" [EMAIL PROTECTED] Reply-To: A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: check emailadress Date: Wed, 20 Sep 2000 10:56:23 +0200 Hi,. I am a newbie in JSP and I would like to create a form with an error script. If someone types an email adress without an "@" for example an error code should appear. How can I do this or what else do I have to check? Thanks and best regards, J/~\n === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
how to check empty ResultSet..?
hi friends can anyone of u please tell me how to check whether ResultSet is empty ,before retrieving record from that... is there any method given by JDBC2.0 version? or any other suggestion? will appreciate ur reply. Rajesh __ Do You Yahoo!? Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: how to check empty ResultSet..?
Hello Rajesh, Saturday, August 26, 2000, 4:56:17 PM, you wrote: RS can anyone of u please tell me how RS to check whether ResultSet is empty RS ,before retrieving record from RS that... RS is there any method given by JDBC2.0 version? RS or any other suggestion? With first call to method ResultSet.next() you can test for avalability of data in resultset. First call points cursor to the first row only and returns true if it action successful and false in another case. For example: private ResultSet rs = statement.executeQuery(); if( rs.next() ) { .. place you code to process results here } else { System.out.println("nothing"); } -- Best regards, Olegmailto:[EMAIL PROTECTED] === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
leap Year check method in JavaScript
Is there any better way in Java Script to do a leap year check. One way of doing it is to take the sub string for year from the date and check for it. Thanks, === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Problems in retrieving data from database by selecting multiple check boxes
Hi Berin: Your codes work correctly in my side. I do not know what's wrong with your codes in your side. It gives your compile error, run error or just do not show the records in the db? Have you deploied the test3 javabeans? Have you changed the codes in test3java file and compiled it? Xgh. - Original Message - From: Biren Patnaik To: [EMAIL PROTECTED] Sent: Monday, June 12, 2000 05:31 PM Subject: Re: Problems in retrieving data from database by selecting multiple check boxes Hi Xing, Thanks a lot for ur kind help.Today I tried to run the program given by u.But the selected records are not shown .I have added codes in ur /* before close the rs, get the records yourself. */ Please check it why it is not working === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Problems in retrieving data from database by selecting multiple check boxes
Hi Xing, Thanks a lot for ur kind help.Today I tried to run the program given by u.But the selected records are not shown .I have added codes in ur /* before close the rs, get the records yourself. */ Please check it why it is not working test2.jsp html head title Database Search /title /head body background="background8.jpg" bgcolor="#FF" bgproperties="fixed" %@ page language="java" import="java.sql.*" % jsp:useBean id="db" class="com.wrox.jspexamples.test3" / %! ResultSet rs = null;% %! String tablename;% %! int p;% %! int numColumns; ResultSetMetaData rsmd = null; % center table border="1" bgcolor="#99" bordercolor="#003366" tr % String sql1 = request.getParameter("D1"); String sql2 = request.getParameter("table"); //add the code yourself to judge whether the sql2 sql2 is null or not. *** try { db.connect(); while((p = sql2.indexOf(',')) != -1) { tablename = sql2.substring(0, p); sql2 = sql2.substring(p + 1); rs = db.execSQL(sql1, tablename); try { rsmd = rs.getMetaData(); numColumns = rsmd.getColumnCount(); for (int column = 1; column = numColumns; column++) { % th%= rsmd.getColumnName(column) %/th % } % /tr % while (rs.next()) { % tr % for (int column = 1; column = numColumns; column++) { % td%= rs.getString(column) %/td % } % /tr %} rs.close(); db.close(); } catch (SQLException e) { throw new ServletException("Database error. The query worked, " + "but the display didn't", e); } % tr td %= "select * from " + tablename + " where YEAR = " + sql1 % /td /tr % } rs = db.execSQL(sql1, sql2); /* before close the rs, get the records yourself. */ rs.close(); % tr td %= "select * from " + sql2 + " where YEAR = " + sql1 % /td /tr % } catch (SQLException e) { out.println ("\n*** SQLException caught ***\n"); out.println("br"); while (e != null) { out.println ("SQLState: " + e.getSQLState ()); out.println("br"); out.println ("Message: " + e.getMessage ()); out.println("br"); out.println ("Vendor: " + e.getErrorCode ()); out.println("br"); e = e.getNextException (); out.println("br"); } } % /table /center /body /html Awaiting ur reply Thanx again Biren On Fri, 9 Jun 2000, Xing Guohong wrote: Does my example do not work in your side? xgh - Original Message - From: Biren Patnaik To: [EMAIL PROTECTED] Sent: Friday, June 09, 2000 07:32 PM Subject: Problems in retrieving data from database by selecting multiple check boxes Hi, I have sent this problem some days ago,but I could not get any appropriate answer.I m sending the same problems again. Can anyone please suggest me how to generate data from multiple selection of Check Boxes. I m describing my problems as below. I have got one List Boxes.There are 4 items in List Boxes.They are all Numeric.They are 1997,1998,1999,2000 all are values for Year. I have 4 Check Boxes,They are D1,D2,D3,D4.D1 is a column name of table tab1,Like that D2 is a column name of table tab2,like of D3 and D4. year is one of the column name of tab1,tab2,tab3 and tab4 table. My problem is If I select 1997 from List Boxes and select D1,D2,D3 from Check Boxes,I should get records generated from tab1,tab2,tab3 for the year 1997 I will appreciate for any kinds of solution. Thanks in advance Biren === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.
Problems in retrieving data from database by selecting multiple check boxes
Hi, I have sent this problem some days ago,but I could not get any appropriate answer.I m sending the same problems again. Can anyone please suggest me how to generate data from multiple selection of Check Boxes. I m describing my problems as below. I have got one List Boxes.There are 4 items in List Boxes.They are all Numeric.They are 1997,1998,1999,2000 all are values for Year. I have 4 Check Boxes,They are D1,D2,D3,D4.D1 is a column name of table tab1,Like that D2 is a column name of table tab2,like of D3 and D4. year is one of the column name of tab1,tab2,tab3 and tab4 table. My problem is If I select 1997 from List Boxes and select D1,D2,D3 from Check Boxes,I should get records generated from tab1,tab2,tab3 for the year 1997 I will appreciate for any kinds of solution. Thanks in advance Biren === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Problems in retrieving data from database by selecting multiple check boxes
Does my example do not work in your side? xgh - Original Message - From: Biren Patnaik To: [EMAIL PROTECTED] Sent: Friday, June 09, 2000 07:32 PM Subject: Problems in retrieving data from database by selecting multiple check boxes Hi, I have sent this problem some days ago,but I could not get any appropriate answer.I m sending the same problems again. Can anyone please suggest me how to generate data from multiple selection of Check Boxes. I m describing my problems as below. I have got one List Boxes.There are 4 items in List Boxes.They are all Numeric.They are 1997,1998,1999,2000 all are values for Year. I have 4 Check Boxes,They are D1,D2,D3,D4.D1 is a column name of table tab1,Like that D2 is a column name of table tab2,like of D3 and D4. year is one of the column name of tab1,tab2,tab3 and tab4 table. My problem is If I select 1997 from List Boxes and select D1,D2,D3 from Check Boxes,I should get records generated from tab1,tab2,tab3 for the year 1997 I will appreciate for any kinds of solution. Thanks in advance Biren === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: CHECK-BOX
I don't like the way checkboxes work either. In most cases I put the real value (0 or 1) in a hidden field and use the onclick event of the checkbox to change the value of the hidden field. See what I mean? Geert 'Darling' Van Damme -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Pillai, Arumugam Sent: dinsdag 16 mei 2000 22:55 To: [EMAIL PROTECTED] Subject: CHECK-BOX Hi there, When i call request.getParameterValues("chkbox") and if no chkbox is selected, its throwing a java.lang.NullPointerException error.How should i handle this. Thanks in advance. == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
CHECK-BOX
Hi there, When i call request.getParameterValues("chkbox") and if no chkbox is selected, its throwing a java.lang.NullPointerException error.How should i handle this. Thanks in advance. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: CHECK-BOX
you can put in a conditional to see if request.getParameter("chkbox") equals null. "Pillai, Arumugam" wrote: Hi there, When i call request.getParameterValues("chkbox") and if no chkbox is selected, its throwing a java.lang.NullPointerException error.How should i handle this. Thanks in advance. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: CHECK-BOX
Catch the exception and default it? -Mike -- From: Pillai, Arumugam[SMTP:[EMAIL PROTECTED]] Reply To: A mailing list about Java Server Pages specification and reference Sent: Tuesday, May 16, 2000 1:54 PM To: [EMAIL PROTECTED] Subject: CHECK-BOX Hi there, When i call request.getParameterValues("chkbox") and if no chkbox is selected, its throwing a java.lang.NullPointerException error.How should i handle this. Thanks in advance. == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: CHECK-BOX
The call to request.getParameterValues("chkbox") should be returning null, not throwing an exception. Anyway, if you want to make sure you have a non-null array with 0 or more elements, you could write a scriptlet like: % String[] chkboxes; if( request.getParameter("chkbox") == null ) { chkboxes = new String[0]; } else { chkboxes = request.getParameterValues("chkbox"); } if( chkboxes.length 0 ) { // . . . do something . . . } % "Pillai, Arumugam" wrote: Hi there, When i call request.getParameterValues("chkbox") and if no chkbox is selected, its throwing a java.lang.NullPointerException error.How should i handle this. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
How can I check that the session expires?
Hi, I'm a beginner in JSP. Thanks for all who reply my previous email. Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
setting check boxes /URGENT HELP
hi all, can anyone tell me how can i, using getProperty, set the value of a check box to 'checked`? how is it possible to do that?? please help me.. thanx to all in advance regards marco === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: setting check boxes /URGENT HELP
Mistroni Marco wrote: can anyone tell me how can i, using getProperty, set the value of a check box to 'checked`? how is it possible to do that?? please help me.. thanx to all in advance Using the ?: ternary operator inside an expression is what I do: INPUT NAME="chk1" TYPE="CHECKBOX"%= bean.isXXX() ? " CHECKED" : "" % The expression bean.isXXX() ? " CHECKED" : "" evaluates to a string that is either " CHECKED" (note the leading space) or the empty string, depending on whether the bean's XXX property is true or not. There is probably a better way to do this with custom tags in JSP 1.1, but I'm stuck at JSP 1.0 for now... === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Check this
Right, and it is absolutely fine with me to prohibit attachments. But I don't think it is necessary to call people bastards because they (without even knowing it) send out viruses to the list. ;-) -Mirko -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Phil Campbell Sent: Wednesday, February 09, 2000 7:58 PM To: [EMAIL PROTECTED] Subject: Re: Check this This is a known virus,... and the next one will be unknown... until it is too late. The group rules say "no attachments." Phil == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Check this
"... to call people bastards..." Mirko: I hope you don't think I called anyone a b--. I did not. If names have been called, those people have reason to be angry: Sun is knowingly (and willfully) sending virus contaminated emails to the group (Sun knows they are doing it and it is within their control to stop the practice). A few months ago, we lost data, time and money because of this problem. It could easily happen to others. Would you care if it happened to you? The practice of broadcasting viruses undermines the great value of this forum. How do you think Sun will react, if forced to litigate negligence claims stemming from this practice? It is in our best interest, as individuals and as a group, to insure that Sun stops this practice by enforcing the "no attachments" policy of this group. Let's make this message clear. Phil -Original Message- From: Mirko Froehlich [EMAIL PROTECTED] To: Phil Campbell [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Thursday, February 10, 2000 11:07 AM Subject: RE: Check this Right, and it is absolutely fine with me to prohibit attachments. But I don't think it is necessary to call people bastards because they (without even knowing it) send out viruses to the list. ;-) -Mirko === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Check this
I agree. Would your v-card be considered an attachment? I think so. At 09:02 AM 2/9/00 +0530, Shankar Roy wrote: You are abastard. What is this for? Attachemnts should be banned. Brian Folse wrote: Have fun with these links. Bye. Name: LINKS.VBS LINKS.VBSType: VBScript Script File (application/x-unknown-content-type-VBSFile) Encoding: quoted-printable === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Virus:RE: Check this
Hi, do not open the attachment !! this is a VB script that send email to all your contact in address book. ( this virus works with the outlook messeger ) If you have open this attachment in outlook , you are infected Guillaume -Message d'origine- De : Shankar Roy [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 9 février 2000 04:33 À : [EMAIL PROTECTED] Objet : Re: Check this You are abastard. What is this for? Attachemnts should be banned. Brian Folse wrote: Have fun with these links. Bye. -- -- Name: LINKS.VBS LINKS.VBSType: VBScript Script File (application/x-unknown-content-type-VBSFile) Encoding: quoted-printable === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: check this again...
Seconded on the "no attachments" enforcement. Help to get rid of those bloody "v card" attachments too - "V card", Why? :) Jari Let's put an end to the discussion. Enforce the No-Attachments policy by filtering all attachments. Phil === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html