<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>jquery编辑器实例</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">
-->
<link rel="stylesheet" href="${ctx }/edit/common.css" type="text/css" media="screen" />
<script type="text/javascript" src="${ctx }/edit/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="${ctx }/edit/xheditor.js"></script>
</head>
<body>
<!-- jquery的编辑器试验己成功,能够成功写入数据库,能够成功在页面上显示出来 -->
一般模式的edit
<form method="post" action="edit.do">
<h3>xhEditor demo1 : 默认模式</h3>
xheditor(默认完全):<br />
<textarea id="elm1" name="elm1" class="xheditor" rows="12" cols="80" style="width: 80%">
<p>请输入信息</p>
</textarea>
<br>
<input type="submit" value="试验中的jquery编辑器">
</form>
<!-- 从数据库里边读出一个图片 至此,图片上传和显示制做完毕-->
开始从数据库里边读出来一个图片<br>
<img src="<s:url action="edit!getUserImgFromByte.do">
<s:param name="id" value="5"></s:param>
</s:url>" height="300px" width="300px">
</body>
</html>
上传了一个附件,把附件中的内容解出来,在webroot下新建一个edit文件夹把解出的东西放里边就OK
读本人博客代码如有任何疑问或代码不能执行,请速联系本人
zhang7789@yahoo.com.cn