I know this question seems easy for all of you, but I am stuck.
I am new to JSP and the servlet, so please help me a bit.
in the JSP page, I have:
<input type=text name=date> So, in the servlet, what can I do to set a
value to the JSP page?
so I can get <input type=text name=date value="xxxxxx">
I read something like request.setAttribute("date", "xxxxx"); but it
doesn't work for me
Thanks in advance
Andrea Desole - 07 Jul 2006 17:14 GMT
> I know this question seems easy for all of you, but I am stuck.
> I am new to JSP and the servlet, so please help me a bit.
[quoted text clipped - 7 lines]
> I read something like request.setAttribute("date", "xxxxx"); but it
> doesn't work for me
setting an attribute is not enough. You have to use a tag library to sho
w it (you can write directly Java code in the JSP, but it's not nice).
JSTL is probably the candidate number one. Please look at JSTL and the
"out" tag:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL.html#wp74644