You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Harry Metske <ha...@gmail.com> on 2009/05/13 22:08:21 UTC

Re: [jira] Commented: (JSPWIKI-438) Change Development Structure to java project or dynamic web project

indeed, the error is caused by the fact that the servlet filters are
initialized in a different order when running in Jetty compared to Tomcat.
In Jetty the WikiServletFilter is initialized first (and fails), while in
Tomcat the StripesFilter is first initialized.

If I change the order of the two filters in web.xml, the error disappears in
Jetty (we bump into other errors, but that's for later).
I could not find anything in the JEE spec about the order in which servlet
filters should be initialized (initialized, not executed !) (anyone else ?).
If that is true, we should make sure that the order of filter initialization
is correct. (suggestions ?)

regards,
Harry

2009/5/12 Andrew Jaquith (JIRA) <ji...@apache.org>

>
>    [
> https://issues.apache.org/jira/browse/JSPWIKI-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708598#action_12708598]
>
> Andrew Jaquith commented on JSPWIKI-438:
> ----------------------------------------
>
> Yes, there's an order-of-startup issue here. Stripes wants to start itself
> first so that it can stash its configuration in the ServletContext, which
> one of our classes in JSPWiki later needs to find. This should not be too
> hard to fix -- we just need to make sure Stripes bootstraps itself first.
>
> > Change Development Structure to java project or dynamic web project
> > -------------------------------------------------------------------
> >
> >                 Key: JSPWIKI-438
> >                 URL: https://issues.apache.org/jira/browse/JSPWIKI-438
> >             Project: JSPWiki
> >          Issue Type: Wish
> >         Environment: Eclipse 3.4
> >            Reporter: Kurt Stein
> >            Assignee: Janne Jalkanen
> >             Fix For: 3.0
> >
> >   Original Estimate: 0h
> >  Remaining Estimate: 0h
> >
> > Hi,
> > I am having difficulties to install JSPWiki in Eclipse. I know that Janne
> has made some scripts that compile to project. Well, Eclipse runs some nice
> background compiling development features so that you don´t need to run the
> script everytime you change some code.
> > Only thing is you need to arrange the wiki structure i little bit more
> like a web project.
> > I know that this has been a issue before but are there any reasons why
> f.e. the webdocs can´t be moved to WEB-INF?
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

Re: [jira] Commented: (JSPWIKI-438) Change Development Structure to java project or dynamic web project

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
Hi Harry,

The servlet specification doesn't say anything about the ordering of init
calls to filters, only that they are guaranteed to be called
before a request that needs that filter is processed. For example (I recall
reading it somewhere), Jetty stores filters in a Map.

One approach you can use to force the init() ordering of filters is to
define a "parent" filter which is responsible of calling the subsequent
init() methods. An example of this approach could be MyFaces Orchestra
Compound<http://svn.apache.org/repos/asf/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/CompoundFilter.java>filter.


regards,
juan pablo


On Wed, May 13, 2009 at 10:08 PM, Harry Metske <ha...@gmail.com>wrote:

> indeed, the error is caused by the fact that the servlet filters are
> initialized in a different order when running in Jetty compared to Tomcat.
> In Jetty the WikiServletFilter is initialized first (and fails), while in
> Tomcat the StripesFilter is first initialized.
>
> If I change the order of the two filters in web.xml, the error disappears
> in
> Jetty (we bump into other errors, but that's for later).
> I could not find anything in the JEE spec about the order in which servlet
> filters should be initialized (initialized, not executed !) (anyone else
> ?).
> If that is true, we should make sure that the order of filter
> initialization
> is correct. (suggestions ?)
>
> regards,
> Harry
>
> 2009/5/12 Andrew Jaquith (JIRA) <ji...@apache.org>
>
> >
> >    [
> >
> https://issues.apache.org/jira/browse/JSPWIKI-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708598#action_12708598
> ]
> >
> > Andrew Jaquith commented on JSPWIKI-438:
> > ----------------------------------------
> >
> > Yes, there's an order-of-startup issue here. Stripes wants to start
> itself
> > first so that it can stash its configuration in the ServletContext, which
> > one of our classes in JSPWiki later needs to find. This should not be too
> > hard to fix -- we just need to make sure Stripes bootstraps itself first.
> >
> > > Change Development Structure to java project or dynamic web project
> > > -------------------------------------------------------------------
> > >
> > >                 Key: JSPWIKI-438
> > >                 URL: https://issues.apache.org/jira/browse/JSPWIKI-438
> > >             Project: JSPWiki
> > >          Issue Type: Wish
> > >         Environment: Eclipse 3.4
> > >            Reporter: Kurt Stein
> > >            Assignee: Janne Jalkanen
> > >             Fix For: 3.0
> > >
> > >   Original Estimate: 0h
> > >  Remaining Estimate: 0h
> > >
> > > Hi,
> > > I am having difficulties to install JSPWiki in Eclipse. I know that
> Janne
> > has made some scripts that compile to project. Well, Eclipse runs some
> nice
> > background compiling development features so that you don´t need to run
> the
> > script everytime you change some code.
> > > Only thing is you need to arrange the wiki structure i little bit more
> > like a web project.
> > > I know that this has been a issue before but are there any reasons why
> > f.e. the webdocs can´t be moved to WEB-INF?
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>