product_success.jsp页面代码:
- <%@page pageEncoding="GBK" contentType="text/html; charset=GBK" %>
- <%
- String flag=(String)request.getAttribute("flag");
- String fieldname="";
- String value="";
- if(flag.equals("2")){
- fieldname=(String)request.getAttribute("fieldname");
- value=(String)request.getAttribute("value");
- }
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
- <title></title>
- </head>
- <body>
- 操作成功!
- <a href="/game/returnProduct.do?method=doReturnProduct&&flag=<%= flag%>&&fieldname=<%=fieldname%>&&value=<%= value%>">返回</a>
- <a href="/game/addProductPage.do?method=doAddProductPage&&flag=<%= flag%>&&fieldname=<%=fieldname%>&&value=<%= value%>">继续添加</a>
- </body>
- </html>
product_failure.jsp页面代码:
- <%@page pageEncoding="GBK" contentType="text/html; charset=GBK" %>
- <%
- String flag=(String)request.getAttribute("flag");
- String fieldname="";
- String value="";
- if(flag.equals("2")){
- fieldname=(String)request.getAttribute("fieldname");
- value=(String)request.getAttribute("value");
- }
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=GBK"/>
- <title></title>
- </head>
- <body>
- 操作失败!
- <a href="/game/returnProduct.do?method=doReturnProduct&&flag=<%= flag%>&&fieldname=<%=fieldname%>&&value=<%= value%>">返回</a>
- </body>
- </html>
最后在tld文件夹中添加下列tld文件。
至此,整个项目基本编写完了,运行tomcat,看看我们的项目的效果吧!
然后点击“进入游戏软件管理单元”链接,主界面出现了。
本文展示了一组用于游戏产品管理的成功与失败提示页面代码,包括页面跳转功能。通过这些示例,开发者可以了解如何在Java Web应用中实现简单的反馈机制。
1724

被折叠的 条评论
为什么被折叠?



