Hi,
The problem for static resources went away. But now http is not able to find the servlet class when I click on the button on the form. This used to work before I changed the config in web.xml. So I am assuming this problem is related to what I have done in web.xml.
Here is what is happening:


   * on http//localhost:8080, http invokes com.client.BizDispatcher.
   * The servlet constructs a login page and sends it to the browser.
   * Among other things, the login page has 2 "submit", one login and
     the other cancel.
   * The form tag is as follows:
         o <form method="POST" action="com.client.BizDispatcher">
   * I enter the user ID and password and click on the "Login" submit
     button.
   * I get a servlet error that says it is not able to find
     /com.client.BizDispatcher.

Have I done something wrong in the config?

   * Here are the entries in my web.xml under ROOT\WEB-INF:
     <>
     <?xml version="1.0" encoding="ISO-8859-1"?>
     <!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>
       <display-name>Welcome to Tomcat</display-name>
       <description>
          Welcome to Tomcat
       </description>


<!-- JSPC servlet mappings start -->

         <servlet>
             <servlet-name>org.apache.jsp.index_jsp</servlet-name>
             <servlet-class>org.apache.jsp.index_jsp</servlet-class>
         </servlet>

<servlet>
<servlet-name>bizDispatcher</servlet-name>
<servlet-class>bizDNA.bizClient.bizBrowserClient.BizDispatcher</servlet-class>
</servlet>


         <servlet-mapping>
             <servlet-name>org.apache.jsp.index_jsp</servlet-name>
             <url-pattern>/index.jsp</url-pattern>
         </servlet-mapping>


<servlet-mapping> <servlet-name>bizDispatcher</servlet-name> <url-pattern>/bizDispatcher</url-pattern> </servlet-mapping>

     <!-- JSPC servlet mappings end -->
         <welcome-file-list>
         <welcome-file>bizDispatcher</welcome-file>
             <welcome-file>index.html</welcome-file>
             <welcome-file>index.htm</welcome-file>
             <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>

</web-app>
<>


Thanks...Ram
-------------------------------------------------------------------------------------------------------------------------------------------------
Ram Sriram wrote:

Hi,
Thanks for all the help everyone. The problem is solved.
Having my servlet mapped to "/" pattern was the problem. I changed the pattern for my servlet and added the entry in the welcome-file-list and the static resources show up and the page waits for the user response even with a gif image in the page.
Once again, thanks for all the help to all you guys who made valuable suggestions.
Thanks...Ram
-----------------------------------------------------------------------------------------------------------------------------------------------------------



Ben Souther wrote:

On Sat, 2004-12-11 at 15:52, Mike Curwen wrote:


you've named it 'myweb.xml', just so we can tell the attachments apart, or
is it actually named myweb.xml? If the latter, change it to web.xml.


And having your servlet mapped to "/" is most likely the problem.

The default servlet is the one that Tomcat uses to serve up static
resources. So either change your servlet to handle static resources or (way
better option), map your servlet to a pattern other than "/", and then
change your web form accordingly.


Yes, If you don't want to have to type the name of the servlet-mapping
in the URL, create a welcome file listing with the same name as your url-pattern. (Servlet Spec 2.4 and up)



<servlet> <servlet-name>bizDispatcher</servlet-name> <servlet-class>com.client.BizDispatcher</servlet-class> </servlet>

   <servlet-mapping>
     <servlet-name>bizDispatcher</servlet-name>
     <url-pattern>/bizDispatcher</url-pattern>
   </servlet-mapping>

   <welcome-file-list>
     <welcome-file>bizDispatcher</welcome-file>
     <welcome-file>index.html</welcome-file>
     <welcome-file>index.jsp</welcome-file>
   </welcome-file-list>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






Reply via email to