Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why I can't use static for constant in JSP

843835Feb 20 2002 — edited Feb 20 2002
Hi,

I use the static final for all the constant in my readUploadfile function :

private void readUploadfile(String uploadfileP, String tempfileP)
{
String linestr, linestr2;
int linenum, closelinenum;
static final String openschemaA="schema.a";
static final String openschemaB="schema.b";
static final String openschemaC="schema.c";
static final String openschemaD="schema.d";

===================================
but I got the following error :

jsp:44: Error: static is not a valid local variable or parameter modifier.
jsp:45: Error: static is not a valid local variable or parameter modifier.
jsp:46: Error: static is not a valid local variable or parameter modifier.
jsp:47: Error: static is not a valid local variable or parameter modifier.

when I remove the static, it works fine, why I can't use static for the constants in JSP??

Thanks,
ED
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2002
Added on Feb 20 2002
1 comment
181 views