??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美国产精品v,视频一区中文,粉嫩在线一区二区三区视频http://www.aygfsteel.com/huhu/category/1635.htmlHuhu'Blogzh-cnTue, 27 Feb 2007 18:46:35 GMTTue, 27 Feb 2007 18:46:35 GMT60jstl1.1 Tag Libraruy标志W?/title><link>http://www.aygfsteel.com/huhu/archive/2005/06/07/5684.html</link><dc:creator>似水年</dc:creator><author>似水年</author><pubDate>Tue, 07 Jun 2005 08:13:00 GMT</pubDate><guid>http://www.aygfsteel.com/huhu/archive/2005/06/07/5684.html</guid><wfw:comment>http://www.aygfsteel.com/huhu/comments/5684.html</wfw:comment><comments>http://www.aygfsteel.com/huhu/archive/2005/06/07/5684.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huhu/comments/commentRss/5684.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huhu/services/trackbacks/5684.html</trackback:ping><description><![CDATA[<P>在JSTL 1.1中用以下标识符:</P> <TABLE cellSpacing=0 cellPadding=0 border=1> <TBODY> <TR> <TD> <P align=center><STRONG>?/STRONG><STRONG></STRONG> </P></TD> <TD> <P align=center><STRONG>URI</STRONG><STRONG></STRONG> </P></TD> <TD> <P align=center><STRONG>前缀</STRONG><STRONG></STRONG> </P></TD></TR> <TR> <TD> <P>Core</P></TD> <TD> <P><EM>http://java.sun.com/jsp/jstl/core</EM> </P></TD> <TD> <P>c</P></TD></TR> <TR> <TD> <P>XML processing</P></TD> <TD> <P><EM>http://java.sun.com/jsp/jstl/xml</EM> </P></TD> <TD> <P>x</P></TD></TR> <TR> <TD> <P>I18N formatting</P></TD> <TD> <P><EM>http://java.sun.com/jsp/jstl/fmt</EM> </P></TD> <TD> <P>fmt</P></TD></TR> <TR> <TD> <P>Database access</P></TD> <TD> <P><EM>http://java.sun.com/jsp/jstl/sql</EM> </P></TD> <TD> <P>sql</P></TD></TR> <TR> <TD> <P>Functions</P></TD> <TD> <P><EM>http://java.sun.com/jsp/jstl/functions</EM> </P></TD> <TD> <P>fn</P></TD></TR></TBODY></TABLE><img src ="http://www.aygfsteel.com/huhu/aggbug/5684.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huhu/" target="_blank">似水年</a> 2005-06-07 16:13 <a href="http://www.aygfsteel.com/huhu/archive/2005/06/07/5684.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>q回到前一늚Ҏhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5682.html似水年似水年Tue, 07 Jun 2005 08:12:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5682.htmlhttp://www.aygfsteel.com/huhu/comments/5682.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5682.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5682.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5682.html
<input type="button" value="q回" onClick="history.go(-1)"> 

q回到前一ƈh
<%String ref = request.getHeader("REFERER");response.sendRedirect(ref);%>


似水年 2005-06-07 16:12 发表评论
]]>
Jstl的函数库http://www.aygfsteel.com/huhu/archive/2005/06/07/5683.html似水年似水年Tue, 07 Jun 2005 08:12:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5683.htmlhttp://www.aygfsteel.com/huhu/comments/5683.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5683.html#Feedback1http://www.aygfsteel.com/huhu/comments/commentRss/5683.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5683.html使用实例Q?lt;%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> ${fn:length(myCollection)}
其他函数Q?

函数

描述

fn:contains(string, substring)

如果参数string中包含参数substringQ返回true

fn:containsIgnoreCase(string, substring)

如果参数string中包含参数substringQ忽略大写Q,q回true

fn:endsWith(string, suffix)

如果参数 string 以参数suffixl尾Q返回true

fn:escapeXml(string)

有Ҏ意义的XML (和HTML)转换为对应的XML character entity codeQƈq回

fn:indexOf(string, substring)

q回参数substring在参数string中第一ơ出现的位置

fn:join(array, separator)

一个给定的数组array用给定的间隔Wseparator串在一Pl成一个新的字W串q返回?/P>

fn:length(item)

q回参数item中包含元素的数量。参数Itemcd是数l、collection或者String。如果是Stringcd,q回值是String中的字符数?/P>

fn:replace(string, before, after)

q回一个String对象。用参数after字符串替换参数string中所有出现参数before字符串的地方Qƈq回替换后的l果

fn:split(string, separator)

q回一个数l,以参数separator 为分割符分割参数stringQ分割后的每一部分是数组的一个元?/P>

fn:startsWith(string, prefix)

如果参数string以参数prefix开_q回true

fn:substring(string, begin, end)

q回参数string部分字符? 从参数begin开始到参数end位置Q包括end位置的字W?/P>

fn:substringAfter(string, substring)

q回参数substring在参数string中后面的那一部分字符?/P>

fn:substringBefore(string, substring)

q回参数substring在参数string中前面的那一部分字符?/P>

fn:toLowerCase(string)

参数string所有的字符变ؓ写Qƈ其q回

fn:toUpperCase(string)

参数string所有的字符变ؓ大写Qƈ其q回

fn:trim(string)

去除参数string 首尾的空|q将其返?/P>



似水年 2005-06-07 16:12 发表评论
]]>
Jstl验证用户d及session控制http://www.aygfsteel.com/huhu/archive/2005/06/07/5680.html似水年似水年Tue, 07 Jun 2005 08:07:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5680.htmlhttp://www.aygfsteel.com/huhu/comments/5680.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5680.html#Feedback2http://www.aygfsteel.com/huhu/comments/commentRss/5680.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5680.html1.验证用户d
<sql:query var="query" dataSource="${bookdev}">
  select * from user where userName='${param.userName}' and userPwd='${param.userPwd}'
</sql:query>

<c:if test="${empty query.rows}"> 
<!--验证没有通过,q回d界面-->
  <font color="red">用户名或密码错误</font>
  <a href="index.jsp">重新d</a>
</c:if>
<c:if test="${!empty query.rows}"> 
<!--验证通过Q保存用户信息到session?->
<c:forEach var="row" items="${query.rows}">
    <c:set var="userName" value="${row.userName}" scope="session" />
    <c:set var="userLevel" value="${row.userLevel}" scope="session" /> 
 </c:forEach>
    <c:set var="isLog" value="1" scope="session" /> 
<!--面发送到主页?->
    <c:redirect url="main.jsp" />
</c:if>

2.session控制

<c:if test="${empty sessionScope.isLog}">
 你没有登录或d时
 <a href="index.jsp">重新d</a>
</c:if>



似水年 2005-06-07 16:07 发表评论
]]>
JstlxDateSourcehttp://www.aygfsteel.com/huhu/archive/2005/06/07/5679.html似水年似水年Tue, 07 Jun 2005 08:06:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5679.htmlhttp://www.aygfsteel.com/huhu/comments/5679.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5679.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5679.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5679.html
<sql:setDataSource 
  var
="bookdev"  //数据库名 
  driver="org.gjt.mm.mysql.Driver" //驱动E序 
  url="jdbc:mysql://localhost:3306/bookdev?useUnicode=true&characterEncoding=gb2312" //URL
  user="root" //用户?/SPAN>
  password="" //密码 
 scope="session" 
/> 

其他数据库和URL列表如下Q摘自jsp应用开发详解(W二版)Q?

数据库驱动程序和URL

数据库名

驱动E序

URL

MS SQL Server2000

com.microsoft.jdbc.sqlserver.SQLServerDriver

jdbc:microsoft:sqlserver://[ip]:[port];user=[user];passwoerd=[password]

JDBC-ODBC

sun.jdbc.odbc.JdbcOdbcDriver

jdbc:odbc:[odbcsource]

Oracle oci8

oracle.jdbc.driver.OracleDriver

jdbc:oracle:oci8:@[sid]

Oracle thin Driver

oracle.jdbc.driver.OracleDriver

jdbc:oracle:thin:@[ip]:[port]:[sid]

Cloudscape

COM.cloudscape.core.JDBCDriver

Jdbc:cloudscape:database

MySQL

org.git.mm.mysql.Driver

jdbc:mysql://ip/database?user=?&password=?


相关链接Qjavaq接数据库方?A >http://blog.java-cn.com/more.asp?name=johnnyhg&id=341 



似水年 2005-06-07 16:06 发表评论
]]>
转义字符\的替?/title><link>http://www.aygfsteel.com/huhu/archive/2005/06/07/5677.html</link><dc:creator>似水年</dc:creator><author>似水年</author><pubDate>Tue, 07 Jun 2005 08:01:00 GMT</pubDate><guid>http://www.aygfsteel.com/huhu/archive/2005/06/07/5677.html</guid><wfw:comment>http://www.aygfsteel.com/huhu/comments/5677.html</wfw:comment><comments>http://www.aygfsteel.com/huhu/archive/2005/06/07/5677.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huhu/comments/commentRss/5677.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huhu/services/trackbacks/5677.html</trackback:ping><description><![CDATA[׃mysql把\当作转义字符用,所以要把\径中的\处理成\\才可以正保存,无奈之下copy了一Djava代码实现字符替换Q后来才发现原来JSTL的新增函数库有函数已经可以实现此功能,且用v来代码简z,q样好的东西自然要用用?<BR><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <BR>${fn:replace(param.sourceUrl,'\','\\')} <BR>l果出现错误QUnterminated ${ tag?<BR>修改代码为: <BR> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">c:</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000"> var</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">before</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> value</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">c:</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000"> var</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">after</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> value</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\\\\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/></SPAN><SPAN style="COLOR: #000000"> <BR><IMG id=Codehighlighter1_76_117_Open_Image onclick="this.style.display='none'; Codehighlighter1_76_117_Open_Text.style.display='none'; Codehighlighter1_76_117_Closed_Image.style.display='inline'; Codehighlighter1_76_117_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_76_117_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_76_117_Closed_Text.style.display='none'; Codehighlighter1_76_117_Open_Image.style.display='inline'; Codehighlighter1_76_117_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align=top>$</SPAN><SPAN id=Codehighlighter1_76_117_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.aygfsteel.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_76_117_Open_Text><SPAN style="COLOR: #000000">{fn:replace(param.sourceUrl,before,after)}</SPAN></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV>问题解决<img src ="http://www.aygfsteel.com/huhu/aggbug/5677.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huhu/" target="_blank">似水年</a> 2005-06-07 16:01 <a href="http://www.aygfsteel.com/huhu/archive/2005/06/07/5677.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSP文g操作http://www.aygfsteel.com/huhu/archive/2005/06/07/5675.html似水年似水年Tue, 07 Jun 2005 07:58:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5675.htmlhttp://www.aygfsteel.com/huhu/comments/5675.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5675.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5675.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5675.htmlJSP文g操作

    文g的徏立与删除
    昄目录中的文g
    d文g中的字符
    数据写入文?/A>


文g
的徏立与删除

首先取得当前的磁盘\径,指定要徏立的文g的\径,再进行检?!--END FOOTER-->Q如果文件不存在Q如果文件不存在Q则建立q个文gQ如果文件存在,则删除这个文件?

CreateDelete.jsp
<%@ page contentType="text/html; charset=GB2312"%>
<%@ page import="java.io.*" %>
<%@ page language="java" %>
<HTML>
<HEAD>
<TITLE>文g的徏立与删除</TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 5 COLOR = blue>文g的徏立与删除</FONT>
</CENTER>
<BR>
<HR>
<BR>
<%
//建立代表目前目录位置中File.txt档的File变量, q由fileName变量变数引用
String path = request.getRealPath("/jsphosting/wenjian");
File fileName = new File(path, "File.txt");
//查File.txt是否存在
if(fileName.exists())
{
//删除File.txt?
fileName.delete();
//输出目前所在的目录路径
out.println(path + "\\File.txt");
%>
<FONT SIZE = 4 COLOR = red>存在</FONT>, 已完?
<FONT SIZE = 4 COLOR = red>删除</FONT>
<%
}
else
{
//在目前的目录下徏立一个名为File.txt的文字 
fileName.createNewFile();
//输出目前所在的目录路径
out.println(path + "\\File.txt");
%>
<FONT SIZE = 4 COLOR = red>不存?lt;/FONT>, 已完?
<FONT SIZE = 4 COLOR = red>建立</FONT>
<%
}
%>
</BODY>
</HTML> 


目录中的文g


首先建立要显C的目录的FILE对象Q然后调用LISTFILESҎQ该Ҏq回一个FILE对象数组Q显C数l中的所有元素即可?

ListFile.jsp
<%@ page contentType="text/html; charset=GB2312"%>
<%@ page language="java" %>
<%@ page import="java.io.*" %>
<HTML>
<HEAD>
<TITLE>取得目录中的文g</TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 5 COLOR = blue>取得目录中的文g</FONT>
</CENTER>
<BR>
<HR>
<BR>
<%
//取得目前目录的磁盘目?
String path = request.getRealPath("/jsphosting/wenjian");
//建立代表目前目录位置的d变量
File d = new File(path);
//取得代表目录中所有文?
File list[] = d.listFiles();
%>
?lt;Font color = red><%= path%></Font>目录下的文g有(每个文g有其相应的功能)<BR>
<Font color = blue>
<ul>
<%
for(int i=0; i < list.length; i++)
{
%>
<li><%= list[i].getName() %><BR> 
<%
}
%>
</ul>
</Font>
</BODY>
</HTML> 

d?A name=3>件中的字W?/FONT>

直接调用FILEREADER对象的READQ)Ҏd所要显C的字符

ReadAll.jsp
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page language="java" %>
<%@ page import="java.io.*" %>
<HTML>
<HEAD>
<TITLE>d文g内容</TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 5 COLOR = blue>d文g内容</FONT>
</CENTER>
<BR>
<HR>
<BR>
<%
String path = request.getRealPath("/jsphosting/wenjian"); //取得目前目录在伺服端的实际位|?
FileReader fr = new FileReader(path + "\\File.txt"); //建立FileReader变量,q设定由fr变量变数引用
int c = fr.read(); //从文件中d一个字?
while(c != -1) //判断是否已读到文件的l尾
{
out.print((char)c); //输出d到的数据 
c = fr.read(); //从文件中d数据
if(c == 13) //判断是否为断行字?
{
out.print("<BR>"); //输出分行标签
fr.skip(1); //略过一个字?
c = fr.read(); //d一个字?
}
}
//关闭文g
fr.close();
%>
</BODY>
</HTML> 

据写入文?/FONT>

通过调用FILEWRITER对象的WRITEQ)Ҏ向文件中写入数据

