Hi, Fumitada.

Here's a boiled down version of my code...

public void doGet(HttpServletRequest request, HttpServletResponse response)
                 throws ServletException, java.io.IOException
{
         String cmd = request.getParameter("cmd");

         if (cmd == null || cmd.equals(""))
         {
                 ExportHTML(request, response, filePath + "default.htm");
         }
         else if (cmd.equals("load"))
         {
                 String pgName = request.getParameter("pg");

                 if (pgName == null || pgName.equals(""))
                 {
                         System.out.println("page is missing or empty!!!");
                 }
                 else
                 {
                         System.out.println("Outputing page: " + pgName);
                         ExportHTML(request, response, filePath + pgName +
".htm");
                 }
         }
         else if (cmd.equals("search"))
         {
         }
}

ExportHTML() is a function that reads in a html file and outputs it to the
client.

I tried changing the name "page" to "pg" but that didn't change that
getParameter() returns other text that's not part of
the "pg" variable. I thought maybe I was doing something wrong with the URL
in how the parameters were being passed in the GET that's being executed
when the URL is clicked on. The first parameter "load" is always correct.

I'm using Tomcat 3.2.1and JDK 1.3 on a Win98 machine.

Thanks!

Matt

At 01:16 PM 1/16/01, you wrote:
>What u r doing seems okay though...
>
>Can u let me(us) see whole your code ?
>
>Thanks.
>
>Fumitada
>
>___________________________________________________________________________
>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