Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ruquia on Dec 30, 2008 23:59
open dhtmlx forum
Dhtmlx grid showing Error type incorrect xml

Hi the grid in application is getting populated with the data that is extracted from database tables... whenever some error occurs in the oracle connection or if the table do not exists i get the error which says Error type :could not load xml
incorrect xml .. i dont want this error to be seen by the user who uses the application i want to present them some i nformative message instead of incorrect xml so i added a request dispatcher in my servlet but still it gives me the same error of incorrect xml , and the control do not shows the dispatched address using request dispatcher.

[code]
-------------------------------------------------------------------------------------------------------------------------------------------------

mygrid2.post("GetReportDetailInfo","csvstring="+csvstring+"&count="+count+"&proptypeValue="+proptypeValue+"&dbenvi="+dbenvi,funcrowcount,"xml");

-------------------------------------------------------------------------------------------------------------------------------------------------

GetReportDetailInfo servlet


try
{

rs=stmt.executeQuery("Select c.name,c.empid,c.address,d.salary from Salary d,Customer c)
while(rs.next())
    {
        String name=rs.getString(1);
......


out.println("<row><cell>"+name+"</cell><cell>"+empid+"</cell><cell>"+address+"</cell><cell>"+salary+"</cell></row>");

}
}
catch(Exception ioe)
{
    
    String error=ioe.toString();
    //System.out.println(error);
    request.setAttribute("ProcedureError", error);
    
    //System.out.println(request.getAttribute("ProcedureError"));
    RequestDispatcher requestdispatcher=request.getRequestDispatcher("../AI/ProcedureError");
    requestdispatcher.forward(request,response);
    
    
ioe.printStackTrace();
    
}

-------------------------------------------------------------------------------------------------------------------------------------------------

ProcedureError JSP


<script langauge="javascript">

function raiseexception()
{

alert("<%=(String)request.getAttribute("ProcedureError")%>");
}
</script>


<body onload="raiseexception();">
</body>


-------------------------------------------------------------------------------------------------------------------------------------------------

according to above servlet if table Salary do not exists the request dispatched message"Table or view does not exists" should be shown but it do not shows that message in the error it shows error type load incorrect xml.

Answer posted by Support on Jan 10, 2009 08:23