• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Creating Tabs in JSP using xml file

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
i need to create tabs in JSP page. One way is to include the tabs in the JSP page itself. But i want to use an XML file as a source file for doing the same.

This will help in eliminating hard coding plus giving the advantage of easy modification.

Are there any APIs that allow me to use XML for creating tabs?

Thanks & Regards,
Mehul C Mandge
 
Sheriff
Posts: 22802
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many ways of reading XML. The easiest way is using DOM; JDOM can help you, but also the standard API:
Alternatively, you can use SAX or StAX for parsing and handling the events. You can even use XMLStreamReader or XMLEventReader, but if you want the easy way, DOM is the way to go.
 
mehul mandge
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi rob.

i am thinking of some way where i can just specify the name of the XML file and it will create tabs accordingly.

hope i have made myself clear.

its clear that i can read the xml file and make tabs. e.g this is the code that i am including in my JSP




but i want that the tabs foo and bar should be defined in some xyz.xml and then i use some code similar to

<tab:tabContainer id="foo-bar-container" some_attribute="xyx.xml"/>

This will be much easier.
Thanks.
 
Rob Spoor
Sheriff
Posts: 22802
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the issue is now purely JSP related, let me move it to our JSP forum.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no such API.
 
You may have just won ten million dollars! Or, maybe a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic