Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

JSP page that lets the users supply background color...

hi!

If I want to make a JSP page that lets the users supply a request parameter indicating the background color. If no parameter ins supplied, the most recently used background color(i,e., from the previous request by the most recent user) should be used.
So, my question is how do I save the previous request since I have no idea about previous request(background color request)?

thanks,
0
dkim18
Asked:
dkim18
2 Solutions
 
bloodredsunCommented:
You would have to save this info in the application scope. This scope lasts longer than session, infact it lasts as long as the webapp is running
0
 
dkim18Author Commented:
can you be more specific? Do I need use Attribute?
0
 
thomas908Commented:
Yes u'll need to use application attribute

In JSP

for setting attribute

application.setAttribute("color", cName);
Where cName is a properly declared variable name

for getting attribute

String cName = (String)application.getAttribute("color");
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now