[ASK] Duplicated Error Message on server side validation

I want to use server-side validation instead of client-side validation for my input form as suggested by John Stageman, by:
1). set required=false
2). set showRequired=true
3). Ensure that the attribute is mandatory in the model layer
It seems to work, except that the error message displayed by <af:messages> is kinda weird bcause they are repeated, for example;
Attribute Attr1 in MyAM.MyView is required
Attribute Attr2 in MyAM.MyView is required
- Attribute Attr1 in MyAM.MyView is required
- Attribute Attr2 in MyAM.MyView is required
Attribute Attr1 in MyAM.MyView is required
Attribute Attr2 in MyAM.MyView is requiredand the number of reduplication seems growing each time I click the Save button.
besides, for "value required" validation, the component related error message is not displayed (the red message under the component).
Any clues?
Thanks..
@John : I decide to open it as new thread bcause it seems to be different question..

Hi, thanks for your fast response Frank,
My page has several iterator binding and I have tried to set all of their refresh options as you suggested, but the problem still remains the same T_T
Maybe somewhere, someone has put some additional manual validation, bcause it is a team project, I still dont know where to find those phantom codes..
Regards,
from island of gods

Similar Messages

  • How can i dispaly an Error Message from Server Side To form

    Hi All,
    How can i dispaly an Error Message from Server Side To form side .
    i try several ways nothing succed.
    i put the error in stack and after call the procedure from form i added
    Qms$Trans_Errors.Display_Messages;
    and because it is an error not informantional error the error screen displayed and enter
    in infinite loop acts like flashing .
    can any one help me please i use C/S Headstart6i and Designer 6i
    thanks alot
    radi

    hi,
    thanks alot lauri.
    yr code work only using information message but in error message its still the same .
    the error window still flash and enter in infinite loop of executeing the same triggers.
    thanks again
    radi

  • Error message during server side process

    Bonjour,
    In my application's method i call a standard r/3 function for created an order in IS-MEDIA.
    In certain cases this function send an message id type 'E'.
    This message causes the error: HTTP 500 - on my BSP page.
    Is-it possible to avoid this ?
    Best regards.

    check this thread
    https://forums.sdn.sap.com/click.jspa?searchID=3157097&messageID=70898

  • Pop up error messages for failed custom validation

    I am using jdev-10.1.3.4
    My application is in ADF BC
    I am writing custom validation through managed bean, I want pop-up error message for this failed validation.
    My problem scenario is:
    I had some list box as "status"-when this status changes to failed then the other field namely "closed date" should become madantory and also date in closed date field can't be in future.I am able to have all this validation through managed bean and also able to use af:messages through which i am able to print error message on the top of the form, but i am not able to give pop up error message for this failed validation.
    I had gone thru jdev guide but there is nothing like what i am asking.
    it would be of great help if someone can give me some example also.
    thanks in advance.

    ADF has global setting where you can configure the way messages are shown to user:
    You can make this setting in adf-faces-config.xml
    The <client-validation> element controls how client-side converters and validators are run.
    Three values are supported:
    "INLINE": validation is shown inline in a page (the default)
    "ALERT": validation is shown in an Javascript alert
    "DISABLED": validation is only handled on the server
    IN your case, set it to 'ALERT'.

  • Error messages when submitting a validated RSS feed URL to iTS.

    Why do I keep getting error messages when submitting a validated RSS feed URL to iTS. Feed is http://streaming.integrationworks.com:3000/archive/feed2.xml
    I get variations on the follwoing message: "We had difficulty reading this feed. Bad http result code: 504"
    I validated this file at http://www.feedvalidator.org/. I am able to manually place it in iTunes (Open Stream) and download episodes. I can paste the URL in my browser and retrieve an RSS feed page.
    Any ideas?
    Rick

    You have to remember that when subscribing manually, it's only your iTunes application which is doing this - the Store is not involved at all. When submitting, the Store software checks the feed as a technical check before its assessed for content by humans; but how this is done and what sort of call is made to the server is another of Apple's dark secrets.
    You're the third with a similar situation in the last couple of days, and I've seen this arise before: though the specific message about a proxy server is unique to you. (A proxy server would act as an intermediary - anyone accessing the feed would ask the proxy for it, and the proxy would retrieve it from the actual server and pass it back, masking the original server's URL in the process. Whether this is actually what is going on is obviously something only your server technicians can say - and then there's the question of what is different about a request from the iTunes Store.)
    If all else fails you could place the feed on another server and try again - you could do this and leave the episode media files where they are, they don't have to be on the same server as the feed, as long as the server in question can handle 'byte-range requests' (which is a quite separate can of digital worms).

  • Server side validation

    Hi I am trying to validate two forms the first form allows a customer to register if it is correctly validated then it proceeds to address form as these two tables are linked by foreign key so when u create account in one need to do it at the same time for both. I tried client side JavaScript to validate the forms which works but don t prevent the accounts from being created if wrong. This method I tried to implement:
    ackage projectshowbeans;
    import java.sql.*;
    import java.util.*;
    import java.util.HashMap;
    public class customer2 {
         private String bnDbDriver = "org.gjt.mm.mysql.Driver";
         private String bnDbId = "jdbc:mysql://localhost/c99nrdb";
         private String bnDbUser = "c99nr_web";
         private String bnDbPassword = "Thank=88";
         private String custId;
         private String bnTitle="";
         private String bnFirstName="";
         private String bnLastName="";
         private String bnType_Of_Occupation="";
         private String bnemail="";
         private String bnpassword="";
         private String bnpassword2="";
         private String bnType="";
         private String bnNumber="";
         private String bnExp_Date="";
         private String bnCardholder_Name="";
         private String bnemail2="";
         private String mostRecentDeletion = "Nothing has been deleted";
         private int validate = 0;
         private String custid="";
         private int validatem = 0;
         private HashMap validationerrors = new HashMap();
         //StringTokenizer is used to check for empty spaces as in prevents user from submitting a empty form
         //countTokens count the number of empty spaces between the words if no words no token it would be empty and validate to 0
         //otherwise it would equal 1 and the message output shall appears on the screen. To be exact as long as it count the number of whitespaces this means
         //if it is more then 1 it can be then there must be text present in the text field and thus tokens can be made.
         /*public String getIsEmpty()
              String output = "nothing";
              StringTokenizer Email = new StringTokenizer(getBnEmail());
              StringTokenizer Title = new StringTokenizer(getBnTitle());
              StringTokenizer FirstName = new StringTokenizer(getBnFirstName());
              StringTokenizer LastName = new StringTokenizer(getBnLastName());
              StringTokenizer Occupation = new StringTokenizer(getBnType_Of_Occupation());
              StringTokenizer Password = new StringTokenizer(getBnpassword() );
              StringTokenizer confirmpass = new StringTokenizer(getBnpassword2());
              StringTokenizer Numbers = new StringTokenizer(getBnNumber());
              StringTokenizer Date1 = new StringTokenizer(getBnExp_Date());
              StringTokenizer Type = new StringTokenizer(getBnType() );
              StringTokenizer cardholder = new StringTokenizer(getBnCardholder_Name());
              if (Email.countTokens() < 1 || Title.countTokens() < 1 || FirstName.countTokens() < 1 || LastName.countTokens() < 1 || Occupation.countTokens() < 1 || Password.countTokens() < 1 || confirmpass.countTokens() < 1 || Numbers.countTokens() < 1 || Date1.countTokens() < 1 || Type.countTokens() < 1 || cardholder.countTokens() < 1)
                   output = "Please fill in all fields. Thank you.";
                   System.out.println("this is empty at first attempt and then second time nothing typed");
                   validatem = 0;
                   output = "To fill in your address details proceed to this page by <a href=\"../jsp/NewAddress.jsp\"> clicking here</a>";
                   validatem = 1;
              return output ;
         public boolean isValidUserData() {
                   System.out.println(bnFirstName);     
                   return (( bnFirstName !=null) && (bnFirstName.length() >0) &&
                        (bnpassword !=null) && (bnpassword.length() != 8) &&
                        (bnpassword2 !=null) && (bnpassword2.length() != 8)&&
                        (bnemail !=null) && (bnTitle !=null) &&
                        (bnLastName != null) && (bnLastName.length() >0) &&
                        (bnType !=null) && (bnNumber !=null) &&
                        (bnExp_Date !=null) && (bnCardholder_Name != null) &&
                        (bnType_Of_Occupation !=null));
         public String getFieldError(String fieldname) {
              return ((String) validationerrors.get(fieldname));
         public void addFieldError(String fieldname, String error) {
              validationerrors.put(fieldname, error);
         public boolean validateCustomer() {
              validationerrors.clear();
              boolean valid = true;
              if ((bnemail == null) ||
                   (bnemail.length() == 0)) {
                   addFieldError("frmemail", "email address is required.");
                   valid = false;
              } else {
                   if (bnemail.indexOf("@")== -1) {
                        addFieldError("email", "please supply a valid address");
                        valid =false;
              if ((bnpassword == null) ||
                   (bnpassword.length() != 8)) {
                   addFieldError("frmpassword", "Password is required.");
              return valid;
    if(form1.frmpassword.value.length != 8 )
                        //alert(form1.frmpassword);
                        alert("Password must be eightt characters long");
                        form1.frmpassword.focus();
                        form1.frmpassword.select();
                        return(false);
                   else
                        if(form1.frmpassword2.value != form1.frmpassword.value)
                             alert("The confirmation password does not match the original password");
                             form1.frmpassword2.focus();
                             form1.frmpassword2.select();
                             return(false);
              </SCRIPT>
              <% if (request.getParameter("SUBMITTED") != null) {
                   try {
                        if (newcust.validateCustomer()) {
                             newcust.createcustomer();
                             response.sendRedirect("NewSuccess1.jsp");
                   } catch (Exception e){
                        //System.out.println("customer2.JSP:" + e);
                        newcust.addFieldError("frmemail", "email already in use");
              if (newcust.getBnEmail() == null) {
                   newcust.setBnEmail(" ");
              if (newcust.getBnpassword() == null) {
                   newcust.setBnpassword("");
              %>
              <TITLE>
                   Create New Customer Account
              </TITLE>
         </HEAD>
         <BODY>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu 2.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                             <Form method="post" action="NewSuccess1.jsp" id="form1" name="form1" return onsubmit="validation()"> <%--post prevents the variable being passed in the url--%>
                                  <input type="Hidden" name="SUBMITTED" Value="T">
                                  <table border ="1">
                                       <tr>
                                            <%--/*if (newcust.getFieldError("frmemail") != null) {%>
                                            <%//newcust.getFieldError("frmemail")%></font><br></td>*\--%>
    Java methods aree fine but when I try to access these ion the JSP page it fucks up I can t see how to resolve the issues can anyone help ?

    Hi the code that I showed you was on two separate pages one in the java file where I have tried numerous methods at server side validation
    e.g.
    private int validate = 0;
    //StringTokenizer is used to check for empty spaces as in prevents user from submitting a empty form
         //countTokens count the number of empty spaces between the words if no words no token it would be empty and validate to 0
         //otherwise it would equal 1 and the message output shall appears on the screen. To be exact as long as it count the number of whitespaces this means
         //if it is more then 1 it can be then there must be text present in the text field and thus tokens can be made.
         /*public String getIsEmpty()
              String output = "nothing";
              StringTokenizer Email = new StringTokenizer(getBnEmail());
              StringTokenizer Title = new StringTokenizer(getBnTitle());
              StringTokenizer FirstName = new StringTokenizer(getBnFirstName());
              StringTokenizer LastName = new StringTokenizer(getBnLastName());
              StringTokenizer Occupation = new StringTokenizer(getBnType_Of_Occupation());
              StringTokenizer Password = new StringTokenizer(getBnpassword() );
              StringTokenizer confirmpass = new StringTokenizer(getBnpassword2());
              StringTokenizer Numbers = new StringTokenizer(getBnNumber());
              StringTokenizer Date1 = new StringTokenizer(getBnExp_Date());
              StringTokenizer Type = new StringTokenizer(getBnType() );
              StringTokenizer cardholder = new StringTokenizer(getBnCardholder_Name());
              if (Email.countTokens() < 1 || Title.countTokens() < 1 || FirstName.countTokens() < 1 || LastName.countTokens() < 1 || Occupation.countTokens() < 1 || Password.countTokens() < 1 || confirmpass.countTokens() < 1 || Numbers.countTokens() < 1 || Date1.countTokens() < 1 || Type.countTokens() < 1 || cardholder.countTokens() < 1)
                   output = "Please fill in all fields. Thank you.";
                   System.out.println("this is empty at first attempt and then second time nothing typed");
                   validatem = 0;
                   output = "To fill in your address details proceed to this page by <a href=\"../jsp/NewAddress.jsp\"> clicking here</a>";
                   validatem = 1;
              return output ;
    This method works it counts the empty spaces and if any it does not allow the user to proceed to same page but if correct it goes to the same page but show all their answers filled using jsp:get Property and then the link above to the other form to fill in the code. However no indivdual messages can be passed to the user which is crap as the people keeps pressing he won t know what is wrong.
    The method that I am currently using is this one:
         public boolean isValidUserData() {
                   System.out.println(bnFirstName);     
                   return (( bnFirstName !=null) && (bnFirstName.length() >0) &&
                        (bnpassword !=null) && (bnpassword.length() != 8) &&
                        (bnpassword2 !=null) && (bnpassword2.length() != 8)&&
                        (bnemail !=null) && (bnTitle !=null) &&
                        (bnLastName != null) && (bnLastName.length() >0) &&
                        (bnType !=null) && (bnNumber !=null) &&
                        (bnExp_Date !=null) && (bnCardholder_Name != null) &&
                        (bnType_Of_Occupation !=null));
    again this method is held in the Java file. This works the best as it checks for empty spaces however the password verification it does not do check whether password 1 matches password 2 nor the fact that password should be 8 characters only or check whether the user is typing in an integer or not etc. I can do this in JavaScript the integer one I am not sure. I then use JSP page which is this below:
    <jsp:useBean
         id="newcust"
         scope="session"
         class="projectshowbeans.customer2"
         />
    <!--
    <jsp:useBean
         id="newaddress"
         scope="page"
         class="projectshowbeans.Address"
         />
    <jsp:setProperty
         name="newaddress"
         property="bnemail"
         param="frmemail"
         />
    -->
    <jsp:setProperty
         name="newcust"
         property="bnEmail"
         param="frmemail"
         />
    <jsp:setProperty
         name="newcust"
         property="bnFirstName"
         param="frmFirstname"
         />
    <jsp:setProperty
         name="newcust"
         property="bnLastName"
         param="frmLastname"
         />
    <jsp:setProperty
         name="newcust"
         property="bnType"
         param="frmtype"
         />
    <jsp:setProperty
         name="newcust"
         property="bnTitle"
         param="frmtitle"
         />
    <jsp:setProperty
         name="newcust"
         property="bnCardholder_Name"
         param="frmcard"
         />
    <jsp:setProperty
         name="newcust"
         property="bnExp_Date"
         param="frmDate"
         />
    <jsp:setProperty
         name="newcust"
         property="bnNumber"
         param="frmnumber"
         />
    <jsp:setProperty
         name="newcust"
         property="bnExp_Date"
         param="frmDate"
         />
    <jsp:setProperty
         name="newcust"
         property="bnpassword2"
         param="frmpassword2"
         />
    <jsp:setProperty
         name="newcust"
         property="bnpassword"
         param="frmpassword"
         />
    <jsp:setProperty
         name="newcust"
         property="bnType_Of_Occupation"
         param="frmoccupation"
         />
    <html>
         <HEAD>
              <SCRIPT language="JavaScript" type="text/javascript">
              /*function validation() {
                        if(form1.frmnumber.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the number field. Thank you");
                             form1.frmnumber.focus();
                             return(false);
                        if(form1.frmemail.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the email field. Thank you");
                             form1.frmemail.focus();
                             return(false);
                        if(form1.frmtitle.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the title field. Thank you");
                             form1.frmtitle.focus();
                             return(false);
                        if(form1.frmFirstname.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the First Name field. Thank you");
                             form1.frmFirstname.focus();
                             return(false);
                        if(form1.frmLastname.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the Last Name field. Thank you");
                             form1.frmLastname.focus();
                             return(false);
                        if(form1.frmDate.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the Exp Date field. Thank you");
                             form1.frmDate.focus();
                             return(false);
                        if(form1.frmcard.value==0)
                             //alert(form1.frmpassword);
                             alert("Please fill in the CardholderName field. Thank you");
                             form1.frmcard.focus();
                             return(false);
                        if(form1.frmpassword.value.length != 8 )
                             //alert(form1.frmpassword);
                             alert("Password must be eightt characters long");
                             form1.frmpassword.focus();
                             form1.frmpassword.select();
                             return(false);
                        else
                             if(form1.frmpassword2.value != form1.frmpassword.value)
                                  alert("The confirmation password does not match the original password");
                                  form1.frmpassword2.focus();
                                  form1.frmpassword2.select();
                                  return(false);
              </SCRIPT>
              <TITLE>
                   Create New Customer Account
              </TITLE>
         </HEAD>
         <BODY>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
              <Form method="post" action="NewSuccess.jsp"> <%--post prevents the variable being passed in the url--%>
                                  <table border="0">
                                       <tr>
                                       <td><p>Please ensure you fill in all fields below in the form. Once everything is successfully validated you will be taken to another form to fill in your address details.</p></td>
                                       </tr>
                                  <table border ="1">     
                        <tr>
                             <td>email address:</td> <td><Input Name="frmemail" Type="Text" Size="50" value='<jsp:getProperty name="newcust" property="bnEmail" />' >
    </td>
                        </tr>
                        <tr>               
                   <td>Password:</td>
                             <td><Input Name="frmpassword" Type="password" Size="50">
    </td><%--this form simply shows password and studentid type password allows it to be encoded--%>
                        </tr>
                        <tr>
                        <td>Password(Verification):</td>
                        <td><Input Name="frmpassword2" Type="password" Size="50">
    </td><%--this form simply shows password and studentid type password allows it to be encoded--%>
                   </tr>
                        <tr>
                   <td> Title:</td>
                             <td><input name="frmtitle" type="text" size="10" value='<jsp:getProperty name="newcust" property="bnTitle"/>'>
    </td>
                        </tr>
                        <tr>
                   <td>First Name:</td>
                             <td><input name="frmFirstname" type="text" size="30"value='<jsp:getProperty name="newcust" property="bnFirstName"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Surname:</td>
                             <td><input name="frmLastname" type="text" size="30" value='<jsp:getProperty name="newcust" property="bnLastName"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Occupation:</td>
                             <td><select name="frmoccupation">
                                       <option> student </option>
                                       <option> doctor </option>
                                       <option> businesman/woman </option>
                                       <option> teacher </option>
                                       <option> other </option>
                                  <jsp:getProperty name="newcust" property="bnType_Of_Occupation"/>>
                                  </select>
                             </td>
                        </tr>
                        <tr>
                             <td>Number:</td>
                             <td><input name="frmnumber" type="text" size="20" value='<jsp:getProperty name="newcust" property="bnNumber"/>'>
    </td>
                        </tr>
                        <tr>
                             <td>Type:</td>
                             <td><select name="frmtype" '<jsp:getProperty name="newcust" property="bnType"/>'>
                                  <option> Mastercard</option>
                                  <option> Visa </option>
                                  <option> Switch </option>     
                                  </select>
                             </td>
                        </tr>
                        <tr>
                             <td>exp date(DD/MM/YY):</td>
                             <td><input name="frmDate" type="text" value='<jsp:getProperty name="newcust" property="bnExp_Date"/>'>                                   
                        </tr>
                        <tr>
                             <td>cardholder name:</td>
                             <td><input name="frmcard" type="text" size="10"value='<jsp:getProperty name="newcust" property="bnCardholder_Name"/>'>
    </td>
                        </tr>
                   <tr>
                             <td><input type="submit" value="submit"></td>
                        </tr>
              </form>
              </table>
              <%
              //newcust.createcustomer();
              //newcust.getIsEmpty();
              %>
              <%--
              newaddress.createaddress();
              newaddress.createcustomerID();
              --%>          
         </Body>
    </html>
    I have cancelled the JavaScript as it does not work well with it the NewSucess page is the process page and states if all validation rules are correct carried out on the form by the boolean isValidUserData method then it will create the record in the customer table and provide a link to the following Address form. Otherwise if is false it goes to error page the code is below:
    <html>
         <HEAD>
              <TITLE>
                   Cuystomer Successfully Added
              </TITLE>
         </HEAD>
    <jsp:useBean
         id="newcust"
         scope="session"
         class="projectshowbeans.customer2"
         />
         <jsp:setProperty
              name="newcust"
              property="bnpassword"
              param="frmpassword"
              />
         <jsp:setProperty
              name="newcust"
              property="bnFirstName"
              param="frmFirstname"
    />
         <jsp:setProperty
              name="newcust"
              property="bnpassword2"
              param="frmpassword2"
              />
         <jsp:setProperty
              name="newcust"
              property="bnType_Of_Occupation"
              param="frmoccupation"
              />
         <jsp:setProperty
              name="newcust"
              property="bnNumber"
              param="frmnumber"
              />
         <jsp:setProperty
              name="newcust"
              property="bnExp_Date"
              param="frmDate"
              />
         <jsp:setProperty
              name="newcust"
              property="bnEmail"
              param="frmemail"
              />
         <jsp:setProperty
              name="newcust"
              property="bnFirstName"
              param="frmFirstname"
              />
         <jsp:setProperty
              name="newcust"
              property="bnLastName"
              param="frmLastname"
              />
         <jsp:setProperty
              name="newcust"
              property="bnType"
              param="frmtype"
              />
         <jsp:setProperty
              name="newcust"
              property="bnTitle"
              param="frmtitle"
              />
         <jsp:setProperty
              name="newcust"
              property="bnCardholder_Name"
              param="frmcard"
              />
    <BODY bgcolor="#BDC6DE">
              <%
              if (newcust.isValidUserData()) {
                   newcust.createcustomer();
              %>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                        </table>
         <H1> Validating user data </H1>
         <H2> user data validated </h2>
              <p> To fill in your address details proceed to this page by clicking here</p>
              <% } else {
              %>
              <table border ="0" width="100%" bgcolor="#BDC6DE">     
                   <tr>
                        <td>
                             <jsp:include
                                  page="main menu3.jsp"
                                  flush="true"
                                  />
                             <td>
                             </tr>
                        </table>
                   <H1> Validating user data </H1>
              <h2> validation failed you have some missing fields</h2>
              <%}%>
    </Body>
    </html>
    Hopefully you have followed that. Ultimately if I can have it working in JavaScript that would excellent it does all form validation the previous code use saw the first JSP page however to then say only create record once I need to say function validation is validated = true then proceed to the next form else false appear with the message to the user and allow them to re - enter their answer I can t do that. I tried just putting the      
    newcust.createcustomer(); and the link to address on a separate page with String email request.getParameter("frmemail") for all of them but did not work. Hopefully you understand my dilemna more clearly now
    and can help me uinforunately I ain t got too long I need to have it done by tuesday its my final year project for my degree. Any help much appreciated.

  • Server side validation problem

    Hi,
    Trying to do server-side validation for a table with usernames, where if the username exists, a simple message in red is posted back to the JSP.
    I was only able to get it to work if 1 (out of about 23) usernames was entered, because for some reason my results set, while being looped, was only returning 1 value all the time.
    My servlet looks like the following, with a few if conditions to trigger the RequestDispatcher object appropriately.
    public class ChangeControlUserAcctServletSPCall extends HttpServlet{
    private Connection connection;
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response)
                          throws IOException, ServletException{
    //req parameters from html/jsp form(Admin) page
    String username = request.getParameter("user_name_fld");
    String userpwd = request.getParameter("user_pwd_fld");
    String userrole = request.getParameter("user_role_fld");
    String useremail1 = request.getParameter("usr_email1");
    String useremail2 = request.getParameter("usr_email_suf");
    String userfinemail = useremail1+useremail2;
    String userbranch = request.getParameter("user_branch");
    String errmsg = "";
    String usernameret = "";
    //boolean userexists = false;
    HttpSession session = request.getSession();
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
       String dbURL = "jdbc:oracle:thin:@xxx.xxx.xx.xxx:1521:SID";
       String usernm = "aaa_dfg";
       String pwd = "********";
       connection = DriverManager.getConnection(dbURL, usernm, pwd);
                   Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   String prepquer = "select user_name from users";
                   PreparedStatement preps = connection.prepareStatement(prepquer);
                   ResultSet rst = preps.executeQuery();
                while (rst.next()) {
                 usernameret = rst.getString(1);
    if (usernameret.equals(username)){
            errmsg = "<font face='arial' size='2'>This username</font>, <font face='arial' color='red' size='2'><b> " +username+ " </b>,already exists. <br>"
                      + "Please enter another username.</font>";
            session.setAttribute("message", errmsg);
         RequestDispatcher dispatcher =
              getServletContext().getRequestDispatcher(
                   "/chngctrl/admin/change_ctrl_users.jsp");
            dispatcher.forward(request, response);
    else {
    CallableStatement cstmt = connection.prepareCall("{call cctrl_passwords_proc (?,?,?,?,?)}");
       cstmt.setString(1,username);
       cstmt.setString(2,userpwd);
       cstmt.setString(3,userfinemail);
       cstmt.setString(4,userrole);
       cstmt.setString(5,userbranch);
       cstmt.executeUpdate();
       System.out.println("SQL Stmt: " +cstmt);
                   rst.close();
                   stmt.close();
      if (username==null || username.equals("") || username.equals(" ")) {
         RequestDispatcher dispatcher =
              getServletContext().getRequestDispatcher(
                   "/chngctrl/admin/change_ctrl_users.jsp");
            dispatcher.forward(request, response);
            System.out.print("first request");
          else if (usernameret.equals(username)){
         errmsg = "This username, <font face='arial' color='red'>" +username+ "already exists. <br>"
           + "Please enter another email address.</font>";
            session.setAttribute("message", errmsg);
                    RequestDispatcher dispatcher =
                         getServletContext().getRequestDispatcher(
                              "/chngctrl/admin/change_ctrl_users.jsp");
                       dispatcher.forward(request, response);
            System.out.print("first request");
        else {
       RequestDispatcher dispatcher =
              getServletContext().getRequestDispatcher(
                   "/chngctrl/insert_users_success.jsp");
            dispatcher.forward(request, response);
            System.out.print("2nd request");
        public void doPost(HttpServletRequest request,
                           HttpServletResponse response)
                           throws ServletException, IOException {
         System.out.println("working here doPost method on Approval Servlet?");
            doGet(request, response);
    // final curly brace
    }Any feedback would be appreciated if you see something glaringly wrong, or just wrong in general! : )
    Thanks!

    Had one (a WHERE clause) in there and later took it
    out, but I don't think I'd originally applied it
    correctly any way.Apparently not.
    >
    Are you saying just run a WHERE clause equivalent to
    the username request parameter, then make some
    boolean value that if it matches (and the boolean's
    true), reject it with some message? I'll admit that I didn't read your code (too much trouble), but it sounds like you're trying to validate a given user who has supplied a username (and maybe a password?) that's unique to them. You query your database for that username. If it doesn't appear, they can't come in. If the username appears but the password is wrong, they can't come in. If both match, you give them a credential or token of some kind that tells all your other pages "This person is all right."
    Therefore skipping over how ever many or few users are in there?You only want to transfer the one you need over the wire, and you only want to check the one that has a chance of matching the password. Why bother with a million other users if the username is unique?
    This has very few, but yeah, that's a better idea to
    trim that down were this (I don't see it doing so,
    but who knows, right?) ever to grow.I'd get it deployed and working before I'd worry about it growing.
    %

  • I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.

    I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.  Thanks

    sandyzotz wrote:
    Other wise, I probably best return for a refund and get a Samsung.
    Unlikely.  Based on the complete lack of detail of the issue provided it is entirely possible the same issue would occur.
    Unless and until the user provides some actual details of the problem, there is nothing the indicate that the issue is with the iPhone.

  • Error getting the server-side naming service functionality

    Hi all,
    we are currently setting up the CTS+ activity based transport scenario. Everything seems to be working fine, however, we have to import each transport twice...
    Before I go into detail in the error we get I will first describe our landscape. All the configuration we did was done in debate with SAP.
    We use the SAP Solution manager (ehp1 SP 4) as the CTS+ server as recommended by SAP and have an NWDI system of which we only use the components DTR and CBS (since CMS is not used anymore in the activity based transport). We have defined three logical ports/RFCs. CTSCONFIG points to the NWDI system. CTSDEPLOY is running on the java stack of the solution manager and is only used for portal content (=epa) transports. CTSDEPLOY_DI is pointing to the NWDI system and is used for all NWDI (=dip) changes. The NWDI is running ehp1 SP3.
    In STMS I defined all the non-abap systems (and configured them to use CTSDEPLOY_DI) and created the following transport route:
    upload system (IMP) -> DEV -> ACC -> QAS -> PRD
    I first attached the used dependencies in a transport request (SAP_BUILDT, EP_BUILDT, etc) these imported just fine. Then I did the SCA files which contain our custom code. I extracted these from the assemble step on our current NWDI system which will be removed as soon as we switch to the new CTS+ environment.
    When we import the transport into the runtime systems then we see the DTR and CBS be filled sucesfully for this specific system. However, the transport request itself always fails with errorcode 12 and the error is:
    Error during export service registration: Error getting the server-side naming service functionality during getInitialContext opera
    tion. com.sap.engine.services.jndi.persistent.exceptions.NamingException: Error getting the server-side naming service functionality during getInitialContext operation.
    Error in execution of Web services CTSDEPLOY_DI , exception is cx_cts_file_import_failed
    File import canceled
    When we then reimport the same transport it will go the second time fine. This is no problem during the setup but will not be workable when we go live ofcourse. Is there anyone who had this issue before as well and have a solution for it?
    Kind Regards,
    Nico van der Linden...

    Hello Nico,
    I would need the java trace files to get more info on this issue, but you can start troubleshooting this error with these notes:
    #1172252: CTS+, 'attach file': Troubleshooting Guide;
    #1003674: Enhancement for non-ABAP systems in CTS;
    #1155884: CTS+, configuration 'close coupling': Troubleshooting guide;
    Pay special attention to parameter  NON_ABAP_WBO_CLIENT, whether it's correctly set on your CTS+ system(s).
    Note #1003674 is a must for any CTS+ systems to work properly, as well as having an updated version of the transport programs (tp and R3trans).
    Lastly, note #1155884 goes through some JCoException exceptions that commonly take place during CTS+ transports. But again, you need to check the underlying trace files to find the root cause of your issue.
    I hope this information helps.
    Best regards,
    Tomas Black

  • 'Cannot obtain error message from server' when trying to use ODBC

    Post Author: Grant C
    CA Forum: Data Connectivity and SQL
    Hi, I'm developing some reports using Crystal XI on my local PC, using an Oracle 10i back end on a separate server.  The SQL for the report is in a method in an oracle package.
    When I set the datasource location, selecting 'Oracle Server' then entering the details works fine, and the report runs.  However, when I try to use an ODBC connection I get the following error:
    Database Connection Error: 'Cannot obtain error message from server.'
    The ODBC link is set up as a System DSN, which works fine when I test it.  I think I need to use ODBC as some of the reports (which I inherited) seem to fail when run on the Crystal Server, and it seeme to be the ones set up with ODBC which work.
    Any thoughts?  Thanks.

    Hi Mars-
    It sounds like your NI-DAQ installation may have become corrupted. I would suggest uninstalling and reinstalling the DAQmx 7.4 driver to correct this problem and ensure that you're up to date. This download is available here: NI-DAQ 7.4
    If the problem persists you may want to uninstall and reinstall LabVIEW and then NI-DAQ in that order. The error message will usually give an indication as to which VI the error occurred in. Please let us know which VI is failing if you're unable to avoid the error with these suggestions.
    Have a good day-
    Tom W
    National Instruments

  • Unity Connection 10.5.1: I upgraded the Unity Connection Server from V 9.1. After that, cannot logn to ELM an error message " The server encountered an internal error that prevented it from fulfilling this request." appears

    Unity Connection 10.5.1: I upgraded the Unity Connection Server from V 9.1. After that, cannot logn to ELM an error message " The server encountered an internal error that prevented it from fulfilling this request." appears. The error further displays "
    type: Exception report
    message:
    description: The server encountered an internal error that prevented it from fulfilling this request.
    exception:
    ServletException Could not initialize class com.cisco.vos.platform.api.config.UpgradeStatus
    root cause:
    NoClassDefFoundError Could not initialize class com.cisco.vos.platform.api.config.UpgradeStatus
    note: The full stack trace of the root cause is available in the logs.
    Has anyone experience this issue? Any solutions? Your assistance is greatly appreciated!

    Hi Mesut,
    you can refer the link for migration
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/connection/10x/upgrade/guide/10xcucrugx/10xcucrug010.html
    regds,
    aman

  • My iCal won't go online and returns the error message: The server responded with "500" to operation CalDAVAccountRefreshQueueableOperation.

    My iCal won't go online and returns the error message: "The server responded with “500” to operation CalDAVAccountRefreshQueueableOperation."

    OK Now I can answer my own question.  The incomprehensible (inexcusably geeky) error message is actually Apple language for saying simply: "The iCloud servers are down again.  Please wait until we've fixed them."  I found this out by talking to Apple support.  It took about 12 hours for the iCloud server synching calendars to come back online.  When they did, my calendar reloaded, and everything was fine.

  • Unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    unable to "share" a photo. Get error message stating server is not responding. But all normal email functions work just fine.????????

    Just a quick bump... Anyone got any thoughts on this?

  • Face time no longer works for me. Lost my contacts even! Keep trying to change PWD and keep getting same error message: The server encountered an error processing registration. Please try again later. Can you advise? Thanks!

    Face time no longer works for me. Lost my contacts even! Keep trying to change PWD and keep getting same error message: The server encountered an error processing registration. Please try again later. Can you advise? Thanks!

    Face time no longer works for me. Lost my contacts even! Keep trying to change PWD and keep getting same error message: The server encountered an error processing registration. Please try again later. Can you advise? Thanks!

  • How to send Subtopic Message From Server-Side to Client ?

    I’m new at flex and i have a new question about Flex
    Message Service.
    How to send messages from Server-Side Java Code with
    Subtopic?
    For example.
    I customed a Flex Message Adapter in Tomcat Server , with
    this Adapter , i can send message to Client with following code .
    ---------------------Send message to Client------------
    MessageBroker msgBroker =
    MessageBroker.getMessageBroker(null);
    String clientID = UUIDUtils.createUUID(false);
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination("CustomMsgServiceDes");
    msg.setClientId(clientID);
    msg.setMessageId(UUIDUtils.createUUID(false));
    msg.setTimestamp(System.currentTimeMillis());
    msg.setBody(clientID + "this is my message from server! \n");
    msgBroker.routeMessageToService(msg, null);
    ---------------------Send message to Client------------
    But i want send a message that have Subtopic to the Client ,
    How to do ?
    Thank you for reply.

    There's a white paper that talks about this subject -
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=8f1eb6ea

Maybe you are looking for

  • Can't open RAW files from Canon 70d in Elements 11.  Is there an update?

    I have a new Canon  EOS 70D but my Elements 11 won't open RAW files. Is there an update i can download?

  • Dynamic JavaScript error?

    I am currently trying to populate a menu/list from a database using a recordset. I have done this many times however now when I click the dynamic button in the properties panel it get this error: "While executing findDynamicSources in Session.htm, a

  • Mac os 10.5.8 upgrade to snow leopard

    i have os 10.5.8 on my imac - just received the mac box set with os x snow leopard, ilife 11, and iwork 11 - do i need to do any other downloads or anything else before i put the disc in to upgrade i need snow leopard for a software i want to downloa

  • Some windows off screen and inaccessible when 2nd screen disconnected

    If I am using an application totally on a second screen, I often disconnect the screen without closing the application and/or window. I haven't yet pinned down the cause, but it may be if the system is put to sleep, the second screen disconnected, an

  • Attempt to read XMLType from Oracle 11G

    Hi. I try to read XMLtype field from Oracle11G next way: import java.io.InputStream; import oracle.sql.*; import oracle.jdbc.*; import oracle.xdb.XMLType; import java.sql.Connection; import java.sql.DriverManager; import oracle.jdbc.driver.OraclePrep