Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advice on a putting dynamic message on jsp page depending on action taken by user

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have user login and registration pages set up right now, and a loginSuccess page. The user goes to the login page first of course, and then hits "register". If registration is successful (condition is username and password being added to database) I want the user sent back to the login page, with a new message saying something like "feel free to login 'newUserName'" I have this all done accept for the message at the top of the page saying "login" or whatever it will say

What is the best way to go about this? I was trying to use a request attribute, but since the attribute is null when you first get to the login page, there are compile errors (I guess you cannot do request.setAttribute within the jsp page?). I would be willing to set this attribute to a default value, like "Please login" but I have not been able to figure out how (guessing in the faces-config file).

Or I would also like to know if there is simply a better way to handle this.

Thanks


edit - doubt it is needed, but here is the simple login page I am wanting to put the dynamic message on:

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65226
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your scoped variable is named someMessage:

Of course, you need the JSTL set up.
 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is all new material for me.

Can you suggest what I should search for in google to learn how to use this info?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic