Hi all,
    I need to forward to a servlet in order to provide dynamic content,
pdf in this case.

I have a servlet in my webapp, named ats, and I am having trouble
getting it to run.

My action forward is like this:

     <forward name = "TimeRecordFop" path="/TimeRecordFop.pdf" />

In web.xml I declare the servlet and its mapping as:

 <servlet>
   <servlet-name>TimeRecordFop</servlet-name>
   <servlet-class>com.arraybiopharma.servlets.FopServlet</servlet-class>

 </servlet>

 <servlet-mapping>
    <servlet-name>TimeRecordFop</servlet-name>
    <url-pattern>/TimeRecordFop.pdf</url-pattern>
  </servlet-mapping>

It servlet can be accessed by putting the url into the browser like
this:

http://mordor:7001/ats/TimeRecordFop.pdf   and it works properly.
However from inside my Action class, when I forward to TimeRecordFop the
browser gives a 404 error,"The server has not found anything matching
the Request-URI. ".

Is it even possible to forward to a servlet? Is there a way to get
struts to print out the url it is forwarding to?

thanks

john

Reply via email to