• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Village Idiot
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Sheriff
Posts: 67749
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
If your scoped variable is named someMessage:

Of course, you need the JSTL set up.
 
Matt Kohanek
Village Idiot
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic