You cannot use JSP implicit objects in declarations and directives. Thats the first mistake in your code. Then there is no ending braces for the method. If these two are correct then
If you didn't set an attribute(in any of the four scopes in your servlet code) and try to access that attribute in a JSP Page using JSP implicit objects(in a scriptlet(or) expression) then you will get "null" as output in JSP Page. There will be NO compile time errors (or) runtime exceptions
Whereas in EL if you try to access that attribute using EL implicit objects then nothing will be printed in the JSP page. It will be blank output.
If the 2 errors pointed by Vishnu are corrected, I believe it will throw a Null Pointer Exception if the "str" attribute is not in the session. Because we are trying to cast something that's null to string. [ October 24, 2005: Message edited by: Bosun Bello ]
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley