Note that there are some explanatory texts on larger screens.

plurals
  1. POHTTP 404 error is throwing for the below progran
    primarykey
    data
    text
    <p>The problem is url is having double quote for the parameters</p> <p>form.html</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;/head&gt; &lt;body&gt; &lt;h1 align=”center”&gt;CML Module Selection Page&lt;/h1&gt; &lt;form method=”POST” action=”SelectCML.do”&gt; Select CML Module &lt;p&gt; Module: &lt;select name=”module” size=”1”&gt; &lt;option value=”Academics”&gt;Academics&lt;/option&gt; &lt;option value=”StudentRecords”&gt;Student Records&lt;/option&gt; &lt;option value=”Purchasing”&gt;Purchasing&lt;/option&gt; &lt;option value=”Inventory”&gt;Inventory&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;br&gt; &lt;center&gt; &lt;input type=”SUBMIT”&gt; &lt;/center&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>CMLSelect.java</p> <pre><code>package com.example.model; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class CMLSelect extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException{ String module = request.getParameter("module"); CMLExpert cmlExpert = new CMLExpert(); List list = cmlExpert.getBrands("module"); response.setContentType("text/html"); PrintWriter writer = response.getWriter(); writer.println("CML Experts List &lt;br&gt;"); Iterator it = list.iterator(); while (it.hasNext()){ writer.print("&lt;hr&gt; authors are : &lt;br&gt;" +it.next()); } } } </code></pre> <p>web.xml</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt; &lt;display-name&gt;DynamicWeb&lt;/display-name&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;form.html&lt;/welcome-file&gt; &lt;/welcome-file-list&gt; &lt;servlet&gt; &lt;servlet-name&gt;servletIntName1&lt;/servlet-name&gt; &lt;servlet-class&gt;com.example.model.CMLSelect&lt;/servlet-class&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;servletIntName1&lt;/servlet-name&gt; &lt;url-pattern&gt;/SelectCML.do&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; &lt;/web-app&gt; </code></pre>
    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.
    1. This table or related slice is empty.
    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