Hmmm,
Could this be a java implementation issue?
Consider the there is no assurance that the following is true:
String lame1 = "test" ;
String lame2 = "test";
if( lame1 == lame2) // pointer comparison not string
maybe do something;
rather:
if( lame1.equals( lame2)) // string comparison
definately do something;
----------------------------------------------------------------------------
----------------------------------------
Paul I. Dorn
Director, Web Development
Atlantic Internet Technologies
628 Shrewsbury Ave
Red Bank, NJ 07701
[EMAIL PROTECTED]
-----Original Message-----
From: Noah Nordrum <[EMAIL PROTECTED]>
To: Java Apache Users <[EMAIL PROTECTED]>
Date: Monday, May 03, 1999 4:05 PM
Subject: Really lame problem that is messing me up.
>It might be that I am VERY tired and sick, but I can't figure out why
>this isn't working.
>It seems that if I go to
>"http://localhost:8080/servlets/WebStore?action=test"
>shouldn't the following code produce a page that says "BILL GATES
>BLOWS"?
>When I do this with no arguments it creates the MainPage, but if I do it
>with
>arguments(?action=test) it produces a page that says "test".
>
>This is really messing me up right now.
>Unfortunatly I think I can't rationally blame this on M$.
>
>Thanks in advance.
>Linux 2.0.36
>Apache 1.3.6
>JServ 1.0b3
>JSDK2.0
>JDK1.2
>--
> public void service(HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
> {
> res.setContentType("text/html");
> PrintWriter out = res.getWriter();
>
> String action = req.getParameter("action");
> if (action == "" || action == null)
> {
> new MainPage(out);
> }
> else if (action == "test")
> {
> out.println("<HTML><BODY>BILL GATES BLOWS</BODY></HTML>");
> }
> else
> {
> out.println("<HTML><BODY>" + action + "</BODY></HTML>");
> }
>
>
>--
> ==============================================================
> Noah Nordrum
> [EMAIL PROTECTED]
> http://www.newfrenchbakery.com/
> 2:54pm up 130 days 20:05 hours
> ==============================================================
>
>
>
>
>----------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>READ THE FAQ!!!! <http://java.apache.org/faq/>
>Archives and Other: <http://java.apache.org/main/mail.html/>
>Problems?: [EMAIL PROTECTED]
>
----------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
READ THE FAQ!!!! <http://java.apache.org/faq/>
Archives and Other: <http://java.apache.org/main/mail.html/>
Problems?: [EMAIL PROTECTED]