It's not a secret anymore!*
The moose likes Servlets and the fly likes JSP error using JDBCAdapter method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP error using JDBCAdapter method" Watch "JSP error using JDBCAdapter method" New topic
Author

JSP error using JDBCAdapter method

Steve Campbell
Ranch Hand

Joined: Dec 18, 2000
Posts: 41
I have a servlet which creates an object "jdbcAdapter" (from examples in JDK). I put the object into a session variable and get this object in a JSP page. When the JSP is being compiled, the line "String sColumnName = jdbcAdapter.getColumnName[col];" comes up as an error with "Attempt to reference method getColumnName in class JDBCAdapter as an instance variable.". I use other methods in this class which don't generate an error like this. Anybody have any ideas on the cause?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
Use parenthesis() instead of braces[]. Java only uses braces for array references. Parenthesis are used for method calls...
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Steve Campbell
Ranch Hand

Joined: Dec 18, 2000
Posts: 41
Thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP error using JDBCAdapter method
 
Similar Threads
overload and override method question
How do i avoid this exception
StackOverFlow Exception help
denotation during dynamic method lookup
Calling Java Class method from JS