File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Identifier expected, (already searched and read about this, still confused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Identifier expected, (already searched and read about this, still confused" Watch "Identifier expected, (already searched and read about this, still confused" New topic
Author

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

jim gemlo
Greenhorn

Joined: Feb 24, 2004
Posts: 20
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

Joined: Apr 16, 2004
Posts: 305
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Identifier expected, (already searched and read about this, still confused
 
Similar Threads
problem---how to display ArrayList of ArrayList in jsp page.
bean in or out scope?
How to store value in hidden field with struts 2.0?
Chained combobox fails to work
storing the Unicodes in the database