Solved

form error message

Posted on 2004-03-29
7
258 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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 33

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
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 …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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