title: Using Dropdown box in JSP code
body: <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action="Test1.jsp" method="post"&gt;
  
  &lt;select name="source" onchange=""&gt;
  &lt;option value="rss"&gt;RSS LINK&lt;/option&gt;
  &lt;option value="other"&gt;OTHER LINK&lt;/option&gt;
  &lt;/select&gt;       
  
  Enter URL to be added   &lt;input type="text" name="url" size=50&gt;
  
  Enter the Source Name of the URL&lt;t&gt;&lt;input type="text" name="source1" size=50&gt;
  
  &lt;input type="Submit" name="submit1" value="Add URL in DB"&gt;
  &lt;/form&gt;   
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above code is stored in Addurl1.jsp file which calls the other jsp file named Test1.jsp.
  The code under Test1.jsp is as follows</p>
  
  <pre><code>&lt;%@ page import="myfirst.*" %&gt;
  &lt;%
   String url1=request.getParameter("url");
   String source1=request.getParameter("source1");
   myfirst.SearchLink p=new myfirst.SearchLink();
   String result=p.addURL(url1,source1);
   out.println(result);
   System.out.println(result);
  %&gt;
  </code></pre>
  
  <p>Test1.jsp calls addURL(String, String) function of SearchLink.java program.
  In the dropdownbox of  Addurl1.jsp program, if the user selects RSS link, the addURL() method must be called.<b> If the user selects OTHER LINK, there is another method named addURL1() in the same java program which must be called.</b></p>
  
  <p>Please let me know how the above codes can be modified inorder to achieve my task.</p>
  
  <p>Thanks in advance!</p>