问题1:我在C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps目录下存放了shoppingCourt,然后shoppingCourt\WEB-INF\classes\shopping目录下存放ShoppingServlet.class。
JSP代码中用<form action="WEB-INF/classes/ShoppingServlet">连接servlet。
在MyEclipse中测试的时候说找不到servlet,在IE中(tomcat)404错误,好象是说是不合法。总之看不懂。问题2:也许上面叙述不够准确。我想请教下怎么在MyEclipse下写servlet,我是直接在src文件下创建包,然后创建servlet。然后就是上面的错误了。请讲述详细些。谢谢问题3:在之前有写过jsp调用JAVABEAN的。但是报出以下错误。请问如何解决:
Could not initialize the browser`s security.The most likely cause is problems with files in your browser`s profile directory.Please check that this directory has no read/write resitrictions.and your hard disk is not full or close to full.It is recommended that you exit the browser and fix the problem. If you continue to use this browser session, you might see incorrect browser behaviour when accessing security features.

解决方案 »

  1.   

    除了jsp翻译过来得到的servlet,任何自己写的servlet都必须在web.xml里面配置才能访问。
      

  2.   

    给个spring mvc的servlet的例子:  <servlet><!-- 定义一个servlet -->
        <servlet-name>pda</servlet-name><!--servlet的名字 -->
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><!-- servlet的类的全路径 -->
        <init-param><!-- 只供servlet访问的一个初始化参数 -->
          <param-name>contextConfigLocation</param-name><!-- 参数名 -->
          <param-value>/WEB-INF/config/applicationContext-servlet.xml</param-value><!-- 参数值(一定是字符串) -->
        </init-param>
        <load-on-startup>1</load-on-startup><!-- servlet的加载优先级 -->
      </servlet>
      <servlet-mapping> <!-- servlet的访问路径映射 -->
        <servlet-name>pda</servlet-name><!-- 要映射的servlet的名字 -->
        <url-pattern>*.do</url-pattern><!-- 能被servlet访问的url具有的格式(意思是任何以.do结尾的url,都将被该servlet处理 -->
      </servlet-mapping>
      

  3.   

    楼上的吧spring都整出来了!servlete 是要在web.xml配置的!
     <servlet-mapping> <!-- servlet的访问路径映射 -->
        <servlet-name>pda</servlet-name><!-- 要映射的servlet的名字 -->
        <url-pattern>*.do</url-pattern><!-- 能被servlet访问的url具有的格式(意思是任何以.do结尾的url,都将被该servlet处理 -->
      </servlet-mapping>
    顶楼上!!