Frits Walraven wrote:Hi Swagato,
Because you are submitting a parameter with the name "name" it will handle it as an empty String, and therefore outputing an empty String instead of your default value. If you remove <input type="text" name="name"> from your jsp it should work as you had expected.
Regards,
Frits
Frits Walraven wrote:Hi Swagato,
Because you are submitting a parameter with the name "name" it will handle it as an empty String, and therefore outputing an empty String instead of your default value. If you remove <input type="text" name="name"> from your jsp it should work as you had expected.
Regards,
Frits
Ulf Dittmer wrote:WEB-INF is not the place to put jar files; WEB-INF/lib is. Have you configured the web app for JSTL 1.2 as described on those pages?
Ulf Dittmer wrote:Have you installed the JSTL jar files where the web app can find them, and configured your web app correctly? http://faq.javaranch.com/java/ElOrJstlNotWorkingAsExpected and the pages it links to tell you everything you need to know about downloading and setting up JSTL in your web app.
Christophe Verré wrote:request.getParameter("empID") == null || "".equals(request.getParameter("empID").trim())
If you'd use EL instead of scriptlets, you could use the empty operator instead, with JSTL's c:if tag.
Christophe Verré wrote:
I assumed that I would get null string. The assumption was wrong
I always forget about it too.
Secondly, I forgot about == and .equals
You'll never forget it again now![]()
Christophe Verré wrote:
Is it going to be empty string or null string or " "?
Why don't you check it ?
Bear Bibeault wrote:If a bean is already bound in the specified scope with the same name, it will be attached. A new bean is created only if one does not already exist.
Christophe Verré wrote:Did you try to check for an empty string ?
if (request.getParameter("empID") == "111")
You must have forgotten how to compare String variables (SCJP).
Bear Bibeault wrote:Almost. It's not always true that a new bean will be created.