github.com/ismailbayram/bigpicture@v0.0.0-20231225173155-e4b21f5efcff/internal/browser/javaproject/src/main/com/shashi/servlets/UserSearchFwd.java (about)

     1  package com.shashi.servlets;
     2  
     3  import java.io.IOException;
     4  
     5  import javax.servlet.RequestDispatcher;
     6  import javax.servlet.ServletException;
     7  import javax.servlet.annotation.WebServlet;
     8  import javax.servlet.http.HttpServlet;
     9  import javax.servlet.http.HttpServletRequest;
    10  import javax.servlet.http.HttpServletResponse;
    11  
    12  import com.shashi.constant.UserRole;
    13  import com.shashi.utility.TrainUtil;
    14  
    15  @SuppressWarnings("serial")
    16  @WebServlet("/usersearchtrain")
    17  public class UserSearchFwd extends HttpServlet {
    18  	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
    19  		res.setContentType("text/html");
    20  		TrainUtil.validateUserAuthorization(req, UserRole.CUSTOMER);
    21  		RequestDispatcher rd = req.getRequestDispatcher("SearchTrains.html");
    22  		rd.forward(req, res);
    23  
    24  	}
    25  
    26  }