我正在尝试在我的webapp中创建一个指向我的controller.jsp文件的超链接,但它只是带我到我的一个webapp页面。我知道它为什么这样做,但我不知道如何更改它以使其只打印代码。以下是我的jsp代码:
<%
String address;
if(request.getParameter("processButton") != null)
address = "Process.jsp";
else if(request.getParameter("confirmButton") != null)
address = "Confirm.jsp";
else if(request.getParameter("editButton") != null)
address = "Edit.jsp";
else if(request.getParameter("wishListButton") != null)
address = "WishList.jsp";
else
address = "Controller.jsp";
RequestDispatcher dispatcher = request.getRequestDispatcher(address);
dispatcher.forward(request, response);
%>
问题出在else语句中,但我不知道如何修复它。如何让它只打印上面的代码而不是执行它?