Write.jsp
<%@ page contentType="text/html; charset=GB2312"%>
<%@ page language="java" %>
<%@ page import="java.io.*" %>
<HTML>
<HEAD>
<TITLE>数据写入文?lt;/TITLE>
</HEAD>
<BODY>
<CENTER>
<FONT SIZE = 5 COLOR = blue>数据写入文?lt;/FONT>
</CENTER>
<BR>
<HR>
<BR>
<%
String path = request.getRealPath("/jsphosting/wenjian"); //取得目前目录在伺服端的实际位|?
FileWriter fw = new FileWriter(path + "\\File.txt"); //建立FileWrite对象,q设定由fw对象变量引用
//字串写入文?
fw.write("大家?");
fw.write("大家学习jsp愉快Q?);
fw.write("希望大家能够深入了解jsp技术!");
fw.close(); //关闭文g
%>
<P>写入文g内容?lt;/P>
<FONT SIZE = 4 COLOR = red>
<%
FileReader fr = new FileReader(path + "\\File.txt"); //建立FileReader对象,q设定由fr对象变量引用
BufferedReader br = new BufferedReader(fr); //建立BufferedReader对象,q设定由br对象变量引用
String Line = br.readLine(); //d一行数?
out.println(Line + "<BR>"); //输出d得的数据
br.close(); //关闭BufferedReader对象
fr.close(); //关闭文g
%>
</FONT>
</BODY>
</HTML> 



似水年 2005-06-07 15:58 发表评论
]]>
让tomcat支持中文Url传?/title><link>http://www.aygfsteel.com/huhu/archive/2005/06/07/5674.html</link><dc:creator>似水年</dc:creator><author>似水年</author><pubDate>Tue, 07 Jun 2005 07:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/huhu/archive/2005/06/07/5674.html</guid><wfw:comment>http://www.aygfsteel.com/huhu/comments/5674.html</wfw:comment><comments>http://www.aygfsteel.com/huhu/archive/2005/06/07/5674.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huhu/comments/commentRss/5674.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huhu/services/trackbacks/5674.html</trackback:ping><description><![CDATA[<P>打开tomcat/conf/servel.xml <BR>修改Q黑体字Z攚w分) <BR><Connector port="8080" <BR>               maxThreads="150" minSpareThreads="25" maxSpareThreads="75" <BR>               enableLookups="false" redirectPort="8443" acceptCount="100" <BR>               debug="0" connectionTimeout="20000" <BR>               disableUploadTimeout="true" <STRONG>URIEncoding="GBK"</STRONG>/> <BR>在web上把含有中文的url用java.net.URLEncoder.encode("中文")处理 <BR>例子Q?<BR></P> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">c:</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000"> var</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">test</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>  </SPAN><SPAN style="COLOR: #000000">/<%=</SPAN><SPAN style="COLOR: #000000">java.net.URLEncoder.encode(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">用jsp实现文g上传.pdf</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"></</SPAN><SPAN style="COLOR: #000000">c:</SPAN><SPAN style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">c:redirect context</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/ebooks</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> url</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">${test}</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV> <P><BR>链接传递中文参C?/P> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">a href</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">hello.jsp</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000">send</SPAN><SPAN style="COLOR: #000000">=<%=</SPAN><SPAN style="COLOR: #000000">java.net.URLEncoder.encode(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">中文</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">%>></SPAN><SPAN style="COLOR: #000000"> 点击</SPAN><SPAN style="COLOR: #000000"></</SPAN><SPAN style="COLOR: #000000">a</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV> <P> jspsmartuploadlg下蝲中文例子Q?BR> <BR></P> <DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid"> <DIV><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><%</SPAN><SPAN style="COLOR: #000000">@ page contentType</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/html;charset=gb2312</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">com.jspsmart.upload.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">%><%</SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>SmartUpload mySmartUpload  </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> SmartUpload(); <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">String path=request.getParameter("中文");修改server.xml?nbsp;</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">String path </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> String(request.getParameter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">中文</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">).getBytes(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ISO-8859-1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">修改server.xml?nbsp;<BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Initialization </SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">mySmartUpload.initialize(pageContext); <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Download file <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">mySmartUpload.downloadFile("/upload/sample.zip"); <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> With a physical path </SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>mySmartUpload.downloadFile(path); <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top>response.getOutputStream().close(); <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> With options <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> mySmartUpload.downloadFile("/upload/sample.zip","application/x-zip-compressed","downloaded.zip") </SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">%></SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV></DIV><img src ="http://www.aygfsteel.com/huhu/aggbug/5674.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huhu/" target="_blank">似水年</a> 2005-06-07 15:57 <a href="http://www.aygfsteel.com/huhu/archive/2005/06/07/5674.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Jsp+javascript打造二U联下拉菜?/title><link>http://www.aygfsteel.com/huhu/archive/2005/06/07/5673.html</link><dc:creator>似水年</dc:creator><author>似水年</author><pubDate>Tue, 07 Jun 2005 07:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/huhu/archive/2005/06/07/5673.html</guid><wfw:comment>http://www.aygfsteel.com/huhu/comments/5673.html</wfw:comment><comments>http://www.aygfsteel.com/huhu/archive/2005/06/07/5673.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/huhu/comments/commentRss/5673.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/huhu/services/trackbacks/5673.html</trackback:ping><description><![CDATA[<P>数据库需求分析: <BR>class(一U栏目信息)QclassId(自动~号Q,classNameQ栏目名Uͼ <BR>NclassQ二U栏目信息)QNclassIdQ自动编PQNclassName(栏目名称Q,parentIdQ一U栏目idQ与class表中的classId兌Q?<BR><BR><%@ page contentType="text/html; charset=GB2312" language="java" errorPage="../error.jsp" %> <BR><%@ include file="../conn.jsp"%> <BR><%@ include file="../ds.jsp"%> <BR><%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <BR><%request.setCharacterEncoding("gb2312"); %> <BR><HTML><HEAD> <BR><META http-equiv="Content-Type" content="text/html; charset=gb2312"> </P> <P><TITLE>U联菜单</TITLE> <BR><LINK rel="stylesheet" type="text/css" href="style.css"> <BR></HEAD> <BR><SPAN style="COLOR: red"><!--从数据库中得CU栏目信?-></SPAN> <BR><%String sql="select * from Nclass order by NclassId asc"; <BR>ResultSet rs=stmt.executeQuery(sql); <BR>%> <BR><SPAN style="COLOR: red"><!--二U栏目信息保存到数组subcat?-> <BR></SPAN><script type="text/javascript"> <BR>var onecount; <BR>onecount=0; <BR>subcat = new Array(); <BR>        <% <BR>        int count = 0; <BR>        while(rs.next()){ <BR>        %> <BR>subcat[<%=count%>] = new Array("<%=rs.getString("NclassName")%>","<%=rs.getString("NclassId")%>","<%=rs.getString("parentId")%>"); <BR>        <% <BR>        count++; <BR>        } <BR>        rs.close(); <BR>        %> <BR>onecount=<%=count%>; <BR><SPAN style="COLOR: red"><!--军_select昄的函?-> <BR></SPAN>function changelocation(locationid) <BR>    { <BR>    document.<SPAN style="COLOR: #008080">myform</SPAN>.<SPAN style="COLOR: #333399">NclassId</SPAN>.length = 0; </P> <P>    var locationid=locationid; <BR>    var i; <BR>    for (i=0;i < onecount; i++) <BR>        { <BR>            if (subcat[i][2] == locationid) <BR>            { <BR>                document.<SPAN style="COLOR: #008080">myform</SPAN>.<SPAN style="COLOR: #333399">NclassId</SPAN>.options[document.<SPAN style="COLOR: #008080">myform</SPAN>.<SPAN style="COLOR: #333399">NclassId</SPAN>.length] = new Option(subcat[i][0], subcat[i][1]); <BR>            }        <BR>        } <BR>        <BR>    }    <BR></script> <BR><BR><FORM method="POST" name="<SPAN style="COLOR: #008080">myform</SPAN>" action="adminsave.jsp?action=add"> <BR>  <TABLE> <BR>   <BR>    <TR> <BR>      <TD>一U分c?lt;/TD> <BR>      <TD>  <BR>        <SELECT name="classId" onChange="changelocation(document.myform.classId.options[document.myform.classId.selectedIndex].value)" size="1"> <BR>          <OPTION selected value>==请选一U分c?=</OPTION> <BR>        <sql:query var="query" dataSource="${bookdev}"> <BR>          SELECT * FROM class <BR>       </sql:query> <BR><c:forEach var="row" items="${query.rows}"> <BR> <option value="${row.classId}">${row.className}</option> <BR></c:forEach> <BR></select> <BR>      </TD> <BR>      <TD>选择二分类</TD> <BR>      <TD> <BR>        <SELECT name="<SPAN style="COLOR: #333399">NclassId</SPAN>"> <BR>          <OPTION selected value>==请选二U分c?=</OPTION> <BR>        </SELECT> <BR>      </TD> <BR>    </TR> <BR></TABLE> <BR>  <BR></FORM> <BR></BODY> <BR></HTML> </P> <P> </P><img src ="http://www.aygfsteel.com/huhu/aggbug/5673.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/huhu/" target="_blank">似水年</a> 2005-06-07 15:53 <a href="http://www.aygfsteel.com/huhu/archive/2005/06/07/5673.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tomcat配置之自订tomcathttp://www.aygfsteel.com/huhu/archive/2005/06/07/5670.html似水年似水年Tue, 07 Jun 2005 07:47:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5670.htmlhttp://www.aygfsteel.com/huhu/comments/5670.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5670.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5670.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5670.html5.1 停用目錄檢視 (Directory Listing)

