`

struts+spring+hibernate的web应用【13】

    博客分类:
  • ssh
阅读更多

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,看看我们的项目的效果吧!

在地址栏输入http://localhost:8088/game/products/index.jsp

 

然后点击“进入游戏软件管理单元”链接,主界面出现了。

 

 

原文地址:http://www.blogjava.net/rickhunter/articles/103481.html

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics