I agree with Kevin, I don't think I can use encodeURL method in my case.
However, I am still getting the same null values for priority string.

==========================================CreateSTR.java====================
=================
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;

public class CreateSTR extends HttpServlet {

  public void service(HttpServletRequest request, HttpServletResponse
response)
      throws ServletException, IOException {

    response.setHeader("Pragma","cache");
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

           try {
          out.print("<html>");
          out.print("<form>");
          out.print("<table border =0 align left width=80%
cellborder=100>");
          out.print("<tr>");
          out.print("<td><b>Product Code</b></td>");
          out.print("<td><b>Release#</b></td>");
          out.print("<td><b>Subsystem </b></td>");
          out.print("<td><b>Platform</b></td>");
          out.print("</tr>");
          rs = stmt.executeQuery("SELECT * from scars.tc_prodcode where
status="+"'"+"active"+"'" +"order by full_name");

          out.print("<td>");
          out.print("<select name="+"prodcode size=1 "+"onChange= "
+"Sel_Prod(this)>");
          out.print("<option value= " +">" +"select a product code");
          while(rs.next()){
          int aa = 0;
          int b = 0;
            pcabbr[aa] = rs.getString("pcabbr");
             full_name[b] = rs.getString("full_name");
             out.print("<option value= " +pcabbr[aa]+">" +full_name[b]);
          }//end rs.next
          out.print("</select>");
          out.print("</td>");

          out.print("<table border =0 align left width=80%
cellborder=100>");
          out.print("<tr>");
          out.print("<td><b>Customer/System</b></td>");
          out.print("<td><b>Priority</b></td>");
          out.print("<td><b>Urgency</b></td>");
          out.print("</tr>");

          out.print("<select name="+"priority
"+"onchange=this.options[this.selectedIndex].value"+ "size="+"1>");
          out.print("<option value=  "  +">" +"select a priority");
          out.print("<option value= Critical> Critical</option>");
          out.print("<option value= Serious> Serious</option>");
          out.print("<option value= Annoyance> Annoyance</option>");
          out.print("</select>");
          out.print("</td>");

                    out.print("<script language=\"JavaScript\">");
          out.print("function Sel_Prod(s) { ");
          out.print("userInput = new String();");
          out.print("userInput = s.options[s.selectedIndex].value;");
          rs = stmt.executeQuery("SELECT unique releaseno from
scars.tc_releases where status='active'");

out.print("location.href="+"'"+"http://oldbob.eng.filenet.com:8080/servlet/I
M?prodcode="+"'"+"+"+"userInput"+"+'&priority="+priority+"'");
          out.print("}");
          out.print("</script>");
          out.print("</form>");
          out.print("</html>");
       }//try
=============IM.java====================================

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


public class IM extends HttpServlet {

  public void service(HttpServletRequest request, HttpServletResponse
response)
      throws ServletException, IOException {

    response.setHeader("Pragma","cache");
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();

    String pcabbr = request.getParameter("prodcode");
    String priority = request.getParameter("priority");
    System.out.println("prodcode is: " +prodcode);
    System.out.println("priority is: " +priority);

-----Original Message-----
From: Kevin Mukhar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 29, 2000 2:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Why Do I kept Getting Null values?


Manish Singh wrote:
>
> i think the "?" would be missing as Kevin suggested plus i still think
> encodeURL is the proper method to use as it will take care of the
> conversion from spaces to '+' etc...

No, no, no!

The method encodeURL does not take care of conversion from spaces etc.
According to the javadoc, HttpServletResponse.encodeURL(String) only
appends the session id, as needed. The method you are thinking of is
URLEncoder.encode(String).

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to