Package net.jrouter.http.servlet.result
Class ServletResult
java.lang.Object
net.jrouter.http.servlet.result.ServletResult
Result for http servlet, include "forward" and "redirect".
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectactionForward(ServletActionInvocation invocation) Action结果直接调用映射的Action,类似forward结果类型。static voidforward(ServletActionInvocation invocation) static voidredirect(ServletActionInvocation invocation)
-
Field Details
-
ACTION_FORWARD
"action_forward" symbol.- See Also:
-
FORWARD
"forward" symbol.- See Also:
-
REDIRECT
"redirect" symbol.- See Also:
-
-
Constructor Details
-
ServletResult
public ServletResult()
-
-
Method Details
-
actionForward
@ResultType(type="action_forward") public static Object actionForward(ServletActionInvocation invocation) Action结果直接调用映射的Action,类似forward结果类型。 forward可多次关联调用,需自行判断循环调用。- Parameters:
invocation- Action运行时上下文。- Returns:
- 返回forward后的调用结果。
- See Also:
-
DefaultResult.actionForward(net.jrouter.ActionInvocation)
-
forward
@ResultType(type="forward") public static void forward(ServletActionInvocation invocation) throws IOException, jakarta.servlet.ServletException - Throws:
IOExceptionjakarta.servlet.ServletException- See Also:
-
RequestDispatcher.forward(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse)
-
redirect
@ResultType(type="redirect") public static void redirect(ServletActionInvocation invocation) throws IOException - Throws:
IOException- See Also:
-
HttpServletResponse.sendRedirect(java.lang.String)
-