JavaServer Pages (JSP) and JSTL - Returning a value to JSP from a class
Hello all,
I found this really small footprint XML parser: http://www.javaworld.com/javaworld/javatips/jw-javatip128.html
It uses a very simple call:
DocHandler doc =new MyDocHandler();
QDParser.parse(doc,new FileReader("config.xml"));
Instead of reading a file, I'm actually using StringReader and sending it a string which contains a SOAP response. QDParser does all kinds of really smart things to figure out where starting and ending tags are, and then calls yet another function in a seperate .java file to do something with it once it's determined whether or not it's a tag, actual data, etc.
doc.text(sb.toString());
The DocHandler class then has a method to do something with the text:
publicvoid text(String text){
System.out.println("text: "+text);
}
This all works fine as a standalone Java app and everything prints out nicely to the screen. However what I really want is to be able to store the value of that text in a variable in my JSP page. Preferably, the variable name would just be the tag name, but I have no idea how to return all of those values back to JSP.
I already know my code is really inefficient and likely not the best way to write the program, but it's a very small scope application that just shows that what I'm trying to do is possible. Can somebody point me in the right direction?
Thanks!

