??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩欧美精品一区二区三区经典 ,久久亚洲国产成人,日韩免费成人网http://www.aygfsteel.com/xiaohan613/category/53063.htmlzh-cnMon, 17 Dec 2012 15:56:00 GMTMon, 17 Dec 2012 15:56:00 GMT60W十二章 JSP page指o(h)http://www.aygfsteel.com/xiaohan613/articles/393053.html晓寒晓寒Sun, 16 Dec 2012 01:58:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/393053.htmlhttp://www.aygfsteel.com/xiaohan613/comments/393053.htmlhttp://www.aygfsteel.com/xiaohan613/articles/393053.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/393053.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/393053.html//使用的类必须攑֜JAVA代码目录?..../WEB-INF/classes/directory MatchingPackageName)
<%@ page contentType="MIME-Type"; charset="Character-Set" %>
//预先知道内容的类?br /><%
String format = request.getParameter("format");
if((format != null) && (format.equals("excel"))){
  
respond.setContentType("applicationvnd.ms-excel");
}
%>
//respond.setContentType("applicationvnd.ms-excel")条g性的生成
<%@ page seesion="true" %> <%-- Default --%>//true(默认)Q是否参与HTTP?x)?br /><%@ page isELIgnored="true"%>
<%@ page buffer="sizekb"%>
//指定使用~冲区的大小Q除非页面完成、明对输出执行清空Q否则篏U至sizekb?/span>执行清空
<%@ page buffer="none"%>
<%@ page autoFlush="true"%><%-- Default --%>
//当缓冲区充满之后Q是否自动清I,q是抛出一个异?/span>
<% @ page info ="Some Message"%>//可以在servlet中通过getServletInfo获取字符?br /><%@ page errorPage="Relativ URL" %>
//指定一个页面来处理当前面中抛出异怽未被捕获的Q何异常?br /><%@ page isErrorPage="true" %>
//指定当前|否可以作为其他JSP面的错误页面?br />处理错误的面攑֜WEB-INF目录中,禁止客L(fng)接访问WEB-INF。发生错误时Q处理错误的面由服务器讉KQ不?x)生产response.sendRedirect调用Q客户只能看到最初请求的URLQ看不到错误面的URL
<%@ page isThreadSafe="true"%><%-- default --%>//׃Lq发讉K的标准机制是实现SingleThreadModel接口Q因此,应该避免使用Q而应使用昑ּ的同步?br /><%@ page extends="package.class" %>
<%@ page language="cobol" %>



晓寒 2012-12-16 09:58 发表评论
]]>
W十一?JSPhttp://www.aygfsteel.com/xiaohan613/articles/392960.html晓寒晓寒Thu, 13 Dec 2012 16:48:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392960.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392960.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392960.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392960.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392960.html<%
     SomeHelperClass test = new SomeHelperClass(...);
     String someString = SomeUtilityClass.someStaticMethod(...);
%>
pȝ?x)认为SomeHelperClass 和SomeUtilityClass在哪个包中呢Q?br />由JSP面转换而成的servlet所在的包,可是JSP规范q没有将q个包标准化Q因此没人知道这个包在哪。因此最好把c都攑֜包里Q把~译好的class文g攑ֈweb应用的ROOT\WEB-INF\classes.
<%
     SomeHelperClass test = new SomeHelperClass(...);
     String someString = coreservlets.SomeUtilityClass.someStaticMethod(...);
