On 5/8/07, Christopher Schultz <[EMAIL PROTECTED]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Richard,

Richard Sayre wrote:
> I started to look in the _jspService and I noticed the the variable
> which I assign the request.getParameter("id") to is not in that
> method.

Note that JSP authors these days almost never actually call
request.getParameter()... they use a tag library which helps cut down on
the confusion such as this.

> The variable is called 'theID'.  One thing I noticed about it is it
> is declared like this
>
> !String theID;

That's invalid Java syntax. Can you give us a few more characters around
that declaration? For instance:

<%! String theID; %>

Creates a member of the class, which will be shared across all
invocations of the JSP. If that's the case, then you've found your problem.

> I have never seen this before.  Does this make the variable static?

Not static. Just class-level instead of being declared as a local within
the body of the service method (which is what you really want).

> I 3 years I have never encountered it [ <%! ... %> syntax].

That's because it's almost never done. It only really makes sense when
you want to declare a method for use within the class. Declaring class
members this way usually leads to tears.

> Hopefully removing it will solve my problem.

You just want to remove the !, actually. The declaration is probably
required.

- -chris



The ! operator was the cause of my problem.  I would like to thank
everyone for their help and insight.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to