Slight correction - missing parenthesis.
if (request.getParameter("loc").equals("clipArtManager"))
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 12, 2002 2:45 PM
To: JRun-Talk
Subject: Re: Querystrings - Fustrated Newbie Question, Please Help
You have to use
} if (request.getParameter("loc".equals("clipArtManager")) {
When you use ==, you are comparing objects, and in your case, they are not the
same. What you want to use is equals(), which just compares the content.
"Boogie Brown"
<boogie_brown@ho To: Jrun-Talk
<[EMAIL PROTECTED]>
tmail.com> cc:
Subject: Querystrings - Fustrated
Newbie Question, Please Help
07/12/2002 02:38
PM
Please respond
to jrun-talk
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