在新?Tomcat 安裝Q預a目錄檢視是啟用的,這可以是一個很有用的測試工P如果像我一樣,您有時會忘記在某個網頁應用程式用了甚麼 servletsQ可以簡單地輸入E頁應用E式?URL Q就能取得完整的列表?

但在生產的用途上Q您可能惛_它關掉。如果沒有其他東西,它不鼓勵使用者在他們不應該逗留的地斚w逛。要關掉這個選項基本上兩個方法:

  • 建立一?index.html 檔案Q將它放在網頁應用程式的目錄內?
  • 修改整體?web.xml 檔案選項關掉?

W一個選項頗為簡單,因此我們只研究W二個選項?

開啟 web.xml 檔案Q這檔案在 $CATALINA_HOME/conf/ 內,是整體的web.xml檔案Q即是這有Q何改變都會媄響該 Tomcat 所有網頁應用程式。如果您惌更精細的控制Q例如某些應用程式關掉,但某些則開啟Q就需要以W一個選項來做,建立 index.html檔案?

扑և以下部分Q?

    <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>
          org.apache.catalina.servlets.DefaultServlet
        </servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    

這是 web.xml 的第一部分Q我們關注的達R是:

        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
    

?nbsp; <param-value> 改為 falseQ便可關掉目錄檢視,是那麼單?

 

