Wednesday, May 2, 2007

SCWCD - Hints - May 12

SCWCD - - HINTS MAY - 02 - 2007

1. whatever may be the contentType set by the user, the sendError() method changes it to text/html
2. Hints -- http://faq.javaranch.com/view?ScwcdHints
3. what is the difference between the and ?
4.
When doing jsp:include or jsp:forward, the included page or forwarded page will see the original request object, with the original parameters augmented with the new parameters, with new values taking precedence over existing values when applicable..
An example given in specs looks like this:
if the request has a parameter A=foo and a parameter A=bar is
specified for forward, the forwarded request shall have A=bar,foo. Note that the new param has precedence.
I took this from JSP 5.6 .
5. In Tag files element of the TLD file is a mandatory element
If the tag is declared to have an empty body in that case only one standard action is allowed in the tag for initializing its attribute i.e. you can use standard action inside the body of an empty tag.
6. we cannot invoke getOutputStream and getWriter in the same response object, b'cos it throws - IllegalStateException .