• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how can we use jdom with servlet ?

 
Greenhorn
Posts: 23
  • 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 :
 
Author and all-around good cowpoke
Posts: 13078
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.
 
Marshal
Posts: 25798
69
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: 23
  • 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
 
Marshal
Posts: 67446
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without fixing the other grave problems that have been pointed out?
 
Dinner will be steamed monkey heads with a side of tiny ads.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic