When comparing strings, you should use the STring method .equals()

Instead, try:

(request.getParameter("loc").equals("clipArtManager"))

Hope this helps.

Drew Falkman
Team Macromedia - JRun
Author, JRun Web Application Construction Kit
http://www.drewfalkman.com/books/0789726009/

-----Original Message-----
From: Boogie Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 11:39 AM
To: JRun-Talk
Subject: Querystrings - Fustrated Newbie Question, Please Help


I am an ASP programmer moving to JSP. I am trying to run my first script and
capture a Querystring however it seem so dificult in JSP.
This is my code:
<%
} if (request.getParameter("loc") == "clipArtManager") {
%>
Clip Art
<%
} else {
%>
No Go
<%
}
%>

It is always returning No go. Why is this?

My other problem is that when I print out
request.getParameter("loc") I het 500 Null printed on the screen, with no
other data shown.

What is happening?

Please ANY help would be much appreciated.

MTB




______________________________________________________________________
Get the JRun Web Application Construction Kit - the only book written specifically for 
JRun developers.
http://www.amazon.com/exec/obidos/ASIN/0789726009/houseoffusion
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to