Our purpose is to parse an XML document and create a DOM object when the JSP is loaded for the first time in the application and store the DOM object in application scope.
When the JSP is hit the next time, the DOM object stored in application scope needs to accessed and we need to process the same using X Tags.
The problem we are facing is, we are not able to access the DOM object stored in application scope.
this code creates a DOM object and stores the same in application scope in attribute configdom.
<% if (application.getAttribute("configobj")==null)
<xtags:parse id="configDom" uri="config/Config.xml" />
--Code below wants to process the DOM using xtags.
<xtags:forEach select="//config/scode" context="<%=(org.dom4j.tree.DefaultDocument)application.getAttribute("configobj")%>" >
<xtags:valueOf select="@appid" />
I feel there is some issue with the context attribute above,
Can someone please let us know what is wrong.