0
0

More than 3 years have passed since last update.

forwardPath+URL?action="done"の条件分岐

Posted at

URL?action="done"で受け取ればelse if(true)
action次第fowardPathの行き先変更

forwardPath_action.java
String forwardPath = null;
String action = request.getParameter("action");

if(action == null) {
        forwardPath = "/WEB-INF/jsp/registerForm.jsp";              
        }else if(action.equals("done")){
            forwardPath = "/WEB-INF/jsp/registerDone.jsp";
        }
        RequestDispatcher done = request.getRequestDispatcher(forwardPath);
        done.forward(request, response);
    }
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0