现在的位置: 首页 > 综合 > 正文

系统原型结构描述(十一)

2013年05月21日 ⁄ 综合 ⁄ 共 6839字 ⁄ 字号 评论关闭

 

chart
index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()

+":"+request.getServerPort()+path+"/";
%>

<%
System.out.println(request.getSession().getId());
System.out.println(request.getSession().getAttribute("JFreeChart_Deleter"));
 %>

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">width="<s:property

value="width"/>" height="<s:property value="height"/>"
 -->

  </head>
 
  <body>
    <table>
      <tr>
       <td>&nbsp;<img src="<%=request.getContextPath()+"/ChartServlet?

filename="+request.getAttribute("filename")%>"/></td>
      </tr>
    </table>
 <ul>
 <li><a href="<s:url action="index" portletMode="view"/>">Index</a></li>
 </ul>   
  </body>
</html>

 

drools
index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()

+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->

  </head>
 
  <body>
 <H2>Input your name</H2><p/>
 1 OR 0
 <s:form action="drools" method="POST">
  <s:textfield label="Status" name="status" value="%{status}"/>
     <s:submit value="Submit the form"/>
 </s:form>
 <ul>
 <li><a href="<s:url action="index" portletMode="view"/>">Index</a></li>
 </ul>
  </body>
</html>

 

edit
index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()

+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
 <s:head debug="true" theme="ajax"/>
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->

  </head>
 
  <body>
 <H2>Input your name</H2>
 <s:form action="save" method="POST" validate="true">
  <s:hidden name="id" value="%{id}"/>
  <s:textfield label="Name" name="name" value="%{name}"/>
     <s:textfield label="Author" name="author" value="%{author}"/>
     <s:textfield label="Summary" name="summary" value="%{summary}"/>
     <s:submit value="Submit the form"/>
 </s:form>
 <ul>
 <li><a href="<s:url action="index" portletMode="view"/>">Index</a></li>
 </ul>
  </body>
</html>

 

input.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:i18n name="com.test.action.edit.FindEditAction"/>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->

  </head>

<%
out.println(request.getAttribute("struts.token"));
out.println(session.getId());
%> 
 
  <body>
 <H2><s:property value="%{getText('Find.Title')}"/></H2>
 <s:form action="findProcess" method="POST">
  <s:token/>
  <s:textfield label="Key" name="key" value="%{key}"/>
     <s:submit value="Submit the form"/>
 </s:form>
 <ul>
 <li><a href="<s:url action="index" portletMode="view"/>">Index</a></li>
 </ul>
  </body>
</html>

result.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
   
    <title>My JSP 'MyJsp.jsp' starting page</title>
   
 <meta http-equiv="pragma" content="no-cache">
 <meta http-equiv="cache-control" content="no-cache">
 <meta http-equiv="expires" content="0">   
 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
 <meta http-equiv="description" content="This is my page">
 <!--
 <link rel="stylesheet" type="text/css" href="styles.css">
 -->

  </head>
 
  <body>
 
<%
out.println(request.getAttribute("struts.token"));
out.println(session.getAttribute("struts.token"));
%> 
 
 
    <table>
      <tr>
       <td>&nbsp;id</td>
       <td>&nbsp;书名</td>
       <td>&nbsp;作者</td>
       <td>&nbsp;摘要</td>
       <td>&nbsp;编辑</td>
       <td>&nbsp;删除</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
      </tr>
<s:if test="%{list.size} == 0">
      <tr>
       <td>&nbsp;Not found!</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
      </tr>
</s:if>
<s:else>
   
 <s:iterator value="list" id="book" status="u">
      <tr>
       <td>&nbsp;<s:property value="id"/></td>
       <td>&nbsp;<s:property value="name"/></td>
       <td>&nbsp;<s:property value="author"/></td>
       <td>&nbsp;<s:property value="summary"/></td>
       <td>&nbsp;<a href="<s:url action="edit" portletMode="edit">
        <s:param name="id"><s:property value="id"/></s:param>
       </s:url>">Edit</a></td>
       <td>&nbsp;<a href="<s:url action="delete" portletMode="edit">
        <s:param name="id"><s:property value="id"/></s:param>
       </s:url>">Del</a></td>
       <td>&nbsp;</td>
      </tr>
 </s:iterator>     
   
</s:else>    

      <tr>
       <td>&nbsp; <ul>
 <li><a href="<s:url action="find"/>">Back</a></li>
 <li><a href="<s:url action="index" portletMode="view"/>">Index</a></li>
 </ul></td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
       <td>&nbsp;</td>
      </tr>
     
    </table> 

  </body>
</html>

抱歉!评论已关闭.