%>
2.JSP/Servlet的对?br /><H2>foo</H2>
<%!
     Private String randomHeading(){
     Return(<H2> + Math.random() + </H2>);   // 只用于定义字D和Ҏ(gu)
}
%>
<%= bar() %>
<% bar(); %>
生成的Servlet
public class xxxx implements HttpJspPage{
    private String randomHeading(){
       return(<H2> + Math.random() + </H2>);
    }
    public void _jspService(HttpServletRequest request, HttpServletResponse response)
         Throws ServletException, IOException{
        Response.setContentType(text/html);
        HttpSession session = request.getSession();
        JspWriter out = response.getWriter();
        out.println(<H2>foo</H2>);
        out.println(bar());
        bar();
    }
}
3._jspService自动定义?个局部变?br />request - HttpServletRequest
response - HttpServletResponse
out - JspWriter (对输行缓存,通过page指o(h)的buffer属性调整缓冲区的大?
session - HttpSession
application - ServletContextQ由Web应用中所有的servlet和JSP面׃n
config - ServletConfigQ可以用它来读取初始化参数Q不q实际中Q初始化参数在jspInit中读取,而非_jspService
pageContext - 存储的是与当前页面相关的?br />page - this的同义词Qؓ(f)了在脚本语言中作占位W?br />

晓寒 2012-12-14 00:48 发表评论
]]>
W九(ji)?sessionhttp://www.aygfsteel.com/xiaohan613/articles/392838.html晓寒晓寒Tue, 11 Dec 2012 17:07:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392838.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392838.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392838.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392838.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392838.htmlHttpSession session = request.getSession();
/*pȝ从cookie提取用户IDQ然后以该ID为键Q访问HttpSession对象l成的表?/span>
 *如果session == null的话Q系l默认创Z个新的空sessionQ同时还?x)创Z个名为JSESSIONID的cookie(允许使用)?/span>
 *有时候创Z个新的session是一U浪费,可以使用getSession(false)止q种创徏?/span>
 */
SomeClass value = (SomeClass)sesson.getAttribute("someIdentifier");
/*
*可以调用getAttributeNames()得到所有属性的一个Enumeration.
*/
if(value == null){
value = new SomeClass(....);
session.setAttribute("someIdentifier", value);
/*
*属性类型只要是Object可以了
*/
}
doSomethingWith(value);
2.对urlq行~码
1QString originalURL = ....;
    String encodeURL =response.encodeURL(originalURL);
    out.println("<A HREF=\" " + encodeURL + "\">...</A>");
2) String originalURL = ....;
    String encodeURL =response.encodeRedirectURL(originalURL);
    response.sendRedirect(encodeURL);
    ׃在sendRedirect调用中,URL是放在Location响应报头的,q种情况下,要根据不同的规则定是否需要附加会(x)话信息,因此不能使用encodeURL.


晓寒 2012-12-12 01:07 发表评论
]]>
W八?cookie的设|?/title><link>http://www.aygfsteel.com/xiaohan613/articles/392837.html</link><dc:creator>晓寒</dc:creator><author>晓寒</author><pubDate>Tue, 11 Dec 2012 15:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohan613/articles/392837.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohan613/comments/392837.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohan613/articles/392837.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohan613/comments/commentRss/392837.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohan613/services/trackbacks/392837.html</trackback:ping><description><![CDATA[1.服务器端讄COOKIE<br />1)Cookie cookie = new Cookie(name, value);<br />2)cookie.setMaxAge(mills);<br />3)response.addCookie(cookie);<br />2.客户端读取cookie<br />1)ookie[] cookies = request.getCookies();<br />2)遍历cookiesQ找到感兴趣的cookie<br />3.修改cookie的?br />1QString cookieValue = cookie.getCookieValue("cookiename“)Q?br />    try{<br />         int cookieInt = Integer.parseInt(cookieValue);<br />    }catch(NumberFormatException nfe) { }<br />    Cookie c = new Cookie("cookiename", String.valueOf(cookieValue+1));<br />   <span style="color: red;"> response.addCookie(c);//不能单的setValue<br />2)要指C浏览器删除一个cookieQ只需setMaxAge|ؓ(f)0<br /><br /></span><img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392837.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohan613/" target="_blank">晓寒</a> 2012-12-11 23:27 <a href="http://www.aygfsteel.com/xiaohan613/articles/392837.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>W七? 使用SERVLET生成JPEGhttp://www.aygfsteel.com/xiaohan613/articles/392697.html晓寒晓寒Sun, 09 Dec 2012 15:18:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392697.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392697.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392697.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392697.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392697.html1.创徏一个BufferedImage
   int width = ...;
   int height = ....;
   BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
2.在BufferedImage上绘制内?br />   Graphics2D g2d = (Graphics2D)image.getGraphics();
   g2d.setXXX(...);
   g2d.fill(...);
   g2d.draw(...);
3. 讄Content-Type响应报头
   reponse.setContentType("image/jpeg");
4. 获取输出?br />  OutputStream out = response.getOutputStream();
5.以JPEG格式BufferedImage发送到输出?br />  try{
        ImageIO.writer(image, "jpg", out);
}catch(IOException ioe){
        System.err.println("Error writing jpeg file: " + ioe);
}

晓寒 2012-12-09 23:18 发表评论
]]>
W六? 重定?/title><link>http://www.aygfsteel.com/xiaohan613/articles/392683.html</link><dc:creator>晓寒</dc:creator><author>晓寒</author><pubDate>Sun, 09 Dec 2012 08:18:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohan613/articles/392683.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohan613/comments/392683.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohan613/articles/392683.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohan613/comments/commentRss/392683.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohan613/services/trackbacks/392683.html</trackback:ping><description><![CDATA[public void sendRedirect(String url)<br />该方法生?02响应以及(qing)Location报头Q给出新文档的URLQ浏览器直?q接到新的位|?br />public void sendError(int Code, String message)<br />该方法发送状态代码(一般是404Q以?qing)一D|息?br />对于大部分服务器都会(x)自动?04响应生成一段file not found消息Q其实servlet可以通过sendError\setStatus对这个响应进行定制?nbsp;<img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392683.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohan613/" target="_blank">晓寒</a> 2012-12-09 16:18 <a href="http://www.aygfsteel.com/xiaohan613/articles/392683.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>W五? 发送压~Web面http://www.aygfsteel.com/xiaohan613/articles/392648.html晓寒晓寒Sat, 08 Dec 2012 03:05:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392648.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392648.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392648.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392648.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392648.html向客L(fng)发送压~的Web面Q必L查request的Accept-Encoding报头是否支持q种压羃格式Q如果向不支持的客户端发送压~的Web面Q那么客L(fng)不能正常显C?br />2.respond必须讄报头的Content-Encoding
如果客户端支持该压羃Q用该压羃对输行包装后Q必设|respond的报头的~码压羃Q这样客L(fng)才能正确的解压羃?br />3.如果是gzip格式Q必out.close()?br />
PrintWriter out;
String encodeings = request.getHeader("Accept-Encoding");
String flag = request.getHeader("disableGzip")
if( ((encodings != null) && (encodings.indexof("gzip")) != -1)) &&(!((flag != null) && (!flag.equalsIgnoreCase("false")))){
out = new PrintWriter(new GZIPoutputStream(response.getOutputStream()));
response.setHeader("Content-Encoding", "gzip");
}else{
  out = response.getWriter();
}
.........
......... 


晓寒 2012-12-08 11:05 发表评论
]]>
4.7使用W三方JARӞ文g如何攄http://www.aygfsteel.com/xiaohan613/articles/392517.html晓寒晓寒Wed, 05 Dec 2012 14:09:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392517.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392517.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392517.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392517.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392517.html对于部vQ将JAR文g攑֜WEB应用的WEB-INF/lib目录中?nbsp;

晓寒 2012-12-05 22:09 发表评论
]]>
W四?表单数据http://www.aygfsteel.com/xiaohan613/articles/392329.html晓寒晓寒Sat, 01 Dec 2012 09:11:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392329.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392329.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392329.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392329.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392329.html<FORM ACTION="....">.....</FORM>Q其中action对应的就是处理表单数据的servlet的url?br /><INPUT TYPE="TEXT"  NAME="....">Qservlet通过request.getParameter(NAME)来读取表单中的数据。其中TYPE是html输入的类型?br /><INPUT TYPE="SUBMIT"> 按下q个按钮Q浏览器?x)调用表单的ACTION指定的URL?br />
在servlet中读取表单数据的函数?br />单D取,request.getParameter("NAME")注意参数名是大小写敏感的?br />多D取,request.getParameterValues("NAME")q回的是字符串数l。对于不存在的参数名Q返回gؓ(f)nullQ如果只有单一的|则返回只有一个元素的数组?br />参数名查找,一般情况下servletq不知道参数名,
Enumeration e = request.getParameterNames();
while(e.hasmoreElements()){
String s = (String)e.nextElement();
String[] paraValues = request.getParameterValues(s);
}
getParameterMap是getParameterNames()的代替方案,q个Ҏ(gu)q回的是一个MapQ?br />(参数名,getParameterNames())?br />getReader用了d定制的客L(fng)数据?br />getInputStreamd<INPUT TYPE="FILE" .....>

多字W集输入的读?br />默认情况下,request.getParameter使用的是服务器当前的字符集解释输入的Q如果要改变默认行ؓ(f)Q就要用request.setCharacterEncoding来设|字W集?br />但是要是输入中用了多个字符集,q种做法p不通了?br />可以用getBytes来提取原始的字节数据Q然后用String的构造函数进行编码?br />String s = request.getParameter("firstname");
String s = new String(s.getBytes(), “GBK”);

晓寒 2012-12-01 17:11 发表评论
]]>
W四?servlet处理表单数据时注意事?/title><link>http://www.aygfsteel.com/xiaohan613/articles/392328.html</link><dc:creator>晓寒</dc:creator><author>晓寒</author><pubDate>Sat, 01 Dec 2012 08:37:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohan613/articles/392328.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohan613/comments/392328.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohan613/articles/392328.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohan613/comments/commentRss/392328.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohan613/services/trackbacks/392328.html</trackback:ping><description><![CDATA[1.参数~失或异?br />分析h的参数时Q参数gؓ(f)nullQ空字符?br />String param = request.getParameter("someName");<br />if((para == null) || (param.trim.equals(""))){<br />  doSomethingForMissingValues(...);<br />}else{<br />  doSomethingWithParameter(param);<br />}<br />2.非空Q含有HTMLҎ(gu)字符<br />例如输入字符中有<Q?gt;{,必须在服务器端对字符q行qo(h)转换?br />2.格式有误<br />服务器端必须q行验证<img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392328.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohan613/" target="_blank">晓寒</a> 2012-12-01 16:37 <a href="http://www.aygfsteel.com/xiaohan613/articles/392328.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SingleThreadModel接口的问?/title><link>http://www.aygfsteel.com/xiaohan613/articles/392326.html</link><dc:creator>晓寒</dc:creator><author>晓寒</author><pubDate>Sat, 01 Dec 2012 06:18:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohan613/articles/392326.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohan613/comments/392326.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohan613/articles/392326.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohan613/comments/commentRss/392326.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohan613/services/trackbacks/392326.html</trackback:ping><description><![CDATA[׃Q一般情况下pȝ只生成servlet的单一实例Q之后,为每个用戯求创建新的线E。这L(fng)话,可能出现多个U程q发地访问同一个servlet对象?nbsp;<br />原则上可以实现SingleThreadModelQ可以保证不?x)有多个hU程同时讉K该单个实例。但是这不是个好选择?br /><br />原因一Q如果servlet被频J访问,那么同步?x)对性能造成极大的等待时间?br />原因二,现在服务器可以用多个实例来处理hQ这L(fng)话仍然会(x)出现q发讉K的问题?br /><br />一个好的方案,是明确地同步对代码的访问?br />synchronized(this){<br />................<br />}<img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392326.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohan613/" target="_blank">晓寒</a> 2012-12-01 14:18 <a href="http://www.aygfsteel.com/xiaohan613/articles/392326.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> tomcat错误之A child container failed during starthttp://www.aygfsteel.com/xiaohan613/articles/392324.html晓寒晓寒Sat, 01 Dec 2012 03:58:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392324.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392324.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392324.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392324.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392324.html错误原因Q?/p>

已经发布到tomcat上的某个目的servletqo(h)器配|错误?/p>

如在web.xml下,过滤规则定?#8220;*”是一U错误,需要更正ؓ(f)“/*”或者其他(但是必须要有“/”开_(d)表示当前目



晓寒 2012-12-01 11:58 发表评论
]]>
含有package的servlet部vhttp://www.aygfsteel.com/xiaohan613/articles/392311.html晓寒晓寒Fri, 30 Nov 2012 16:22:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392311.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392311.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392311.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392311.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392311.html
 <servlet>
    <servlet-name>Servlet2</servlet-name>
    <servlet-class>coreservlets.HelloServlet2</servlet-class>
  </servlet>
