http://localhost:8080/image/showimage
试试。

解决方案 »

  1.   

    http://localhost:8080/showimage改为http://localhost:8080/servlet/image/showimage
      

  2.   

    错了,试试这个:http://localhost:8080/servers/image/showimage
      

  3.   

    // * 修改 web.xmo *//<?xml version="1.0" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>

    <servlet>
    <servlet-name>
    showimage
    </servlet-name>
    <servlet-class>
    image.showimage
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    showimage
    </servlet-name>
    <url-pattern>
    /showimage/*
    </url-pattern>
    </servlet-mapping>



    <!-- END EGovRequestHandler -->
    </web-app>
      

  4.   

    我的web.xml为<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <servlet-name>debugjsp</servlet-name>
        <description>Added to compile JSPs with debug info</description>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>classdebuginfo</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet>
        <servlet-name>showimage</servlet-name>
        <servlet-class>image.showimage</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>debugjsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>showimage</servlet-name>
        <url-pattern>/showimage</url-pattern>
      </servlet-mapping>
    </web-app>
    我试了http://localhost:8080/servers/image/showimage
    不行呀!!!
      

  5.   

    不明白楼主的意思.如果想用jsp调servlet有用img标签调用的吗?:)
      

  6.   

    你的web应用如果不是放在默认的应用下面是不能写<img src="http://localhost:8080/showimage">要加上你的应用名。
    如: <img src="http://localhost:8080/web应用名/showimage">