----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I am having a problem receiving parameter values in my servlets.  I have
tried the methods getParameter, getParameterValues,  getParameterNames and
getQueryString, but all return (null).  My servlet is pretty simple.

package package1;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class Servlet1 extends HttpServlet {

  public void init(ServletConfig config) throws ServletException {
    super.init(config);
  }

  public void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
    //
    response.setContentType("text/html");
    PrintWriter out = new PrintWriter (response.getOutputStream());
    out.println("<html>");
    out.println("<head><title>Servlet1</title></head>");
    out.println("<body>Print parameter contents: " +
request.getParameter("t1") + ":end");
    out.println("</body></html>");
    out.close();
  }

The HTML returned is  "Print parameter contents: null:end"

My request looks like this:
http://mydomain.com/servlets/development/package1.Servlet1?t1=yes

My servlet engine works fine with the exception of passing parameters.  I
have the following setup.
Red Hat Linux 6.0
Apache 1.3.9
JServ 1.1
JDK 1.1.8
JSDK 2.0

I can send configuration file details if necessary.  I have read just about
every FAQ and mail list archive I can find and I have not been able to
resolve this issue.  I would appreciate any suggestions you may have.



                                    Thanks,  James






--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to