This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web.xml

 
Bora �elebi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bora,
I think this page will help you : http://www.theserverside.com/resources/article.jsp?l=JAXP.
Kolay gelsin .
 
Bora �elebi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saol abi...Yazdırabildim sonunda.(T�rk�n t�rkten başka dostu yokmuş
[ October 28, 2003: Message edited by: Bora �elebi ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic