I'm trying to use an xml string in a JSP that I've passed from a servlet. The variable passes fine. I use the code:
request.setAttribute("xml",xmlDoc_str2);
request.getRequestDispatcher("./jsp/pdirdetail.jsp").forward(request, response);
However, I'm not sure how to use it on the jsp end. I need to parse it and read it in the JSP. I'm using the code:
<%=request.getAttribute("xml") %>
<%
        try{
            DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
            InputSource is = new InputSource();
            is.setCharacterStream(new StringReader(${xml}));
        }
        catch(Exception e){}
    %>
It apparently doesn't like the way I'm referencing the variable. I'm not sure if there's another way to do this or if I'm missing something.
 
     
    