You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by madppiper <pa...@mutschler.ch> on 2008/12/08 10:56:41 UTC

Servlet-Mapping in OFBiz

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.


Re: Servlet-Mapping in OFBiz

Posted by Abhishake Agarwal <ab...@gmail.com>.
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 <gu...@gmail.com> wrote:

> it can define servlet there, you should check the allowedPaths
> of ContextFilter
>
>
> 2008/12/8 madppiper <pa...@mutschler.ch>
>
> >
> > 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.
> >
> >
>

Re: Servlet-Mapping in OFBiz

Posted by guo weizhan <gu...@gmail.com>.
it can define servlet there, you should check the allowedPaths
of ContextFilter


2008/12/8 madppiper <pa...@mutschler.ch>

>
> 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.
>
>