• 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

On-the-Fly changing the layout in JSP or web page

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i have a requirement like changing the layout in webpage (JSP) on the fly.

layout switching should be done with out restarting the app server.

Thanks in advance.

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CSS?
 
Brahmananda Reddy Kakumanu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not using java script or CSS. Should be done at server side and without redeploying or restarting the application server.
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

So you mean you want to remove the JSP's you have and put new ones in? How is this going to be started, does someone click a link or does it happen every 2 hours? Are you going to be changing the layout back and forward from one to the other?

To me, I agree with David, surely CSS would be the route to go down. I refuse to believe that your requirements say you must have say 10 different layouts for the same jsp page and you must do them all in seperate JSPs.

Sean
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brahmananda Reddy Kakumanu wrote:Not using java script or CSS. Should be done at server side and without redeploying or restarting the application server.


Ridiculous, and flies in the face of anything that makes sense.

Check out the CSS Zen Garden: all done with CSS. Doing it any other way is a waste of time.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
requirement is like whenever content (layout in JSP) changed in CMS should reflect the same for new users not of old users ( who are already accessing the page ).

1). User1 -- accessing -- www.abc.com -- viewing page in layout1
2). changed layout1 to layout2 in JSP (which is in CMS and published)
3). User2 -- accessing -- same www.abc.com -- should get layout2

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CSS?
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sean Clark wrote:Hey,

So you mean you want to remove the JSP's you have and put new ones in? How is this going to be started, does someone click a link or does it happen every 2 hours? Are you going to be changing the layout back and forward from one to the other?

Sean



hi clark, we are planning to move JSP's to CMS. so that we can change jsp's on the fly without restarting server. we can achieve this by using custom tag and including those JSP's (for this we need to create JSP's in war or ear file, but another hurdle is we shouldn't create JSP's in the filesystem ).
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can *already* change JSPs on the fly without restarting the server. And JSP is a horrible standalone templating system, and difficult to make it in to such: FreeMarker, Velocity, etc. are all better choices for dynamic templates.

But you have yet to explain why CSS isn't a good choice.
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:You can *already* change JSPs on the fly without restarting the server. And JSP is a horrible standalone templating system, and difficult to make it in to such: FreeMarker, Velocity, etc. are all better choices for dynamic templates.

But you have yet to explain why CSS isn't a good choice.



Hi david,

i do agree with you, using CSS we can handle this. But we shouldn't use js or css (according to client requirement).

how can we handle this in freemarker or velocity ???

thanks in advance.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The client requires you not to use CSS?
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:The client requires you not to use CSS?



Yes :(
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's their reasoning?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's like someone ordering a modern car, but saying not to use electronics. Ridiculous!

I understand that the client calls the shots because they have the money, but sometimes you need to push back on them a little when they make silly decisions based upon ignorance.
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What's their reasoning?


i am not sure about their reasoning.
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kakumanu Brahmananda Reddy wrote:

David Newton wrote:What's their reasoning?


i am not sure about their reasoning.



any work around?

Thanks in advance.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll simply need to rejigger the HTML each time.
 
Pay attention! Tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic