hi frnds,
im seperating html views, which is inside my servlets into a seperate jsp.the servlet contains certain exception methods that shows certain exceptions(if present)..the servlet uses- out = httpservletresp onse.getOutputS tream();
and
method like--
inside the try..catch block of the service method..i have used RequestDispatch er.forward() method which forwards me to the jsp which i have seperated from the servlet...now i know that if i use RequestDispatch er.forward() i cannot use the servletoutputst ream property...can anybody suggest me an alternative for servletoutputst reams out.so that my servlet will forward the control to a jsp and also give me the exceptions when its needed....thann x in advance ....any help will be appreciated.
im seperating html views, which is inside my servlets into a seperate jsp.the servlet contains certain exception methods that shows certain exceptions(if present)..the servlet uses- out = httpservletresp onse.getOutputS tream();
and
method like--
Code:
static void printSQLException(SQLException sqlexception, ServletOutputStream servletoutputstream) throws IOException { servletoutputstream.print("<b>SQLException</b>\n<p>\n\n"); for(; sqlexception != null; sqlexception = sqlexception.getNextException()) { servletoutputstream.print("<b>SQLState:</b> " + sqlexception.getSQLState() + "<br>\n");
Comment