Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Brahmananda Reddy Kakumanu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CSS?
 
Brahmananda Reddy Kakumanu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CSS?
 
Kakumanu Brahmananda Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
David Newton wrote:The client requires you not to use CSS?


Yes :(
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's their reasoning?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll simply need to rejigger the HTML each time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic