You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Thorbjørn Ravn Andersen <th...@gmail.com> on 2006/08/18 13:50:35 UTC
Changing a JSP-file does not rebuild view properly.
I have had a problem for a while and I would appreciate a hint regarding
which words I should use with google to find the solution :)
I do iterative development of JSF in JSP-pages, and I have found that
apparently the view built in the page is somehow cached, and that cache
is not correctly invalidated when I change e.g. an attribute or add an
extra component deep down in the view. I have found the work around to
use an id-attribute on the h:form and just increment it as a serial
number, which apparently invalidates the whole content and force it to
be rebuilt.
What I would LIKE it to happen is that nothing is kept in the cache for
the page what so ever if the JSP-file is recompiled, so that if I change
something it is just a save-in-eclipse, reload-in-browser issue. I'd be
happy to wait a bit longer for the view to be reconstructed.
My guess is that either nobody else but me has this burning desire, or -
much more likely - that I do not know the term :) I tried to skim the
headers of this list, but there are many messages and nothing jumped out
at me. I have also looked at the Wiki and done many searches, so I
think I have at least tried :) What should I do now?
Best regards,
--
Thorbjørn
Re: Changing a JSP-file does not rebuild view properly.
Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Mike Kienenberger skrev den 18-08-2006 17:00:
> Search for "facelets"
>
> :-)
>
I was wondering on that too. At the current moment facelets are not an
immediate option.
> But if you're really stuck with JSPs, then I'd recommend searching the
> container documentation for the ability to turn off caching. This is
> a JSP compilation issue rather than a JSF issue.
The JSP-page is correctly recompiled and reloaded. I just wanted to
make certain that this process invalidates the serialized view.
Oh well, I got the stuff written I needed too, but tedious it was, young
skywalker.
Thanks for all responses :)
--
Thorbjørn
Re: Changing a JSP-file does not rebuild view properly.
Posted by Cagatay Civici <ca...@gmail.com>.
Hi Thorbjørn,
What is your state saving method, server? If so try again with client mode.
Cagatay
On 8/19/06, Dmitry Y. Shyshkin <ds...@isd.dp.ua> wrote:
>
> I have had same problem. You may insert follow lines of code at start of
> you page. This will create a new view on each request.
> <%
> FacesContext facesContext = FacesContext.getCurrentInstance();
> UIViewRoot viewRoot =
> facesContext.getApplication().getViewHandler().createView(facesContext,
> request.getServletPath());
> facesContext.setViewRoot(viewRoot);
> %>
>
>
> Mike Kienenberger wrote:
> > Search for "facelets"
> >
> > :-)
> >
> > But if you're really stuck with JSPs, then I'd recommend searching the
> > container documentation for the ability to turn off caching. This is
> > a JSP compilation issue rather than a JSF issue.
> >
> > On 8/18/06, Thorbjørn Ravn Andersen <th...@gmail.com> wrote:
> >> I have had a problem for a while and I would appreciate a hint
> regarding
> >> which words I should use with google to find the solution :)
> >>
> >> I do iterative development of JSF in JSP-pages, and I have found that
> >> apparently the view built in the page is somehow cached, and that cache
> >> is not correctly invalidated when I change e.g. an attribute or add an
> >> extra component deep down in the view. I have found the work around to
> >> use an id-attribute on the h:form and just increment it as a serial
> >> number, which apparently invalidates the whole content and force it to
> >> be rebuilt.
> >>
> >> What I would LIKE it to happen is that nothing is kept in the cache for
> >> the page what so ever if the JSP-file is recompiled, so that if I
> change
> >> something it is just a save-in-eclipse, reload-in-browser issue. I'd
> be
> >> happy to wait a bit longer for the view to be reconstructed.
> >>
> >> My guess is that either nobody else but me has this burning desire, or
> -
> >> much more likely - that I do not know the term :) I tried to skim the
> >> headers of this list, but there are many messages and nothing jumped
> out
> >> at me. I have also looked at the Wiki and done many searches, so I
> >> think I have at least tried :) What should I do now?
> >>
> >> Best regards,
> >> --
> >> Thorbjørn
> >>
> >
>
Re: Changing a JSP-file does not rebuild view properly.
Posted by "Dmitry Y. Shyshkin" <ds...@isd.dp.ua>.
I have had same problem. You may insert follow lines of code at start of
you page. This will create a new view on each request.
<%
FacesContext facesContext = FacesContext.getCurrentInstance();
UIViewRoot viewRoot =
facesContext.getApplication().getViewHandler().createView(facesContext,
request.getServletPath());
facesContext.setViewRoot(viewRoot);
%>
Mike Kienenberger wrote:
> Search for "facelets"
>
> :-)
>
> But if you're really stuck with JSPs, then I'd recommend searching the
> container documentation for the ability to turn off caching. This is
> a JSP compilation issue rather than a JSF issue.
>
> On 8/18/06, Thorbjørn Ravn Andersen <th...@gmail.com> wrote:
>> I have had a problem for a while and I would appreciate a hint regarding
>> which words I should use with google to find the solution :)
>>
>> I do iterative development of JSF in JSP-pages, and I have found that
>> apparently the view built in the page is somehow cached, and that cache
>> is not correctly invalidated when I change e.g. an attribute or add an
>> extra component deep down in the view. I have found the work around to
>> use an id-attribute on the h:form and just increment it as a serial
>> number, which apparently invalidates the whole content and force it to
>> be rebuilt.
>>
>> What I would LIKE it to happen is that nothing is kept in the cache for
>> the page what so ever if the JSP-file is recompiled, so that if I change
>> something it is just a save-in-eclipse, reload-in-browser issue. I'd be
>> happy to wait a bit longer for the view to be reconstructed.
>>
>> My guess is that either nobody else but me has this burning desire, or -
>> much more likely - that I do not know the term :) I tried to skim the
>> headers of this list, but there are many messages and nothing jumped out
>> at me. I have also looked at the Wiki and done many searches, so I
>> think I have at least tried :) What should I do now?
>>
>> Best regards,
>> --
>> Thorbjørn
>>
>
Re: Changing a JSP-file does not rebuild view properly.
Posted by Mike Kienenberger <mk...@gmail.com>.
Search for "facelets"
:-)
But if you're really stuck with JSPs, then I'd recommend searching the
container documentation for the ability to turn off caching. This is
a JSP compilation issue rather than a JSF issue.
On 8/18/06, Thorbjørn Ravn Andersen <th...@gmail.com> wrote:
> I have had a problem for a while and I would appreciate a hint regarding
> which words I should use with google to find the solution :)
>
> I do iterative development of JSF in JSP-pages, and I have found that
> apparently the view built in the page is somehow cached, and that cache
> is not correctly invalidated when I change e.g. an attribute or add an
> extra component deep down in the view. I have found the work around to
> use an id-attribute on the h:form and just increment it as a serial
> number, which apparently invalidates the whole content and force it to
> be rebuilt.
>
> What I would LIKE it to happen is that nothing is kept in the cache for
> the page what so ever if the JSP-file is recompiled, so that if I change
> something it is just a save-in-eclipse, reload-in-browser issue. I'd be
> happy to wait a bit longer for the view to be reconstructed.
>
> My guess is that either nobody else but me has this burning desire, or -
> much more likely - that I do not know the term :) I tried to skim the
> headers of this list, but there are many messages and nothing jumped out
> at me. I have also looked at the Wiki and done many searches, so I
> think I have at least tried :) What should I do now?
>
> Best regards,
> --
> Thorbjørn
>