Solved

form error message

Posted on 2004-03-29
7
256 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

732 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