This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Xml Data  RSS feed

 
Nicola Guy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have an xml file that will contain config data for a jsp page, such as the ip address of certain machines or certain colors for display. I can parse the data to a page and my question is once I get the data into the page using:

xmlDoc = document.implementation.createDocument("","",null);

How do I get certain bits of the data to be stored in variables on the page.

I can't use JSTL because it will be run on various machines and they may not have that installed.

Anyhelp will much appreciated.

Nicola
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why aren't you using initParams and setting the values in your deployment descriptor?

I have a simple example here: http://simple.souther.us
Look for Simple Context Init Params.
 
Nicola Guy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't save them in my web.xml file I have to create a seperate independant file.

XML:

<config>
<main>
192.1.5.2
</main>
</config>

I want to be able to get this ip address and using php display it on a web page.
 
Nicola Guy
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't mean php I meant jsp.

Still having trouble here.

Anybody able to help?

Nicola
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I can't use JSTL because it will be run on various machines and they may not have that installed

Surely you (as the application deployer) have control over what is deployed? If you want to use JSTL why not just include the JSTL jar and tld(s) in your application?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!