Hi Igor, Johan

Thanks very myuch for the clarification.

Regards
Dipu


  ----- Original Message ----- 
  From: Igor Vaynberg 
  To: wicket-user@lists.sourceforge.net 
  Sent: Thursday, November 16, 2006 6:22 PM
  Subject: Re: [Wicket-user] servlet-mapping


  to better explain

  usually static resources are handled by the application server. the server 
knows it is serving a file and thus sets the last modified date of the resource 
to the last modified date of a file.

  so lets say you have

  /myapp/images/foo.gif

  and you map your wicket servlet to /*

  what happens is that when a request comes in for /myapp/images/foo.gif it 
will match the wicket servlet - so now it is wicket servlet's job to serve this 
file to the browser. now we are nice enough to provide support for this - but 
obviously we cannot do as good a job as the application server which has a lot 
more context. 

  so we recommend mapping the servlet to something like /app/* so that foo.gif 
will be processed by the application server and only wicket-specific requests 
are processed by the servlet.

  in 2.0 what we did was instead of using a servlet use a filter 

  the advantage of a filter is that unlike a servlet it can choose not to 
process the request and let whatever is next in chain try. so when using a 
wicket filter and a request comes in for foo.gif the filter chooses not to 
process it because it knows it is not a wicket-related request. since the 
filter didnt process it it falls on to the application server to try, and then 
it works. 

  someone mind putting this on the wiki?

  -igor





  On 11/16/06, Johan Compagner <[EMAIL PROTECTED] > wrote:
    when using wicket 1.x and the WicketServlet (maybe we backport the filter 
to 1.3 i don't know yet)
    Don't have an servlet mapping of /*
    Because then the wicket servlet must do everything also as you notice the 
static resources 
    Those resources should be handled by the right (default?) servlet of your 
app server.
    But with a servlet it is all or nothing. In 2.0 we fixed this then we also 
supply a filter
    so that we can pass it through to the next filter/servlet when we (the 
filter) doesn't want this request. 

    so servlet mapping of /* is strongly not recommended!!

    johan




    On 11/16/06, James Carnegie <[EMAIL PROTECTED] > wrote:
      Hi Dipu,

      I don't know the answer to your problem, but I am experiencing it too 
      and would be very interested in learning about any solutions you find.

      Customers need to be able to specify what URL's look like, so the Wicket
      framework should _not_ dictate this.

      Can someone explain why we cannot use the <url-pattern>/*</url-pattern> 
      and have static resources loaded properly (with correct headers etc)?

      Kind regards,

              /james

      Dipu wrote:
      > Hi Jean,
      >
      > Thanks for replying ,
      >
      > Context path is something like  /myapp 
      >
      > I don't understand why it doesnt add the last modified header to static
      > resources when the <url-pattern>/*</url-pattern>
      >
      > Regards
      > Dipu
      >
      >
      >
      > ----- Original Message -----
      > From: "Jean-Baptiste Quenot" <[EMAIL PROTECTED]>
      > To: < wicket-user@lists.sourceforge.net >
      > Sent: Thursday, November 16, 2006 3:40 PM
      > Subject: Re: [Wicket-user] servlet-mapping
      >
      >
      >> What is the context path of your webapp within the servlet
      >> container?
      >>
      >> Have you seen this issue:
      >> http://issues.apache.org/jira/browse/WICKET-66 
      >>
      >> All the best,
      >> --
      >>     Jean-Baptiste Quenot
      >> aka  John Banana Qwerty
      >> http://caraldi.com/jbq/
      >> 
      >> 
------------------------------------------------------------------------- 
      >> Take Surveys. Earn Cash. Influence the Future of IT
      >> Join SourceForge.net's Techsay panel and you'll get the chance to share
      >> your
      >> opinions on IT & business topics through brief surveys - and earn cash 
      >> 
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
      >> _______________________________________________ 
      >> Wicket-user mailing list
      >> Wicket-user@lists.sourceforge.net
      >> https://lists.sourceforge.net/lists/listinfo/wicket-user 
      >
      >
      > 
-------------------------------------------------------------------------
      > Take Surveys. Earn Cash. Influence the Future of IT
      > Join SourceForge.net's Techsay panel and you'll get the chance to share 
your 
      > opinions on IT & business topics through brief surveys - and earn cash
      > 
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
      > _______________________________________________
      > Wicket-user mailing list
      > Wicket-user@lists.sourceforge.net
      > https://lists.sourceforge.net/lists/listinfo/wicket-user

      -------------------------------------------------------------------------
      Take Surveys. Earn Cash. Influence the Future of IT
      Join SourceForge.net 's Techsay panel and you'll get the chance to share 
your 
      opinions on IT & business topics through brief surveys - and earn cash
      http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
      _______________________________________________
      Wicket-user mailing list
      Wicket-user@lists.sourceforge.net 
      https://lists.sourceforge.net/lists/listinfo/wicket-user




    -------------------------------------------------------------------------
    Take Surveys. Earn Cash. Influence the Future of IT
    Join SourceForge.net's Techsay panel and you'll get the chance to share 
your 
    opinions on IT & business topics through brief surveys - and earn cash
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

    _______________________________________________
    Wicket-user mailing list
    Wicket-user@lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/wicket-user 







------------------------------------------------------------------------------


  -------------------------------------------------------------------------
  Take Surveys. Earn Cash. Influence the Future of IT
  Join SourceForge.net's Techsay panel and you'll get the chance to share your
  opinions on IT & business topics through brief surveys - and earn cash
  http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


------------------------------------------------------------------------------


  _______________________________________________
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to