• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can we use jdom with servlet ?

 
chibi riko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do all thing but I don't know where is the problems , please I want your help.
My data  don't enter to XML

File of xml :
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would ensure that the contents of all those exceptions was correctly logged instead of ignored.
 
Paul Clapham
Sheriff
Posts: 21559
33
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I definitely agree with Mr. Brogden. If you have problems then ignoring exceptions is not a good idea. However:



In a servlet you don't know what the current working directory is. And if you think you do, you still shouldn't use it because it might change when you upgrade your servlet container or move to a different one. But here you are trying to use a file in the current working directory. I suggest that you should use the full path to the file, or to put that path into the configuration as a servlet initialization attribute.

This may or may not be the problem causing your servlet to fail. Or if it is, there may be other problems. So log the exceptions which might be thrown.
 
chibi riko
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved ...
jar of JDom was in the classpath but it was just copy it to the "lib" folder
Thank you for your help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without fixing the other grave problems that have been pointed out?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic