jsp:include+filter
<jsp:include flush="true" page="Index.jsp">
<jsp:param name="username" value="<%=request.getParameter("username")%>"/>
<jsp:param name="unit" value="<%=request.getParameter("unit")%>"/>
</jsp:include>
/*
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package mypack.filters;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.UnavailableException;
/**
* <p>Example filter that sets the character encoding to be used in parsing the
* incoming request, either unconditionally or only if the client did not
* specify a character encoding. Configuration of this filter is based on
* the following initialization parameters:</p>
* <ul>
* <li><strong>encoding</strong> - The character encoding to be configured
* for this request, either conditionally or unconditionally based on
* the <code>ignore</code> initialization parameter. This parameter
* is required, so there is no default.
相关文档:
用了commons-fileupload-1.2.jar和commons-io-1.3.2.jar这两个包。
save.jsp
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.regex.*"%>
<%@ page import="org.apache.co ......
前几天,湖南SEO在用jsp写一个企业站程序的时候,因为要参加项目答辩竞选,所以就想为自己写的程序搞几个亮点,因为搞SEO久了,不自觉就会想到伪静态,但是在百度查了一个下午,只查到了urlrewrite架包的下载地方,和架设方面的文章,并没有jsp(JAVA)伪静态的具体操作示范,有的也只是,单页面的伪静态的写法,这里我就重头 ......
以前有提到过乱码问题,最近在使用window.open时又出现此类问题,现解决如下:
1:使用encodeURIComponent函数对参数进行处理,例如:window.open("html.jsp?name=" + encodeUrlComponent(value)));
2:修改tomcat服务器的server.xml文件添加:useBodyEncodingForURI="true"或者
URIEncoding=" ......
最近在自己做的项目中需要用到在线编辑器,在网上搜了下,发现了ckeditor,当然网上有好几种在线编辑器,不知道为什么选择了ckeditor,本来打算用Fckeditor的,但是看到网上还需要导入好几个JAR包,还要进行一堆配置,有点麻烦,本来项目中也就用一下,还要那么麻烦地去配置。
于是去ckeditor网站下载了最新版本的ckeditor, ......
JSP共有以下6种基本动作:
1.jsp:include:在页面被请求的时候引入一个文件。
2.jsp:useBean:寻找或者实例化一个JavaBean。
3.jsp:setProperty:设置JavaBean的属性。
4.jsp:getProperty:输出某个JavaBean的属性。
5.jsp:forward:把请求转到 ......