• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Container restart required for jsp changes?

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using tomcat + suns ri.

When I make changes to the jsf tags in a jsp the changes doesn't go through when I reload the page in the browser, not untill I have restarted the browser. This is not always the case but more often than not. And when I update the id i get "JspException: Duplicate component ID ..." (again restarting tomcat is required).

I've heard others have the same problem, is there a solution for this?
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I'd start by tyring to recreate this in a "regular" jsp page. By that I mean a page without jsf tags. Try jstl maybe. Make a change, and see if you need a restart.

You shouldn't. If you do, then its an issue with the container or your setup.

If you can't replicate the issue without jsf tags, then there's a different "problem". Problem is in quotes.

First clarify:

When I make changes to the jsf tags in a jsp the changes doesn't go through when I reload the page in the browser, not untill I have restarted the browser.



Are you restarting the browser or tomcat? If its the browser, I think you're having an issue with the fact that your original jsf view conflicts with the changes you've made to the jsp.

I'm pretty new to this myself, but there's an obvious issue with this, but there's no "fix". Its part of the api. I'd suggest either turning off session cookies in your browser and letting it work by url rewrites. Then, strip the session id when you want to start the page over again. This will dump your session.

You could also tell jsf to store the view state on the client(I'm not 100% sure of the setting for this. Somebody with more experience please chime in with some details). The client stored state is part of the jsf api, and I believe it was intended to help with developing pages, so it seems like a good way to go. When you change your jsf tags, start with the standard url (don't try to submit, and be careful with the refresh. You want to dump the view state).

I'll assume your duplicate id issue is the same deal. jsf view confusion.
 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kevin,

First, I must have been tired when I wrote the post, I meant "restarted tomcat" (not "the browser").

After switching the session saving to the client (in web.xml) it actually seems better. I've only tried it for 20 minutes, but so far I haven't been able to replicate the errors, so maybe it's a good idea to save state on client during development.

/Seb
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic