aspose file tools*
The moose likes JSP and the fly likes JSTL - x:parse vs. Jakarta - xtags:parse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL - x:parse vs. Jakarta - xtags:parse" Watch "JSTL - x:parse vs. Jakarta - xtags:parse" New topic
Author

JSTL - x:parse vs. Jakarta - xtags:parse

Fabio Fonseca
Greenhorn

Joined: Jan 19, 2006
Posts: 29
Hello guys,

I've been struggling the last days trying to send and receive data to/from a webservice. Only today I got it up and running 100%, but I there is some questions in my mind that I haven't been able to answer.

First I have used the jakarta iolib to send the SOAP envelope and everything turned out alright. I processed the response as XML and used AJAX tp parse it. But my company said that they didn't want this solution, because the people who would use the software couldn't/mussn't use any javascript. So the solution was to send, receive and parse the response in a single jsp file. Not much MVC, but I had to get that up and running FAST. Anyway, I thought that would be an easy bet, all I had to do would be to encapsulate the output of the <io:soap> in a JSTL's <x :p arse> and get the info I needed using some <x ut> and XPATH here and there. but, alas, that didn't work. All I got was a [document:null] response. As if the response I got from the webservice was not XML, even though my browsers parsed it as XML alright, so did AJAX. Turning a long story short, when I used Jakarta's <xtags :p arse> everything worked seamlessly, even though the content was the same. Then, with jakarta, I could parse, retrieve and use the SOAP's response using my terrible XPATH skills.

what happened? Why did Jakarta's tags worked and the JSTL xml tags didn't? Why JSTL didn't recognize my content as XML?

Hear from you, guys!

----------THE CODE-------------

Oops! I was dealing for so many time with this, that everything related to my post seemed self-evident to me!

here goes the code:

This one works all alright:



this one don't (can't even apply any XPATH):


[ February 14, 2006: Message edited by: Fabio Fonseca ]
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
I'm sorry but I have used up my allocation of mind reading powers for the day.
Without seeing a little bit of code showing how you applied the JSTL/XML parser etc etc, you're not going to be able to get much help.

Oh, and when you make a post, you can click the checkbox to "Disable smilies in this post". It stops the forum fubaring your custom tags.
If only there was a way to switch it on by default.
Fabio Fonseca
Greenhorn

Joined: Jan 19, 2006
Posts: 29
hey Stefan,

I edited my first post with the code. What would be best? just add a new reply or editing the post do the trick?

thanks in advance!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSTL - x:parse vs. Jakarta - xtags:parse