P
P
parkito2016-09-04 11:37:10
Java
parkito, 2016-09-04 11:37:10

How to redirect the user to a 404 page?

Hello. Please tell me how to solve the following problem.
The application has several servlets that are responsible for processing a particular page. It is necessary that when entering the user not on these pages, a 404 opens? How should I create a servlet or filter that will handle this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evhen, 2016-09-05
@parkito

Servlets - Exception Handling

V
Visseri, 2016-09-04
@Visseri

write a page that will be displayed, and then add it to web.xml by writing errorCode (in this case 404)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question