• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to remove Attribute without the use of scriptlet

 
Bibhudutta Pradhan
Ranch Hand
Posts: 31
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How could I perform this without using <%%> ?

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65664
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, carefully think about the matter and decide if this is something that should really be done in a JSP. Is it view logic? Or control logic? Should it be done in a controller rather than a JSP?

Then if, and only if, you decide that it should be done in the JSP, you'd search for a way to do it with the JSTL. Perhaps you could google JSTL remove attribute.
 
Bibhudutta Pradhan
Ranch Hand
Posts: 31
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what to put in view and what to put in controller, I really dont understand .
Would you please provide me some resource on that ?
Thanks .
 
Paul Clapham
Sheriff
Posts: 21972
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Conceptually it isn't difficult. The controller (e.g. servlet) gathers the request parameters and performs whatever actions are required to update the application's state. This could include updating a database or storing data in the user's session or sending e-mails or whatever other business requirements need to be performed. Then it collects together all of the information required to produce the HTML which is to be sent to the client as the response, and forwards to the view component.

The view (e.g. JSP) takes the information which the controller produced, and generates HTML based on that information.

Note that it isn't the view's responsibility to update the application's state in any way. That's why removing an attribute is a dubious idea for a JSP.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!