application作用域
application:应用程序,jsp内置对象之一。
application作用:存储数据。
富文本编辑器
引入ckeditor文件
<script type="text/javascript" src="<%=request.getContextPath() %>/ckeditor4/ckeditor.js"></script>
将富文本编辑器放入文本框
<p>
<label> 内容 </label>
<textarea name="content" class="ckeditor" cols="70" rows="10"></textarea>
</p>
文件上传
将 smartupload包导入项目
设置form表单的enctype属性
<form action="<%=request.getContextPath() %>addNewsServlet.java" enctype="multipart/form-data" method="post">
```
try {
//创建smartupload对象
SmartUpload su = new SmartUpload();
//设置smartupload编码
su.setCharset("utf-8");
//初始化smartupload
su.initialize(this.getServletConfig(),req,resp);
//设置允许上传的文件类型
su.setAllowedFilesList("jpg.gif,png");
//设置不允许上传的文件类型
su.setAllowedFilesLi