github.com/ismailbayram/bigpicture@v0.0.0-20231225173155-e4b21f5efcff/internal/browser/javaproject/src/main/com/shashi/servlets/FareEnqFwd.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("/fareenqfwd") 17 public class FareEnqFwd extends HttpServlet { 18 protected void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { 19 res.setContentType("text/html"); 20 21 TrainUtil.validateUserAuthorization(req, UserRole.CUSTOMER); 22 23 RequestDispatcher rd = req.getRequestDispatcher("Fare.html"); 24 rd.forward(req, res); 25 26 } 27 28 }