• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Xml Data

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't mean php I meant jsp.

Still having trouble here.

Anybody able to help?

Nicola
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic