Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Send current Textfield values through URL?
    primarykey
    data
    text
    <p>I want to send values of my textfields of JSP/HTML page through URL like this:</p> <pre class="lang-html prettyprint-override"><code>&lt;a href="some.jsp?uname=Somnath&amp;dob=02/02/89&amp;gender=male"&gt;&lt;/a&gt; </code></pre> <p>But instead of static value I need to send the value which is putted currently.<br/>Actually I want to receive the value of all fields by getParameter() method. But we can not use:</p> <pre class="lang-html prettyprint-override"><code>&lt;form action="someAnother.jsp" method="post"&gt; </code></pre> <p>Because there is anothere URL attached with the form.Actual Situation is:</p> <pre class="lang-html prettyprint-override"><code>&lt;form action="someAnother.jsp" method="post"&gt; &lt;input type='text' name='uname'/&gt; &lt;input type='password' name='password'/&gt; &lt;input type='text' name='dob'/&gt; &lt;input type='text' name='contact'/&gt; &lt;a href="some"&gt; &lt;input type='button' value='Upload Image'/&gt; &lt;/a&gt; &lt;input type='submit' value='Register'/&gt; &lt;/form&gt; </code></pre> <p>UploadImage Button call a servlet &amp; make some operations and forward to this page again. And I need to fill all fields again which was filled by the user before hit the Upload Image Button.<br/> So I think only way to get those values in that servlet is through URL.Please give me your suggestion.</p> <ul> <li>Remind that we can get all the field values in a JSP/Servlet only if we make the action through <strong>form</strong> tag &amp; also remind the nested <strong>form</strong> is not allowed.</li> <li>So only way to call another servlet/jsp within a <strong>form</strong> tag again is <strong>a</strong> tag but it Carries no data with it.If i want to send some data with <strong>a</strong> tag then we have to use URL like firs Example.</li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload