You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by Baron <ba...@i-hometown.com> on 2000/10/30 13:36:11 UTC

May I ask a question of Tomcat?

Hi,

I was installing Tomcat and Apache for testing. Most of functions were working fine.
But there was a problem when I want to upload  a file. A form tag was setting in a jsp file as following
<form enctype="multipart/form-data" action="/servlet/UploadDepartmentImage" method=POST>
when I submit to upload, the URL was transfered to
http://servername/servlet/UploadDepartmentImage , this is a worng URL
Actually, the correct URL should be 
http://servername/jeestore/servlet/jeestore/UploadDepartmentImage

And, web.xml was setting as following

<web-app>
    <servlet>
        <servlet-name>jeestore</servlet-name>
        <servlet-class>com.jeestore.JeestoreServlet</servlet-class>
           <init-param>
             <param-name>servlet.properties.location</param-name>
             <param-value>/home/jeestore/etc/jeestore.properties</param-value>
           </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>UploadLogo</servlet-name>
                <servlet-class>com.oreilly.servlet.UploadLogo</servlet-class>
                <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>UploadProductImage</servlet-name>
                <servlet-class>com.oreilly.servlet.UploadProductImage</servlet-class>
                <load-on-startup>3</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>UploadDepartmentImage</servlet-name>
                <servlet-class>com.oreilly.servlet.UploadDepartmentImage</servlet-class>
                <load-on-startup>4</load-on-startup>
    </servlet>
</web-app>
 
Would you please tell me what's wrong? 
Thanks.
 
Baron