• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to remove Attribute without the use of scriptlet

 
Ranch Hand
Posts: 31
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

 
Sheriff
Posts: 67756
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
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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic