Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:50:22+00:00 2026-06-14T05:50:22+00:00

My Applicatoin is based on Spring 3, Hibernate, JSP and MySQL DB While registering

  • 0

My Applicatoin is based on Spring 3, Hibernate, JSP and MySQL DB

While registering user, I want to check if username exists in DB. What is the best way to achieve this? can someone please provide example or reference to other posts?

I have tried below stuff so far

On submit of a page, I have a service call in controller which returns user object (if username exists) otherwise null. i.e. “public User userService.getUser(userName)”

  1. I dont know how to pass the message to jsp so posting this message
  2. I am not sure if this is the correct approach? of not please suggest
    better one
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:50:24+00:00Added an answer on June 14, 2026 at 5:50 am

    I’ll make a ajax call to check the existence of user by calling the this function inside the controller, and display the appropriate message if the user already exist.

    public boolean isUserExist(String userName)
    {
    return userDao.isExist(userName);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The environment of my application: web-based, Spring MVC+Security, Hibernate, MySQL(InnoDB) I am working on
My application is based on Spring 3, Hibernate 3, MySQL. I read the Spring
We have a legacy web application (not Spring based) and are looking for best
I am looking for a web based report designer supporting spring/hibernate. I have seen
I'm developing a web application based on JPA + Hibernate, Spring and Wicket. I
I am building a category-based web application multilanguage using JPA/Hibernate + Spring I currently
I'm using spring based validation in combination with hibernate validator enabled by the following
I have an application that is based on Swing, Spring 2.5.2, Hibernate 3.3.1. If
Our application is based on spring, JPA, Hibernate (3.5.1), postgresql 8.4 We will deliver
I am trying to deploy Spring - Tiles - Hibernate based application in WebSphere

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.