File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "web.xml" Watch "web.xml" New topic


Bora �elebi

Joined: Oct 21, 2003
Posts: 4
I have trouble while accessing database by using ejb.Is there any changes ruqired in the web.xml file or anywhere else?
I have a db in odbc its name is STOK.When I trying to connect it gives the following error: "invalid cursor state".
What can I do? Thanks...

Anurag Mishra
Ranch Hand

Joined: Sep 27, 2001
Posts: 133
Try like this:-
ResultSet rs = stmt.executeQuery("Your Query statement");
Each time you want to fetch results from database create a new Statememt i.e. stmt=con.createStatement()
Hope This Helps
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
What kind of EJB's are you talking of ? CMP, BMP or Session Beans ?
If you use CMP then you have to configure your app server and make the settings in the ejb-jar.xml and normally in an application dependent ejb-jar.xml.
Bora �elebi

Joined: Oct 21, 2003
Posts: 4
Hi, I solved the problem without changing the context the "web.xml". But I have another question. I am getting the data xml format. How can I parse this xml in my .jsp page? I have installed jaxp. How can I bind this parser and my code ?
Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
Hi Bora,
I think this page will help you :
Kolay gelsin .
Bora �elebi

Joined: Oct 21, 2003
Posts: 4
Saol abi...Yazdırabildim sonunda.(T�rk�n t�rkten başka dostu yokmuş
[ October 28, 2003: Message edited by: Bora �elebi ]
I agree. Here's the link:
subject: web.xml
It's not a secret anymore!