• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while updating login-config.xml

 
pravin karne
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to edit login-config.xml file of JBOSS(${JBOSS_HOME}/server/default/conf ) through other java program(using DOM parser)

but i m not able to access that file boz of xml specification i.e

<!DOCTYPE policy PUBLIC
"-//JBoss//DTD JBOSS Security Config 3.0//EN"
"http://www.jboss.org/j2ee/dtd/security_config.dtd">


can DOM or sax have some feature so i can edit that file

please reply.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you are trying to do. What exception are you seeing when you try to edit it through Java program? Also, why do you want it to edit it through Java program? I guess, you are trying to add a login module dynamically. If so, then you have API's for doing that, which you can use. If you explain what you are trying to achieve, maybe we can point you to a better solution.
 
pravin karne
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Actually i m going to cofigure coonnection pool.
i m doing this using InstallJammer Installer (i want to cofigure connection pool before installation of application)

for that i want change the following conf files of JBOSS

1.standardjboss.xml
2.login-config.xml
3.standardjbosscmp-jdbc.xml

for changing this file i m calling java program from InstallJammer
but i m not able to edit that files

I think this is because of dtd type of that xml file.
Thanks in advance
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by pravin karne:
Actually i m going to cofigure coonnection pool.
i m doing this using InstallJammer Installer (i want to cofigure connection pool before installation of application)

for that i want change the following conf files of JBOSS

1.standardjboss.xml
2.login-config.xml
3.standardjbosscmp-jdbc.xml



The connection pool settings are done in a *-ds.xml file. The login-config.xml file is used for security related stuff.


Originally posted by pravin karne:
for changing this file i m calling java program from InstallJammer
but i m not able to edit that files

I think this is because of dtd type of that xml file.


What is the exception/error you are seeing? Also, can you post the piece of code which is reading/editing these files?
 
pravin karne
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code sample for it is


DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new File("C:\\standardjbosscmp-jdbc.xml"));// this statement is not executing because of some <DOCTYPE .. Tag in same file
NodeList nl1 = doc.getElementsByTagName("datasource");



this code is working if i remove that <DOCTYPE tag...

i didnt get what is connection between <DOCTYPE tag and parsing that file


please reply...i have already west lot of time on it


Thanks in advance
 
pravin karne
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
code sample for it is


DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new File("C:\\standardjbosscmp-jdbc.xml"));// this statement is not executing because of some <DOCTYPE .. Tag in same file
NodeList nl1 = doc.getElementsByTagName("datasource");



this code is working if i remove that <DOCTYPE tag...

i didnt get what is connection between <DOCTYPE tag and parsing that file


please reply...i have already west lot of time on it


Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic