hi, this is problem im facing:- im opening page index.jsp?errmsg=true index.jsp ---------
<% String msg=""; String errmsg1=""; errmsg1 = (String)request.getParameter("errmsg"); msg = msg + errmsg1; if(errmsg1=="true"){ msg="Invalid User or Password"; } %> <%=msg%> ------- The if condition is not getting called. Any pointers? Piyush
"A scientist is not person who gives right answers but a person who asks right questions"
In Java, the == operator is a test for object identity, not value equality, so you need to use the equals() method. And by placing the string constant first, you don't need to worry about whether errmsg1 is null or not. hth, bear