A pair of curly brackets constitute a logical block. A variable declared
inside a block is visible within that block and the blocks contained in that
block. In your case the place where you are using the variable myname is
outside the block where u declared it. Hence the problem. Can you please
You have the myname variable declared inside the try/catch statement.
Try declaring it outside of the try/catch.
%@ pagelanguage=java contentType=text/html
import= java.util.*,java.io.*,java.sql.*%
%
String myname:
try{
myname = Jason;
Russell,
I tried that but seems the same problem is still there.
I used to define lots of variables inside try/catch and it works
for all JSP pages. Honestly I dont think there is a problem with
the code. My machine is Linux btw.
On 2/2/07, Pitre, Russell [EMAIL PROTECTED] wrote:
You have
can you provide another test case, or an example of a real exception?
variables defined inside the try/catch aren't available outside of it,
so maybe you're using them inside it normally.
Jason Friedman wrote:
Russell,
I tried that but seems the same problem is still there.
I used to