Next Generation Emulation banner

1 - 1 of 1 Posts

Knowledge is the solution
7,168 Posts
Discussion Starter · #1 ·
Ok I just started to learn JSP but I haven't found a little question I have in my book so here it is :p

I want to define a set of links that when clicked, will reload the current page the user is into, but with a different text according to the page you are into.

So say, I define a String setText(int text) function that will contain all the possible texts. However, how can I make that my link executes the session.setAttribute( "attribute",setText(numberhere)); thingy before reloading the page

Im guessing the page goes like this
<%= session.getAttribute( "attribute" ) %>


Also, how can I set that this "attibute" will be set to some welcome string by default (for the first time I load my page)

Or if my approach is plainly wrong please tell me how to do it :p
1 - 1 of 1 Posts