Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8658077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:40:47+00:00 2026-06-12T15:40:47+00:00

Basically I have a web service connected to a database, that has an insert

  • 0

Basically I have a web service connected to a database, that has an insert method.
I’ve created a registration form in a jsp and I need to send data the user inserted in the registration.jsp form to my web service. So I used a web service client invocation as the action to the registration.jsp when clicking the submit button.

I dont know how to get the data the user entered in the form and pass it to the web client who in turn insert it in my web service database.

Here are my codes:

    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title> Registration</title>
    </head>
    <body>
        <h1> Welcome</h1>


        <form name="test" action="Wclient2.jsp" method="POST" enctype="multipart/formdata">

                   <table border="0">
                <thead>
                    <tr>
                        <th>Register Here</th>
                      <th></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>First Name:</td>
                        <td><input type="text" name="fname" value="" size="50" /></td>
                    </tr>
                    <tr>
                        <td>Last Name:</td>
                        <td><input type="text" name="lname" value="" size="50" /></td>
                    </tr>
                    <tr>
                        <td>Email:</td>
                        <td><input type="text" name="email" value="" size="50" /></td>
                    </tr>
                    <tr>
                        <td>Password:</td>
                        <td><input type="password" name="password" value="" size="50"/>      </td>
                    </tr>

                    <tr>
                        <td></td>
                        <td> <input type="submit" value="submit" name="submit" /> </td>
                    </tr>
                </tbody>
            </table>

        </form>
    </body>
</html>

And this is the code for the web client upon clicking the submit button of the

registration( action=”Wclient2.jsp” method=”POST”)

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title> Enroll</title>
    </head>
    <body>
        <h1> Welcome</h1>

        <form name="test"<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>

           <%-- start web service invocation --%><hr/>
        <%        

            try {
                mypack.Bioweb_Service service = new mypack.Bioweb_Service();
                mypack.Bioweb port = service.getBiowebPort();
                // TODO initialize WS operation arguments here

                java.lang.String fname = "";
                java.lang.String lname = "";
                java.lang.String email = "";
                java.lang.String password = "";

                // TODO process result here

                java.lang.String result = port.insert(fname, lname, email, password);
                out.println("Result = " + result);

            } catch (Exception ex) {
                // TODO handle custom exceptions here
            }
        %>
        <%-- end web service invocation --%><hr/>

    </body>
</html>

I dont know how to get the parameters for fname from the registration.jsp to put in the web client.
When I write:

java.lang.String fname = request.getParameter(“fname”);

to get the value of textfield fname into my web service, in my database a row is created but NULL is inserted instead of the values my user entered in the form.

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:40:48+00:00Added an answer on June 12, 2026 at 3:40 pm

    I dont see any issue with your client side code(html/jsp) if you use request.getParameter(“fname”) as long you provide input to FirstName. To isolate the issue, print the value of fname in your jsp

    String fname =request.getParameter("fname") ;
    System.out.println("Value of first name " +fname) // this will print your console
    java.lang.String result = port.insert(fname, lname, email, password);
    

    If this prints your input correctly, you would need to see service implementation to check it reads and process the input correctly. If it is fname is null , then we can come back to the HTML/JSP to have second look.

    Update:
    To see the request in details, you could use below code

    Enumeration reqParams= request.getParameterNames();
    while (reqParams.hasMoreElements()) {
        String key= (String) reqParams.nextElement();
        String val = request.getParameter(element);
        System.out.println(" Key ==> "+key+" , Value ==> "+val);
    
    }
    

    Try this and lets see if you get values for any of the input your enterd in your html form.

    Satheesh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have one web service connected to one db that has a table
I have created an Ajax enabled WCF web service that contains this simple method:
I have a JSON response from a web service that I need to be
I have a basic web service running that accesses a database and returns XmlDocuments.
I basically have 7 select statements that I need to have the results output
I need to develop a WCF server (basically a web service which will eventually
I have a Web Service accessible via SOAP. Let's assume it provides a method
I have some web methods in an asmx web service that currently look like
We have a web service coded in C# that makes many calls to MS
I have written a .NET web Service that is to be consumed by a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.