Re: Help on parameter begin passed from JSP to Java Bean
check for ur scope. set ur scope to the page thanks regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 5:41 PM Subject: Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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: Help on parameter begin passed from JSP to Java Bean
Thank you very much, Hans. I checked out the link got the solution. Also, thank you for having such an informative thing online as it is a great help for all people. Regards, aruniima -Original Message- From: Hans Bergsten [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:19 PM To: [EMAIL PROTECTED] Subject:Re: Help on parameter begin passed from JSP to Java Bean [Aruniima Chakrabarti] wrote: Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. This should explain what's going on and how to work around it: http://thejspbook.com/faq/details.jsp?id=1018 Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pageshttp://TheJSPBook.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 This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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: Help on parameter begin passed from JSP to Java Bean
Thank you vijay Rajarshi for your help. Thanks to you all my problem is now solved. The problem was that I was not resetting my bean properties. The link given by Hans was real good also, a great discovery as it can be a good reference in case of jsp problems Regards, aruniima -Original Message- From: Rajarshi Ghosh [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:48 PM To: [EMAIL PROTECTED] Subject:Re: Help on parameter begin passed from JSP to Java Bean set the properties explicitely after checking the null or null string values from your jsp.Hope it helps. ---LOVE IS GOD-- Mr. Rajarshi Ghosh Senior Software Engineer(Team Leader) Educomp Datamatics Ltd. No-16,80 ft Road,4th Block,Koramangala Bangalore- 560034 mail to: [EMAIL PROTECTED] [EMAIL PROTECTED] ...Achieve the Determination..rest all just a matter of time.. - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 1:11 PM Subject: Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima -- -- This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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 This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body:
Jan Torres Wernicke/GCR-Germany/GRN is out of the office.
I will be out of the office starting 05.04.2002 and will not return until 08.04.2002. I will respond to your message when I return. === 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: Help on parameter begin passed from JSP to Java Bean
Hi You can try one thing-once you take out the values from the varaiables for updation, reinitialize just after your update query -- Thanks Regards, Kailash, - Original Message - From: [Aruniima Chakrabarti] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 1:11 PM Subject: Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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
Another question on JSP Java Bean adding data to database
Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help . Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] mailto:[mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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: Another question on JSP Java Bean adding data to database
while inserting into the database, u can use NVL function to avoid null values.. thanks regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 8:40 PM Subject: Another question on JSP Java Bean adding data to database Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help . Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] mailto:[mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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: Another question on JSP Java Bean adding data to database
Thank you vijay. But the thing is that I want null value or something that indicates that the user has given no answer for that field as it is an optional field. Regards, aruniima -Original Message- From: vijay [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 11:45 AM To: [EMAIL PROTECTED] Subject:Re: Another question on JSP Java Bean adding data to database while inserting into the database, u can use NVL function to avoid null values.. thanks regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 8:40 PM Subject: Another question on JSP Java Bean adding data to database Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help . Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] mailto:[mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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 This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail
Re: Another question on JSP Java Bean adding data to database
hi, The string null is not the same as null. Technically, the user could also enter the string null in a texfield. Then it becomes messy to check for all the exceptions etc. Best option is to store NULL in the database. regards, Nagarajan. On Friday 05 April 2002 12:40, you wrote: Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help . Thank you in advance. Regards, aruniima === 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: Another question on JSP Java Bean adding data to database
then befor inserting into the database, check for each value. if it is null dont send it, . initially set the optional fields values to blank thanks regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 8:56 PM Subject: Re: Another question on JSP Java Bean adding data to database Thank you vijay. But the thing is that I want null value or something that indicates that the user has given no answer for that field as it is an optional field. Regards, aruniima -Original Message- From: vijay [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 11:45 AM To: [EMAIL PROTECTED] Subject:Re: Another question on JSP Java Bean adding data to database while inserting into the database, u can use NVL function to avoid null values.. thanks regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: [Aruniima Chakrabarti] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 8:40 PM Subject: Another question on JSP Java Bean adding data to database Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help . Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] mailto:[mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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
Another question on JSP Java Bean
Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that - is there a way out of this? - what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help me on this. Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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
Another question on JSP Java Bean
Posting this question again as not sure that it has been sent properly. Hello everybody, I have another question. The fields in the database are optional. Now when the bean to inserts the data in the table, it puts in a string which reads as null but for the database it is an value equal to the string null not the database NULL for the field. Hence, when I write my queries, I search for a string equal to 'null' instead of the field which Is Null Now, my question is that * is there a way out of this? * what is better programming practice, you allow the null string which the java bean puts on its own or you put the database NULL value for null fields by modifying the insert query? Kindly help me on this. Thank you in advance. Regards, aruniima -Original Message- From: [Aruniima Chakrabarti] [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:12 PM To: [EMAIL PROTECTED] Subject:Help on parameter begin passed from JSP to Java Bean Hello everyone, I have a HTML page which calls a JSP page on submit, which has a 'useBean' 'setProperty' tags set so that the values from the HTML is passed to the Bean to be updated in the database. Some of the fields on HTML page the corresponding field in the database are optional. Now the problem I am facing is that if the first time the user puts a value in the text box submits page, it gets updated without a problem. But the next time if he leaves the text box empty submits, then the previous entered value for the textbox is taken instead of null value. Refreshing of the page is not solving the problem closing - opening of the page again is not feasible. How should I handle this problem? I tried changing the 'scope' but that is not solving the problem. Kindly help. Thanks in advance. Regards, aruniima This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -- === 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
SIGNOFF JSP-INTEREST
SIGNOFF JSP-INTEREST --- This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de courriel ou par un autre moyen. == ==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
SIGNOFF JSP-INTEREST
SIGNOFF JSP-INTEREST === 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
CSV output help
I could use some links to some examples for output to a CSV file. Basically what I want to do is select some fields from a form and gererate a CSV file to the client. - Examples on how to create the CSV to out. - and, a dialog box for the user to select where to save it. Thanks! === 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
signoff jsp-interest
_ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx === 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: CSV output help
There was a good article on this in the now defunct magazine Java Report a while back. Here's a simple example that uses a controller servlet to place an Object[] in the request attributes. %@ page contentType=application/csv % jsp:useBean id=values class=com.mycompany.MyBean[] scope=request/ % for (int i = 0; i values.length; i++) { % %= values[i].getA() %,%= values[i].getB() %,%= values[i].getC() % % } % The contentType tells the browser it's not getting HTML, but something else. This generally triggers a Save As... dialog allowing the user to save the file wherever they want. The trick is to map a url with a .csv extension to your JSP page or to a servlet that forwards to a JSP as follows... servlet servlet-nameDownloadCSV/sevlet-name jsp-file/mycsv.jsp/jsp-file /servlet servlet-mapping servlet-nameDownloadCSV/servlet-name url-pattern/download.csv/url-pattern /servlet-mapping By spoofing the file extension, MSIE users with MS Excel installed will be able to open the file directly into Excel or save it to disk. Netscape won't know how to feed the file to Excel, but it will open a Save dialog. Note that a carriage return in your JSP file after a closing '%' will generate a carriage return in your output even if the JSP tag didn't generate any text. So you need to tweak your tag delimiters to control the white space in the resulting output. Here's the above example with better control of whitespace: %@ page contentType=application/csv %jsp:useBean id=values class=com.mycompany.MyBean[] scope=request /% for (int i = 0; i values.length; i++) { % %= values[i].getA() %,%= values[i].getB() %,%= values[i].getC() % % } % It looks ugly, but it works... Enjoy, Jeff - Original Message - From: Rick Sample [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 3:29 PM Subject: CSV output help I could use some links to some examples for output to a CSV file. Basically what I want to do is select some fields from a form and gererate a CSV file to the client. - Examples on how to create the CSV to out. - and, a dialog box for the user to select where to save it. Thanks! === 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
I am out of the office for a few hours
Thank you for your message. I am out of the office for a few hours and will reply to you when I get back. Thanks in advance. God Bless! Darnell Whitaker Montgomery International and Similitude Solutions Inc. TEL ++808-821-8142 FAX ++810-815-1787 [EMAIL PROTECTED] [EMAIL PROTECTED] [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
Need Help w/ MVC and Database
Hello, I am trying to do my first project with the MVC architecture (not using struts yet). The examples I look at in books do not have a working example that actually connects to any real database and they only show examples loaded a very small amount of data. Does anyone have a very simple example of a MVC actually retreiveing data from a database (any database) OR can point me to a link that has an example. (yes I tried google). Sincerely, Tom K === 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: Need Help w/ MVC and Database
Tom Kochanowicz wrote: Hello, I am trying to do my first project with the MVC architecture (not using struts yet). The examples I look at in books do not have a working example that actually connects to any real database and they only show examples loaded a very small amount of data. Does anyone have a very simple example of a MVC actually retreiveing data from a database (any database) OR can point me to a link that has an example. (yes I tried google). You've been reading the wrong books ;-) I describe an MVC architecture, using a real database (behind a JavaBeans component) in my JSP book: http://TheJSPBook.com Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pageshttp://TheJSPBook.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