Daniel Lynn wrote:
>
> ok, in PHP there is a command called isset(). It returns a boolean to
> tell you if a certain variable was passed to the program or not. (Helps
> eliminate those nullpointer exceptions without putting everything in
> try/catch statements) Now, I was looking for one in JSP and I'm having a
> little trouble. I think it may just be I don't know what I'm looking
> for, so if anyone would be so kind as to let me know the name of the
> function if it exists it'd be MUCH appreciated. Thank you in advance.
I recommend that you do *not* follow all the advice you've got about
solving this with scripting code. Using a custom action for this is
so much cleaner. If I understand what you want to do, I believe this
custom action from the Jakarta Taglibs project is what you need:
<http://jakarta.apache.org/taglibs/doc/request-doc/index.html#existsparameter>
If this is not exactly what you want, it's not so hard to develop your
own custom actions (or contribute a fix to the Taglibs project. It's
described in any recent JSP book, for instance in my JavaServer Pages book:
<http://TheJSPBook.com/>
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://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://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