<servlet-mapping>
    <servlet-name>Servlet2</servlet-name>
    <url-pattern>/servlet2</url-pattern>
  </servlet-mapping>
然后用URL http://localhost/servlet2可以看到servlet的内容了?/div>


晓寒 2012-12-01 00:22 发表评论
]]>试WEB核心~程中的servletQL报找不到的问?/title><link>http://www.aygfsteel.com/xiaohan613/articles/392241.html</link><dc:creator>晓寒</dc:creator><author>晓寒</author><pubDate>Thu, 29 Nov 2012 21:24:00 GMT</pubDate><guid>http://www.aygfsteel.com/xiaohan613/articles/392241.html</guid><wfw:comment>http://www.aygfsteel.com/xiaohan613/comments/392241.html</wfw:comment><comments>http://www.aygfsteel.com/xiaohan613/articles/392241.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/xiaohan613/comments/commentRss/392241.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/xiaohan613/services/trackbacks/392241.html</trackback:ping><description><![CDATA[最q在学java webQ按照servlet核心~程上的一步一步测试,可是到测试servlet时却L报找不到。我按照书上说的把编译好的CLASS攑ֈWEBAPP/WEB-INF/classes目录下,用http://localhost/servlet/HelloServlet讉KQL说找不到?br />在百度上一搜,都说要配|xml<br /><div>  <servlet></div><div>    <servlet-name>HelloServlet</servlet-name></div><div>    <servlet-class>HelloServlet</servlet-class></div><div> </servlet></div><div> <servlet-mapping></div><div>    <servlet-name>HelloServlet</servlet-name></div><div>    <url-pattern>/HelloServlet</url-pattern></div><div> </servlet-mapping></div>然后?a href="http://localhost/HelloServlet">http://localhost/HelloServlet</a>讉KQ就可以了。用<a href="http://localhost/HelloServlet">http://localhost/servlet/HelloServlet</a> q是报错?br />至于书上说要?a href="http://localhost/HelloServlet">http://localhost/servlet/HelloServlet</a>Q说其中的servlet是一条指令,用来q行知道名称的servlet。可是是用的tomcat版本不一P比较书比较早Q我用的tomcat7Q估计是有些地方改了?img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392241.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xiaohan613/" target="_blank">晓寒</a> 2012-11-30 05:24 <a href="http://www.aygfsteel.com/xiaohan613/articles/392241.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>找不到javax.servlethttp://www.aygfsteel.com/xiaohan613/articles/392107.html晓寒晓寒Tue, 27 Nov 2012 18:21:00 GMThttp://www.aygfsteel.com/xiaohan613/articles/392107.htmlhttp://www.aygfsteel.com/xiaohan613/comments/392107.htmlhttp://www.aygfsteel.com/xiaohan613/articles/392107.html#Feedback0http://www.aygfsteel.com/xiaohan613/comments/commentRss/392107.htmlhttp://www.aygfsteel.com/xiaohan613/services/trackbacks/392107.html原因是servlet的api在j2se中没有,
因此必须在classpath中把服务器中的servlet-api.jar的\径设q去Q书上一般说q么讄O(jin)K了,但是我这不好使,q必进行另外一设|,把servlet-api.jar拯qjdk中jre\lib\ext?Q不然仍然会(x)报错Q?br />2.xQ命令行好了,但是eclipse仍然找不到servlet
其实跟上面原因一P׃j2se中的lib中没有servletQ因此必L服务器中的servlet-api.jar引入libraries中,?br />project-properties中的libraries中点击add external jars...把servlet的\径添q去O(jin)K?img src ="http://www.aygfsteel.com/xiaohan613/aggbug/392107.html" width = "1" height = "1" />

晓寒 2012-11-28 02:21 发表评论
]]>
վ֩ģ壺 | | | | ͭ| ̽| | | Դ| | | | | ɽ| | | ϰ| ɽ| ˮ| ɳ| ˮ| | | ˮ| | ̩| | | | | ˮ| ͷ| | Դ| | | | | ʩ| | |