这里用到了一个开源的包commons-fileupload.jar,事实证明这个包十分好用
uploadPhoto.jsp:
<%
@ page contentType
=
"
text/html; charset=GBK
"
%>
< html >
< head >
< title >
upload
</ title >
</ head >
< body bgcolor = " #ffffff " >
< h1 >
<%
if (request.getAttribute( " msg " ) == null )
{ //提示信息
} else {
%>
<%=(String)request.getAttribute("msg")%>
<%
}
%>
</ h1 >
< form action =
< html >
< head >
< title >
upload
</ title >
</ head >
< body bgcolor = " #ffffff " >
< h1 >
<%
if (request.getAttribute( " msg " ) == null )
{ //提示信息
} else {
%>
<%=(String)request.getAttribute("msg")%>
<%
}
%>
</ h1 >
< form action =