Well, I found the cause for this, I still need help in trying to find a
solution however. In case anyone is wondering. The reason that the
properties value was getting reinitialized to zero every time was because it
only had page scope so every time the page was reloaded it called the
constructor which initialized it to "".
Does anyone know how to get JSP to call a set method even when the field is
blank? I don't want to create another tag and I don't want to use
scriptlets.
Thanks
-----Original Message-----
From: Hensley, Zachary [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 21, 2000 12:06 PM
To: [EMAIL PROTECTED]
Subject: blank fields and the jsp:set tag
I am having problems with the jsp:set tag when property = "*". I read the
JSP 1.1 specification and it says that if a parameter has a value of "", the
corresponding property is not modified. Ok fine but here is the problem
that I have. I set the text field to non-blank value, post it, then I erase
to a blank field, and post it. I get the value of all fields with the
jsp:get tag. And to my wondering eyes I see a blank when my get method is
called. Yet my Set method is never called and the property itself is a
private field. How can it possibly set the field then?
I am trying check for blank fields so I can validate if the user has
completed everything correctly.
I am using Tomcat as a Servlet/JSP engine. Has anyone ever encountered
anything like this? Does anyone have any advice as to how I can get the JSP
engine to call my set method even when the parameter is a "".
Zach Hensley
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email
in error, please notify the sender by email and delete and
destroy this message and its attachments.
**********************************************************************
===========================================================================
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