0

I am developing my application using eclipse WTP, and it doesn't require me to have a web.xml file for url mapping.

I want to serve a custom page on 404/403 error. Every solution I could find, suggest use of web.xml. How can I do this using @ annotation.

akshayb
  • 1,219
  • 2
  • 18
  • 44
  • But you have a web.xml in your webapp, right? – sp00m Sep 10 '14 at 11:38
  • no , my application is without web.xml . all urls are served like this-> @WebServlet("path") – akshayb Sep 10 '14 at 11:40
  • it would be great if I could get a pointer for annotation for 404 error code before questions gets marked as duplicate. Also, in that question user wants to remove web.xml , I have already built my application without web.xml, everything is working fine. I need to know annotation for various http errors. My question is not duplicate of linked one , if you go through it again. I don't need advice on making my application web.xml-less. – akshayb Sep 10 '14 at 11:51
  • The accepted answer explains that "there is no special annotations to define [welcome-file list or] error-pages". That was what the OP asked as well. – sp00m Sep 10 '14 at 12:07
  • I am sorry, that was my bad. thanks. – akshayb Sep 10 '14 at 12:09

0 Answers0