# Web Development > JSP Invoke JSP error page from servlet

## jayalakshmic

Can I invoke a JSP error page from a servlet?

----------


## batman11

i guesss u will need to code the jsp page which u wanna diplay through tht servlet or use forward to move to thte perticulat jsp

----------


## vinotha

hi,

u cann't invoke ,bt u can forward the response to that Error page

----------


## sweet_person

Yes we can do this. you need to write 

javax.sql.SQLException
error.jsp


Just add the above code to web.xml file and when ever an SQLException is raised and  not handled in the Servlet it will check in the web.xml for this exception and will be handled by the page (may be servlet also) given  in the location sub-element.

----------

