Solved

form error message

Posted on 2004-03-29
7
248 Views
Last Modified: 2010-05-18
Hi,

 I have a user login form. When no user or password enters it validates and prints the error "enter username or password" perfectly. But the problem is this error message remains on the screen all the time when I navigate to other pages and comeback to login page again.
I want it to dissappear when I navigate to other page and comeback to the login page again.

please help

thanks

0
Comment
Question by:johnson100
  • 3
  • 3
7 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 10704891
Which app server do you use?
Which technology? How do you write the message?
0
 

Author Comment

by:johnson100
ID: 10705015
The application server used is ATG Dynamo. The technology used for front end is jhtml and backend java and oracle.

When submit button is clicked with out entering any values for username and password then error message is displayed on top of the page as required.

When I navigate from this login page to some other page and come back to login again, the error message still exists on the top of the page. This remains even if I refresh the browser!!! I dont know why this error mesage doesnot disappear when I refresh or navigate from other page!!


thanks
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10705082
Can you post your code here?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:johnson100
ID: 10705204
I am afraid I can not post the complete code here, cos it is very lengthy.
This is code for checking login properties

public void handleLoginRequiredProperties(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException {

        boolean userExists = true;
                             
        if(!validInputField(getBenutzer()) && isPropertyRequired(PROPERTY_NAME_USER)) {
            addFormException(new DropletException(getFormatter().formatMessage(MSG_MISSING_USER)));
        }
        else {
            try {
                if(!userAlreadyExists(getUser(), null, pRequest, null)) {
                    userExists = false;                              
                    addFormException(new DropletException(getFormatter().formatMessage(MSG_USER_NOT_EXISTS)));
                }
            }
            catch(RepositoryException rExc) {
                logError(rExc);
                addFormException(new DropletException(getFormatter().formatMessage(MSG_ERR_PROFILE_REPOSITORY)));
            }
        }
        if(userExists && !validInputField(getPassword()) && isPropertyRequired(PROPERTY_NAME_PASSWORD)) {
            addFormException(new DropletException(getFormatter().formatMessage(MSG_MISSING_PASSWORD)));
        }
    }
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10705283
I thought you wrote it in J2EE.
I am not familiar with these classes.
Sorry.
0
 

Author Comment

by:johnson100
ID: 10705369
oops!  ok, hope some other experts come in my help

thanks
0
 
LVL 32

Accepted Solution

by:
shalomc earned 500 total points
ID: 10706042
johnson100,
I am afraid that you have a bug, that without thourough investigation of your code will be impossible to find.
Somehow, somewhere, your code writes the error message to the screen, and does not reset it.

try to reset the error to blanks BEFORE checking for error.
possibly something along the lines of
addFormException(new DropletException(getFormatter().formatMessage(BLANK_MESSAGE)));

ShalomC
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now