• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Identifier expected, (already searched and read about this, still confused

 
jim gemlo
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my class:

getting identifier expected at the 'Class.forName'line.

This same piece of code works fine when I have it in a jsp page. Im trying to place this code in a Bean so I can remove business logic from my page. So I created this class and get the error.
thanks
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to wrap your expressions inside a method. Right now, you have your variables declared correctly as instance variables, but you cannot have those expressions in the class scope. For instance, the following Class, though useless, represents the proper structure:

[ July 02, 2004: Message edited by: Jeffrey Hunter ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic