can we declare functions inside a scriptlet? I thought all the scriptlet
code goes into the action() method of the servlet.
Can anyone throw light on this.
Regards
Nagaraj.
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Kate
Hocking
Sent: Wednesday, December 06, 2000 6:37 AM
To: [EMAIL PROTECTED]
Subject: Re: "null" display in JSP
Have just figured this out...for those interested:
<% String theRel1Type = test.getRel1Type(); if (theRel1Type == null) { %> <%
} else { %><jsp:getProperty name="test" property="Rel1Type" /><% } %>
cheers,
Kate
-----Original Message-----
From: Kate Hocking
Sent: Wednesday, 6 December 2000 12:00
To: [EMAIL PROTECTED]
Subject: "null" display in JSP
Hi all,
Does anybody know of a good way to handle the string "null" appearing in the
HTML code of the jsp?
the results are read from a bean.
I have tried this little method:
<%!
String blanknull(String s) {
return (s == null) ? "" : s;
}
%>
called by the jsp tags:
<% String theRel1Surname = test.getRel1Surname(); String myRel1Surname =
blanknull(theRel1Surname); %> <INPUT TYPE="HIDDEN" NAME="theSurname"
VALUE="<%=myRel1Surname %>">
however, this returns everything as " ", even when there is valid data to be
displayed
Regards,
Kate
____________________________________________________________________________
________________________________________
IMPORTANT: This email is intended only for the use of the individual or
entity named above and may contain information that is confidential and
privileged. The views expressed in this e-mail are those of the author and
not of the company unless otherwise clearly indicated. When addressed to
our clients, any information or quotes contained in this e-mail are subject
to the terms and conditions relevant at that time to the matter being
addressed. If you are not the intended recipient and have received this
e-mail in error, please notify us immediately by return email or telephone
+61 8 93235555 and delete the e-mail and any attachments without using or
disclosing the contents in any way. If you are not the intended recipient
any dissemination, distribution or copying of this e-mail is strictly
prohibited. Before opening or using attachments, check them for viruses and
defects. Our liability is limited to re-supplying any affected attachments.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
____________________________________________________________________________
________________________________________
IMPORTANT: This email is intended only for the use of the individual or
entity named above and may contain information that is confidential and
privileged. The views expressed in this e-mail are those of the author and
not of the company unless otherwise clearly indicated. When addressed to
our clients, any information or quotes contained in this e-mail are subject
to the terms and conditions relevant at that time to the matter being
addressed. If you are not the intended recipient and have received this
e-mail in error, please notify us immediately by return email or telephone
+61 8 93235555 and delete the e-mail and any attachments without using or
disclosing the contents in any way. If you are not the intended recipient
any dissemination, distribution or copying of this e-mail is strictly
prohibited. Before opening or using attachments, check them for viruses and
defects. Our liability is limited to re-supplying any affected attachments.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html