DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008

    Display popup message when user login to site in J2EE


    I would like to show a popup message to the users when ever login to my site, only when login( later on it is not required).

    we are using java/j2ee for my application, and authentication provided using the Filters, once login success we are redirecting the request to the requested page(it is not the same always it depends on user access but any access to our application there authentication will be performed). here I want to display a popup message to the user when logon.

    Please suggest me where i can use the popup message to display to the user.

    Thanks in advance.

  2. #2
    Join Date
    Aug 2009
    Hi There,

    I believe you will be using either an HTML or Javascript element to display the popup and definately you would like to delegate the responsibility for the same to the UI layer/components.

    In such a case, my recommendation would be to do the following:

    • Upon successful login in your Filter, set an appropriate message in request scope.
    • Write a small JSP file or a Tag, which is responsible for displaying the required popup containing the message set earlier.
    • Include this JSP or Tag definition in all the possible outcome paths (JSP's)

    Being true to MVC, the security concern is handled by your Filters/Controllers and the message is set in a Model, which is then displayed by the View layer (JSP).

    Let me know if you any constraints in following this approach, if so can think of an alternate approach.


  3. #3
    Join Date
    Aug 2008
    Thank you for your suggestion, I implemented this and working good.
    Is there any other way to without changing all the JSPs(becoz we may not expect as user which url requesting as per their bookmarks set).

    Thinking about if we can pass this along with the redirect in Java Filter which was using for the authentication.

Similar Threads

  1. Display XML element attributes in CSS or XSL
    By Allen Pitts in forum XML
    Replies: 0
    Last Post: 10-31-2002, 03:02 PM
  2. informing user with a message!
    By s in forum ASP.NET
    Replies: 0
    Last Post: 01-28-2002, 10:03 AM
  3. Replies: 0
    Last Post: 10-25-2001, 04:29 PM
  4. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM
  5. Determining when a user leaves your web site
    By Manoj in forum Enterprise
    Replies: 0
    Last Post: 06-28-2001, 09:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

By using this site, you agree to the Privacy Policy