简体   繁体   中英

Calling a servlet from the URL

I have created a servlet with an endpoint as below-

@WebServlet("/Email_token_Auth")
public class Email_auth extends HttpServlet {
    private static final long serialVersionUID = 1L;

When I am hitting my url http://localhost:8080/Email_token_Auth its throwing 404 not found error.

How do we call a servlet from a url ?

Can you try like bottom. Project name may need to add

http://localhost:8080/ProjectName/Email_token_Auth

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM