Use book.equals("java") (or better "java".equals(book) in case book is 
null).

== only determines whether two references point to the same object.

wu qihua wrote:

>   I want to get the information about a field the form bean,and let it 
> print the information in the funtion of validate.but actually it did 
> not work according to my intention,it DO print nothing.every time I 
> refresh the browse ,and click the submit button.It just print this 
> information
>
>  2002-8-28 11:11:10 org.apache.struts.action.RequestProcessor process
>   information: Processing a 'POST' for path '/logon'
>
>
> public ActionErrors validate( ...)
>  {
>      System.out.println(book);
>      if (book=="java"){
>     System.out.println(book);
>            throw new UnsupportedOperationException("Easy Struts : not 
> ....");
>       }
>       else
>           return null;
>     }
>
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>


-- 
Check it out: Map -> JavaBean
http://dynclass.sourceforge.net/




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to