aspose file tools*
The moose likes Servlets and the fly likes HttpSession Attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSession Attributes" Watch "HttpSession Attributes" New topic
Author

HttpSession Attributes

Geetu Bahl
Greenhorn

Joined: Dec 01, 2004
Posts: 14
Hi

I have the problem in the following few lines of code

String attrib = null;
attrib = (String)session.getAttribute("mybook");

Now i need to use this attrib in a where clause of a SQL query. But when i use,it gives me an exception

java.sql.SQLException: ORA-00904:: invalid identifier

Basically in this code, user makes a serach and the i am trying to display the selected items to the user if they are available in the database.

So to make appropriate selection i need to get the value which user searched for and use it in the where clause.But it is giving exception

Please guide ???

Thanks
Geetu
Sanjeev Kaushik
Ranch Hand

Joined: Aug 01, 2002
Posts: 105
Seeing the exception, it appears that problem is with SQL query u are using. Can you show me the code?


Sanjeev Kaushik
Geetu Bahl
Greenhorn

Joined: Dec 01, 2004
Posts: 14
Hey

Thanks Sanjeev.I figured out and now the code is compiling fine.

Thanks
Geetu
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

"Geetu"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
wood burning stoves
 
subject: HttpSession Attributes