This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes Creating Tabs in JSP using xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Creating Tabs in JSP using xml file" Watch "Creating Tabs in JSP using xml file" New topic
Author

Creating Tabs in JSP using xml file

mehul mandge
Greenhorn

Joined: Aug 28, 2009
Posts: 9
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


Dream is not what you see in sleep, Dream is what does'nt let you sleep.
-A P J Abdul Kalam( Ex- India President)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
mehul mandge
Greenhorn

Joined: Aug 28, 2009
Posts: 9
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

Joined: Oct 27, 2005
Posts: 19697
    
  20

Since the issue is now purely JSP related, let me move it to our JSP forum.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

There is no such API.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Tabs in JSP using xml file