Real time reading of XML tag in JSP

BoZz

New Member
Setup: iMac 10.6.8, Apache Tomcat 6.0.16, eXist DataBase, JSP, Java, XMLI have a JSP page that is used to take keyword requests from users and return XML content. Depending on the content of the title XML tag returned to the user I am looking to also display additional content pulled from an external Java project. My JSP to pull XML content\[code\]<div class='result-container'><% (more code here to call content from XML database and transform) content = AE.getPrettyModelContent("ae", username + "transformedFeatureModel"); out.println(content);%></div>\[/code\]This content is outputted with a verity of tags that are then used for styling e.g.\[code\]<title>France</title>\[/code\]Gets outputted as \[code\]<div id="title">France</div> \[/code\]I am looking to preform another action on my JSP page depending on the content of the above outputted tag. My attempt so far\[code\]<div class='concept-container'><%Injector injector = Guice.createInjector(new GuiceInjector());ConceptConnector myConceptFrance = injector.getInstance(ConceptConnector.class);if (div id="title" == France){out.println(myConceptFrance.search(myConceptFrance));} %></div>\[/code\]The Error\[code\]An error occurred at line: 150 in the jsp file: /SimpleResponse2.jspdiv cannot be resolved149: 150: if (div id="title" == France)151: {152: out.println(myConceptFrance.search(myConceptFrance));153: }\[/code\]I am not a 100% sure that what im trying to do is possible and there does not appear to be a lot of information on it. If anyone can give any tips it would be very much appreciated.
 
Back
Top