Servlet-Mapping in OFBiz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Servlet-Mapping in OFBiz

madppiper-2
Hey there,

I am trying to add a simple servlet to my application. For that I have added the following to the web.xml file:

<servlet>
    <servlet-name>ImageServlet</servlet-name>
    <servlet-class>org.apache.taglibs.image.ImageServlet</servlet-class>
  </servlet>


and

      <servlet-mapping>
    <servlet-name>ImageServlet</servlet-name>
    <url-pattern>/gen-image/*</url-pattern>
  </servlet-mapping>


I was hoping that this would call the Image-Servlet whenever I request the gen-image url. However, the way ofbiz is setup I get the feeling that any call is directly relocated to /control and hence the above doesn't work. I tried looking at the product/facility web.xml file, since there is something similar going on with the ShippingAPI.dll file, but no use... do i need to add the servlet as a request-map to the controller.xml before the above works?
Reply | Threaded
Open this post in threaded view
|

Re: Servlet-Mapping in OFBiz

guo weizhan
it can define servlet there, you should check the allowedPaths
of ContextFilter


2008/12/8 madppiper <[hidden email]>

>
> Hey there,
>
> I am trying to add a simple servlet to my application. For that I have
> added
> the following to the web.xml file:
>
> <servlet>
>    <servlet-name>ImageServlet</servlet-name>
>    <servlet-class>org.apache.taglibs.image.ImageServlet</servlet-class>
>  </servlet>
>
>
> and
>
>      <servlet-mapping>
>    <servlet-name>ImageServlet</servlet-name>
>    <url-pattern>/gen-image/*</url-pattern>
>  </servlet-mapping>
>
>
> I was hoping that this would call the Image-Servlet whenever I request the
> gen-image url. However, the way ifbiz is setup I get the feeling that any
> call is directly relocated to /control and hence the above doesn't work. I
> tried looking at the product/facility web.xml file, since there is
> something
> similar going on with the ShippingAPI.dll file, but no use... do i need to
> add the servlet as a request-map to the controller.xml before the above
> works?
> --
> View this message in context:
> http://www.nabble.com/Servlet-Mapping-in-OFBiz-tp20892386p20892386.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Servlet-Mapping in OFBiz

Abhishake Agarwal
I don't think your required this in ofbiz, instead use a java event in
request mapping in controller.xml.

On Mon, Dec 8, 2008 at 10:43 PM, guo weizhan <[hidden email]> wrote:

> it can define servlet there, you should check the allowedPaths
> of ContextFilter
>
>
> 2008/12/8 madppiper <[hidden email]>
>
> >
> > Hey there,
> >
> > I am trying to add a simple servlet to my application. For that I have
> > added
> > the following to the web.xml file:
> >
> > <servlet>
> >    <servlet-name>ImageServlet</servlet-name>
> >    <servlet-class>org.apache.taglibs.image.ImageServlet</servlet-class>
> >  </servlet>
> >
> >
> > and
> >
> >      <servlet-mapping>
> >    <servlet-name>ImageServlet</servlet-name>
> >    <url-pattern>/gen-image/*</url-pattern>
> >  </servlet-mapping>
> >
> >
> > I was hoping that this would call the Image-Servlet whenever I request
> the
> > gen-image url. However, the way ifbiz is setup I get the feeling that any
> > call is directly relocated to /control and hence the above doesn't work.
> I
> > tried looking at the product/facility web.xml file, since there is
> > something
> > similar going on with the ShippingAPI.dll file, but no use... do i need
> to
> > add the servlet as a request-map to the controller.xml before the above
> > works?
> > --
> > View this message in context:
> > http://www.nabble.com/Servlet-Mapping-in-OFBiz-tp20892386p20892386.html
> > Sent from the OFBiz - User mailing list archive at Nabble.com.
> >
> >
>