Server side form validation

Hi exprets.
How can i validate a form with jsp without the involvement of any client side script so that when a field is not filled properly it should display the form again with the data filled previously and a message against the incorrect field.
I have a generic asp code that can be used with any form. There are some complexities in it for me in converting it to jsp because I am very net to it.
Here is the asp code:
validateForm.asp
<%
const errorSymbol = "<font color=red><b>*</b></font>"
dim dicError
set dicError = server.createObject("scripting.dictionary")
sub checkForm
dim fieldName, fieldValue, pFieldValue
for each field in request.form
if left(field, 1) = "_" then
' is validation field , obtain field name
fieldName = right( field, len( field ) - 1)
' obtain field value
fieldValue = request.form(field)
select case lCase(fieldValue)
case "required"
if trim(request.form(fieldName)) = "" then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " is required</font>"
end if
case "date"
if Not isDate(request.form(fieldName)) then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & "must be a date</font>"
end if
case "number"
pFieldValue=request.form(fieldName)
if Not isNumeric(pFieldValue) or (instr(pFieldValue,",")<>0) then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " must be a number</font>"
end if
case "intnumber"
pFieldValue=request.form(fieldName)
if Not isNumeric(pFieldValue) or (instr(pFieldValue,",")<>0) or (instr(pFieldValue,".")<>0) then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " must be an integer</font>"
end if
case "email"
if instr(request.form(fieldName),"@")=0 or instr(request.form(fieldName),".")=0 then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " must be an email</font>"
end if
case "phone"
pFieldValue=request.form(fieldName)
pFieldValue=replace(pFieldValue," ","")
pFieldValue=replace(pFieldValue,"-","")
pFieldValue=replace(pFieldValue,"(","")
pFieldValue=replace(pFieldValue,")","")
pFieldValue=replace(pFieldValue,"+","")
if Not isNumeric(pFieldValue) then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " must be a phone number</font>"
end if
case "login"
Dim i, ch, login
login = false
pFieldValue = request.Form(fieldName)
if len(pFieldValue) < 5 then
     login = false
else
          for i=1 to len(pFieldValue)     
          ch = Mid(pFieldValue, i, 1)
               if i=1 then
                    if(((ch >= "A") and (ch <= "Z")) or((ch >= "a") and (ch <= "z"))) then
                         login = true
                    else
                         login = false
                         exit for
                    end if
               end if
               if (i > 1) then
                    if(((ch >= "A")and(ch <= "Z"))or((ch >= "a")and(ch <= "z"))or((ch >= "0")and(ch <= "9"))or(ch = "_")) then
                         login = true
                    else
                         login = false
                         exit for
                    end if
               end if
          next
     end if
     if login = false then
dicError(fieldName) = "<font size=-2 face=Verdana, Arial, Helvetica, sans-serif color=blue>" & fieldName & " must start with an alphabet, having numbers (0-9), alphabets, the underscore and no spaces</font>"
end if
end select
end if
next
end sub
sub validateForm2(byVal successPage)
if request.ServerVariables("CONTENT_LENGTH") > 0 then
checkForm
' if no errors, then successPage
if dicError.Count = 0 then
' build success querystring
tString=Cstr("")
for each field in request.form
if left(field, 1) <> "_" then
fieldName = field
fieldValue = request.form(fieldName)
tString=tString &fieldName& "=" &Server.UrlEncode(fieldValue)& "&"
end if
next
Dim PageRed
PageRed= successPage&"?"& tString
response.Redirect(PageRed)
end if
end if
end sub
sub validateError
dim countRow
countRow=cInt(0)
for each field in dicError
if countRow=0 then
response.write "<br>"
end if
response.write "<br> - " & dicError(field)
countRow=countRow+1
next
if countRow>0 then
response.write "<br>"
end if
end sub
sub validate( byVal fieldName, byVal validType )
%> <input name="_<%=fieldName%>" type="hidden" value="<%=validType%>"> <%
if dicError.Exists(fieldName) then
response.write errorSymbol
end if
end sub
sub textbox(byVal fieldName , byVal fieldValue, byVal fieldSize, byVal fieldType, byVal fieldTitle, byVal maxLength, byVal action)
dim lastValue
lastValue = request.form(fieldName)
select case fieldType
case "textbox"
%>
<input name="<%=fieldName%>" size="<%=fieldSize%>" value="<%
if trim(fieldValue)<>"" then
response.write fieldValue
else
response.write Server.HTMLEncode(lastValue)
end if%>" style="BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid;"
title="<%=fieldTitle%>" maxlength="<%=maxLength%>" <%=action%>>
<%
case "hidden"
%>
<input type="hidden" name="<%=fieldName%>" size="<%=fieldSize%>" value="<%
if trim(fieldValue)<>"" then
response.write fieldValue
else
response.write Server.HTMLEncode(lastValue)
end if%>">
<%
case "password"
%><input name="<%=fieldName%>" type="password" size="<%=fieldSize%>" value="<%
if trim(fieldValue)<>"" then
response.write fieldValue
else
response.write server.HTMLEncode(lastValue)
end if%>" style="BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid;"
title="<%=fieldTitle%>" maxlength="<%=maxLength%>">
<%
case "textarea"
%>
<textarea name="<%=fieldName%>" rows="3" cols="<%=fieldSize%>" style="BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid;"
title="<%=fieldTitle%>" <%=action%>><%
if trim(fieldValue)<>"" then
response.write fieldValue
else
response.write Server.HTMLEncode(trim(lastValue))
end if
%></textarea>
<%
end select
end sub %>
End of validateform.asp
and I use it like this:
<!--#include file="includes/validateForm.asp" -->
<%
     on error resume next
%>
<body leftmargin="0" rightmargin="0" topmargin="0">
<%
     validateForm "addcustomer.asp"
%>
     <form action="" method="post" name="form1" >
<%validateError%>
Customer Name
<%textbox "Name", pName, 30, "textbox", "Customer Name", 50, ""%>
<%validate "Name", "required"%>
the last two scriptlets create a Name field which is required. If user does not fill it an error message appears against it.
Can someone help me please.
Sajid

Wow... some ASP code... its strange to see ASP these days as its been ages since i have coded in ASP.
Well to answer your question, there are couple of options to overcome this issue.
1) Make use of Struts Framework. It automatically takes care for the error handling(ok not automatically), but error handling of the type you are looking for is built into it and one needs to modify according to his/her own application.
2) The other option will be to submit the data to the servlet. Populate the data into the respective fields of a Bean and put the bean into session/request as per ur requirements. On the JSP page, check if there is some data in the bean. If yes, then populate the values of HTML controls from the BEAN and the one that is empty/has custom error that you might enter in servlet can be displayed as an error message to the user.
Hopefully this works for you. Give it a shot and its correctly said, that "necessity is the mother of invention"

Similar Messages

  • PLEASE help with server-side form validation using PHP!!!

    I feel like im going round and round in circles with this, after looking into all sorts of server-side advice i've come to the conclusion that i want to validate my form using server-side validation with PHP.
    So my form has several drop down menu's and  textareas  (not all of them need validation). For the part of my form i would like to validate, all i want is the drop downs to have to be changed/selected. So just a simple message like "You must select an option" if customers haven't done so. For the textareas, they just need to be filled out, so a message like "Information required" to come up if customers haven't done so.
    I believe i need to create a PHP page say for example 'error.php' place  the validation code in there and set this part of the the form to -
    <form name="product"form action="error.php" method="post" class="product_form">
    BUT im getting really confused with creating the code for the error.php. Please please can anyone help me with this!!!???
    Here are the drop down menu's i need validation on, error message being "You must select an option",
    "figurine"
    "engraving"
    "font"
    and here are the textareas that need validating, error message "Information required",
    "test"
    "Name"
    "house"
    "line_1"
    "line_2"
    "county"
    "postcode"
    "tel"
    www.milesmemorials.com/product-GK1.html
    I'd really appreciate any help!!!

    Ness_quick wrote:
    Great thats good enough for me. In that case, would you please be able to help me create the javascript for the above validation?? If you could just help me create it for this page i can amend it for all the other pages. I'd really really appreciate it!!!
    Can you follow the below example?? Obviously AFTER validation has been successful you need to collect the information from the form and send it to the recipient email address...that's where you can use php. I'll check back tomorrow and see how you are doing.
    <!DOCTYPE HTML>
    <html><head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Form validation</title>
    <!-- VALIDATE ORDER FORM  -->
    <script type="text/javascript">
    <!--
    function RequiredFormFields() {
        // inform customer to provide figurine choice
    var figurine = document.forms.product.figurine.value;
    if (figurine == "-- Select figurine --")
    alert("Please provide figurine choice");
    return false;
    // inform customer to provide engraving choice
    var engraving = document.forms.product.engraving.value;
    if (engraving == "-- Select engraving --")
    alert("Please provide engraving choice");
    return false;
    // inform customer to provide font choice
        var font = document.forms.product.font.value;
    if (font == "-- Select style --")
    alert("Please select font style");
    return false;
    // inform customer to provide their name
    var Name = document.forms.product.Name.value;
    if (Name == null || Name == "")
    alert("Please provide your name");
    return false;
    // inform customer to provide their house number/name
    var house = document.forms.product.house.value;
    if (house == null || house == "")
    alert("Please provide your house number/name");
    return false;
    } // end function
    -->
    </script>
    </head>
    <body>
    <form name="product" form action="processForm.php" method="post" class="product_form" onsubmit="return RequiredFormFields()">
    <p class="product_form_options">Choice of Figurine<br>
    <select name="figurine" class="productButton" id="figurine" onChange="Recalculate()">
    <option selected>-- Select figurine --</option>
    <option value="7031">Tropical Green Granite with bronze sacred heart figurine as pictured(&pound;7031)</option>
    <option value="5216">Tropical Green Granite with bronze effect sacred heart figurine (&pound;5216)</option>
    <option value="5216">Tropical Green Granite with reconstituded figurine MF122(&pound;5216)</option>
    </select>
    </p>
    <p class="product_form_options">Engraved Lettering<br>
    <select name="engraving" class="productButton" id="engraving" onChange="Recalculate()">
            <option selected>-- Select engraving --</option>
            <option value="2.30">Sandblast and enamel painted (&pound;2.30/letter)</option>
            <option value="2.80">Sandblast and guilded (&pound;2.80/letter)</option>
            <option value="2.20">Maintenance free (&pound;2.20/letter)</option>
            <option value="3.73">Traditionally hand cut and enamel painted (&pound;3.73/letter)</option>
            <option value="3.98">Traditionally hand cut and gilded (&pound;3.98/letter)</option>
            <option value="4.34">Raised lead and enamel painted (&pound;4.34/letter)</option>
            <option value="4.59">Raised lead and gilded (&pound;4.59/letter)</option>
          </select>
    </p>
    <p class="product_form_options">Letter/Font Style<br>    
          <select name="font" class="productButton" id="font" >
               <option selected>-- Select style --</option>
               <option value="Maintenance free">Maintenance free </option>
               <option value="White painted block">White painted block</option>
               <option value="White painted roman">White painted roman</option>
               <option value="White painted Script">White painted Script</option>
               <option value="White painted Celtic">White painted Celtic</option>
               <option value="White painted Nova">White painted Nova</option>
               <option value="Sliver painted block">Sliver painted block</option>
               <option value="Sliver painted roman">Sliver painted roman</option>
               <option value="Sliver painted Script">Sliver painted Script</option>
               <option value="Sliver painted Celtic">Sliver painted Celtic</option>
               <option value="Sliver painted Nova">Sliver painted Nova</option>
               <option value="Gold leaf painted block">Gold leaf painted block</option>
               <option value="Gold leaf painted roman">Gold leaf painted roman</option>
               <option value="Gold leaf painted Script">Gold leaf painted Script</option>
               <option value="Gold leaf painted Celtic">Gold leaf painted Celtic</option>
               <option value="Gold leaf painted Nova">Gold leaf painted Nova</option>
               <option value="Gold leaf painted Old English">Gold leaf painted Old English</option>
             </select>
             </p>
             <p>
    <p>Name<br>
    <input name="Name" type="text" id="Name" value="">
    </p>
    <p>House name or number:<br>
    <input name="house" type="text" id="house" size="67">
    </p>
    <p>
    <input name="submit" type="submit" class="place_order" id="submit" value="Place order">
    </p>  
    </form>
    </body>
    </html>

  • How to make the server slide form validation using JSP?

    anyone knows how to do server-side form validation??
    Thanks in advanced

    try this way
         //create a validation java class in that class u create separate methods for validating
         for example if u want to validate that a particular text box should not be empty
         then u can try this way
         say like this
         class ServerValidation()
         boolean message=false;
         public static boolean isTextBoxEmpty(String value)
         if(value.length<1)
         System.out.println("Text box is empty");
         message=false
         else
         message=true
         return message
    now say u r having a html page in which there is a text box on submiting u call say validate.jsp
    in this jsp u write this way
    <%
    String message=request.getParameter("name of ur text box");
    boolean b=ServerValidation.isTextBoxEmpty(message)
    if(b)
    //valid is true do ur other activity
    else
    String messageToUser="Please Enter Some value"
    u can now display this message on jsp and create a back button
    %>
    hope its clear

  • UIX - unable to turn off client and server side field validation

    Hello,
    I've scoured the forums for info on how to turn off client / server side field validation, for the very common case of a Cancel button. Here's the use case:
    User enters a page displaying records of some kind that can be edited, or an option to create a new one. User clicks create, is taken to a new data entry form. Before entering any data, the user decides he isn't interested, and clicks the cancel button.
    The problem I'm having is that I'm getting messages that required fields have no values. I have found several references on this forum that setting the submitButton attribute unvalidated="true" will turn off client side validation. Here's what my submitButton looks like:
    <submitButton text="Cancel" event="success" unvalidated="true"/>
    But I am still getting errors, such as:
    JBO-27014: Attribute ListName in DealerListAppModule.WebDlrListsView1 is required
    Now I have also seen references in the forums to turning off server side validation by overriding the validatModelUpdates method in the DataAction. I have done this too. No luck.
    Any ideas why this isn't working? I have seen other posts in the forums stating that there were improvements in JDev 10.1.2 that caused a create but not insert, where you could just navigate away from the page you were on, without having to worry about rolling back the create of a new record. I am also not seeing this behavior either. I am using 10.1.2, completely updated, but when I execute a create, if I navigate back from the create page to the original one without saving (i had to fool with this to get it to work because of the validation problems above), I am still seeing the blank, created record in my rowset. I originally created my project in 9.0.5.2, but am now using 10.1.2, and having migrated the project.
    So what's the deal? What's the definitive way to turn off both client side and server side validation, and what's the status of this create but not insert functionality?
    Brad

    Haven't worked with this but possibly this method of "deactivation" is not valid in 11gR2? Have you cross checked that with Oracle support?

  • Client-side form validation fails

    Hi guys,
    Below is a very simple form with some client side validation.
    on submission it takes me to the results page with out popping an
    error. I checked it in both IE and Firefox. I checked the source
    after displaying the page and there are javascript elements built.
    I am testing this on my local box, with coldfusion mx 7 on
    apache.
    Is there anything special I have to do with the server
    settings, or browser settings or there something else.
    Thanks,
    Frank
    <cfform action="save.cfm">
    <p>
    <cfinput type="text" name="first_name" required="yes"
    message="enter your first name" validateat="onsubmit">
    : First Name<br />
    <cfinput type="text" name="last_name" required="yes"
    message="enter your last name" validateat="onsubmit">
    : Last Name<br />
    <br />
    Do you love me?<br /><br />
    <cfinput type="radio" name="love" value="yes">
    Yes<br />
    <cfinput type="radio" name="love" value="no">
    No<br />
    <cfinput type="radio" name="love" value="Maybe">
    Maybe<br />
    <br />
    How should we contact you?<br /><br />
    <cfinput type="checkbox" name="contact" value="email">
    Email?<br />
    <cfinput type="checkbox" name="contact" value="paper
    airplane">
    Paper Airplane?<br />
    <cfinput type="checkbox" name="contact" value="can
    phone">
    Can Phone?<br />
    <br />
    <cfquery name="temp" datasource="hrp">
    SELECT distinct department.department_name
    FROM department
    </cfquery>
    What department do you work for?<br /><br />
    <cfselect name="dept" size="1" query="temp"
    value="department_name" display="department_name">
    </cfselect>
    <br /><br />
    <cfinput type="submit" name="submit" value="submit">
    </p>
    </cfform>

    Odd, indeed. The validation Javascript works on my PC,
    showing an alert. I only replaced your query with mine. There might
    be something wrong with your installation of the Coldfusion system
    folder, /CFIDE/scripts/.

  • Why is HTML showing in the form validation message?

    Here is what is showing when I use server side form validation.
    <ul><li>You must select a location </li></ul> Go <a href="javascript:history.back()">back</a> and correct the problem.
    Obviously, the HTML tags are not supposed to be shown.  What's going on here?  I just upgraded to CF9 on Linux and this started happening.  Any ideas?

    It's a standard CF server-side form validation and looks like this on the form:
    <input type="hidden" name="somefield_required" value="some field is a required field">
    When they submit the form (and didn't enter something for somefield), the automatic message comes up.  The formatting of the message is messed up on CF9.  I've been using this type of server-side validation for years (probably since CF5) and have never seen this problem before.
    Actually, this works fine on another server (CF 9,0,0,251028) but on CF 9,0,1,274733 it is having this issue.  Both are running CF Enterprise on Linux.
    Error message is supposed to look like this:
    Form entries are incomplete or invalid.
    some field is a required field
    Go back and correct the problem.
    The messed up message looks like this:
    Form entries are incomplete or invalid.
    <ul><li>some field is a required field</li></ul> Go <a href="javascript:history.back()">back</a> and correct the problem.

  • Acrobat form with server side submit, posting blank data

    Read more
    Acrobat form with server side submit, posting blank data,
    thanh xả tràn
    I have a PDF form which gets submitted to the server using a submit (server-side) button. The data is then received in XML format by a ColdFusion component which does some validation and stores it into the database.
    This PDF form is usually filled in by our clients using Adobe Reader 8 or below. While most of the times(and I mean like 96-97% of the times) everything goes well, at times we receive blank data into our database!! This renders couple of other features in our application useless as they try to parse an XML which does not exist.
    I do believe that this is not a problem at the ColdFusion side because all it does is trim(ToString(toBinary(GetHttpRequestData().content))).
    Does anyone has a clue as to why the data will be lost upon form submission?? I have done a lot of googling around it but in vain!

    There is an outside chance someone is just playing with you and submitting a blank form. Not uncommon if someone is not too familiar with forms.

  • [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

  • 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.
    %

  • 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.

  • Disable ADF Client and Server side validation during drop down changes

    In my ADF Faces there is PanelFormLayout containing dropdown with country code value. Changing the dropdown value should change the layout to different country.
    If the data is proper in the form the Layout changes perfectly but if the data is not proper it gives client validation & the layout doesn't get changed.
    I want to disable the client/server side validation while changing the dropdown.

    Hi Just framing the Question once again -
    In my ADF Faces there is PanelFormLayout containing dropdown with country code value. Changing the dropdown value should change the layout to different country.
    If the data is proper in the form, the Layout changes perfectly but if the data is not proper it gives client validation & the layout doesn't get changed.
    I want to disable the client side validation just for that page or panelformLayout
    Issue -
    If the data is incorrect on the form, user is able to change the countrycode from the dropdown but the layout doesn't changes because client validation is stopping.
    Below is the code -
    1) Changing the drop down cause the switcher to call the code - defaultFacet="#{backingBeanScope.AddressComp.displayType}" which changes the layout.
    2) But if the data is not correct the country value is getting change with the new Country but the Layout is unable to get change. ADF start showing client validation.
    <af:panelGroupLayout id="pglA1" partialTriggers="plcol1:table1 *usCountryId caCountryId*">
         <af:switcher binding="#{backingBeanScope.AddressComp.switcherComp}" defaultFacet="*#{backingBeanScope.AddressComp.displayType}*">
              <f:facet name="US">
                   <af:panelFormLayout>
                        <af:selectOneChoice value="#{bindings.CntryCd.inputValue}" label="#{bindings.CntryCd.label}" required="#{bindings.CntryCd.hints.mandatory}"
         id="usCountryId" autoSubmit="*true*">
                        <f:selectItems value="#{bindings.CntryCd.items}" id="si14"/>
                   </af:selectOneChoice>
                   </af:panelFormLayout>
              </f:facet>
              <f:facet name="CA">
                        <af:panelFormLayout>
                        <af:selectOneChoice value="#{bindings.CntryCd.inputValue}" label="#{bindings.CntryCd.label}" required="#{bindings.CntryCd.hints.mandatory}"
         id="caCountryId" autoSubmit="true">
                        <f:selectItems value="#{bindings.CntryCd.items}" id="si14"/>
                   </af:selectOneChoice>
              </af:panelFormLayout>
              </f:facet>
         </af:switcher>
    </af:panelGroupLayout>

  • Simultaneous Client and Server Form Validation using Custom Tag Library

    I am developing a custom tag library for validator tags
    which are capable of doing client side validation (Javascript)
    and server side (Java). My problem is with the development
    of a regular expression based validator. Because of differences
    in the way Javascript and Java handle regular expressions
    i can not use the same regular expression for both types of
    validation. Is there any way to convert a valid regular
    expression from the java.util.regex format into the Javascript
    format or vice versa? My major problems are with the (or, ||)
    statements and the user of backslashes.

    If you are speaking of RE syntax flavours, they are basically the same(namely perl5 flavour). Any expression that works in JS should work in j.u.regex too.
    Though, their usage is quite different.
    So, there is no need for convertion of expressions.
    But porting the code may be not so trivial.

  • 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

  • Updating form with server-side scripts

    Hi
    For security reasons, we want to do a web service call with only server side scripts. That way we have full control over the access to the wsdl and no problems with the security.
    However, if I try to run the scripts on server-side I get no update of the data in the form... so what to do to solve that problem? Anybody with experience from that?

    To make a small update I've been messing around with various different things to be able to achieve the goal. One of the initial problems was that the Designer actually manages to create two different SOAP addresses, one of them is the correct and secure way and the other one is direct to the data source, which would be an unsecure and blocked route. That changed things a bit when I realized that.
    But still, the problem remains. If I run the script Client-Side, it works but is not an acceptable solution. If I run it Server-Side, it can't read the data and doesn't recognize the call to SOAP.connect()...
    Does anybody have any experience in webb service connection with server side scripts?

  • Calling server side procedures from forms

    Hi
    I am trying to add a server side procedure to a form. The procedure is held in a package which resides on a remote database and I have set-up database links to this database.
    When I run the form, calling the procedure, the oracle forms runtime session closes without displaying any error messages.
    I have successfully called the procedure from database triggers in different databases.
    Does anyone know whats going on?
    I am using forms 5.0 with a oracle 7.3 database
    Thanks!!
    null

    Check out the method:
    LibraryObject.invokeServerMethod(String, Serializable)
    I think this may be exactly what you're looking for.

Maybe you are looking for