File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Tabs in JSP using xml file

 
mehul mandge
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the issue is now purely JSP related, let me move it to our JSP forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such API.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic