Meaningless Drivel is fun!*
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
Author

web.xml

Bora �elebi
Greenhorn

Joined: Oct 21, 2003
Posts: 4
Hi,all.
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...


BORA �ELEBİ
Anurag Mishra
Ranch Hand

Joined: Sep 27, 2001
Posts: 133
Hi,
Try like this:-
stmt=con.createStatement();
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
Anurag
Anonymous
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
Greenhorn

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 : http://www.theserverside.com/resources/article.jsp?l=JAXP.
Kolay gelsin .
Bora �elebi
Greenhorn

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 ]
 
Consider Paul's rocket mass heater.
 
subject: web.xml
 
Similar Threads
Session timeout Problem in Richfaces Model Panel?
jsp calling a servlet
Deployment Descriptor 2.4 ?
Taglib in web.xml ?
doubt in run the servlet in tomcat 5.5