5.2 自訂預設頁面

Tomcat使用的慣例與ApacheE頁伺服器相同,index.html 是Q何目錄的預設或首頁。有時您可能x變為 page1.html 或是 JSP 頁面Q如以下一?nbsp; now_see_this.jspQ?

要做到這樣Q只需開啟E頁E式?web.xml Q加上以下這些Q?

    <welcome-file-list>
        <welcome-file>now_see_this.jsp</welcome-file>
        <welcome-file>page1.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
    </welcome-file-list>
    

要o整個系i改變,可在 $CATALINA_HOME/conf 下修Ҏ體的 web.xmlQ並?<welcome-file> 改變指向您所選的檔案?



似水年 2005-06-07 15:47 发表评论
]]>
DisplayTag应用实践http://www.aygfsteel.com/huhu/archive/2005/06/07/5669.html似水年似水年Tue, 07 Jun 2005 07:46:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5669.htmlhttp://www.aygfsteel.com/huhu/comments/5669.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5669.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5669.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5669.html阅读全文

似水年 2005-06-07 15:46 发表评论
]]>
使用标记文g更新和查询数据库http://www.aygfsteel.com/huhu/archive/2005/06/07/5664.html似水年似水年Tue, 07 Jun 2005 07:04:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5664.htmlhttp://www.aygfsteel.com/huhu/comments/5664.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5664.html#Feedback1http://www.aygfsteel.com/huhu/comments/commentRss/5664.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5664.html阅读全文

似水年 2005-06-07 15:04 发表评论
]]>
让jbuilder昄中文http://www.aygfsteel.com/huhu/archive/2005/06/07/5658.html似水年似水年Tue, 07 Jun 2005 06:40:00 GMThttp://www.aygfsteel.com/huhu/archive/2005/06/07/5658.htmlhttp://www.aygfsteel.com/huhu/comments/5658.htmlhttp://www.aygfsteel.com/huhu/archive/2005/06/07/5658.html#Feedback0http://www.aygfsteel.com/huhu/comments/commentRss/5658.htmlhttp://www.aygfsteel.com/huhu/services/trackbacks/5658.html?{jbuider}为jbuilder的安装目??{jbuider}/jdk1.4jre/lib?把font.properties文g备䆾,Ҏ需要将font.properties.*其中之一重命名ؓfont.properties,重启jbuilder卛_.

似水年 2005-06-07 14:40 发表评论
]]>
վ֩ģ壺 | | | | ˫| | ¹Ȫ| | | | ̨| ͩ| | ɽ| | | ˮ| | | | ƾ| ɽ| | | ˮ| ޶| | | | ̫| | ͷ| ţ| ÷| ɽ| ۰| ̺| | | ְ| |