Depends how you've mapped the context root of the app.  By default, Tomcat will set 
the context root to the name of the war file or the dir that holds the WEB-INF under 
the webapps dir.  Add the servlet url-mapping to that and that's what you have to 
request with your JavaScript:

  StoryWeb/classes/book/bookWriter

You might want to edit the url-pattern to something a little shorter, or else fix the 
action String in the JavaScript.

Scott Stirling
Macromedia

-----Original Message-----
From: Means, Garann R.

Hopefully this is really simple: I have a servlet bookWriter in a
package
book. It's stored on my hard drive at
c:\TOMCAT_HOME\webapps\StoryWeb\WEB-INF\classes\book\bookWriter.class.
It
gets called from a JavaScript with the line:

        document.frmStory.action = "book/bookWriter";

It's referenced in the web.xml file with all this stuff (automatically
generated by WebSphere Studio):

        <servlet>
                <servlet-name>bookWriter</servlet-name>
                <display-name>bookWriter</display-name>
                <servlet-class>book.bookWriter</servlet-class>
        </servlet>
        <servlet-mapping>
                <servlet-name>bookWriter</servlet-name>
                <url-pattern>/classes/book/bookWriter</url-pattern>
        </servlet-mapping>

It's giving me the error:

        The requested resource (/StoryWeb/book/bookWriter) is not
available.
when I try and call it from my jsp. What am I doing wrong?
Thank you all again.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to