File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes jsp sqk question ? urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp sqk question ? urgent" Watch "jsp sqk question ? urgent" New topic

jsp sqk question ? urgent

majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 167
I have a drop down list , so I can select each user or
select ALL to get all users like this :
FORM NAME="productGoto">
<FONT FACE="Arial,Helvetica" SIZE="-2">
Select By User:
<SELECT NAME="productList" onChange="gotoFunction()" onBlur="return
options[0].selected = true">
<OPTION VALUE=" "> Categories </OPTION>
<OPTION VALUE="Earl Peterson">Earl Peterson</OPTION>
<OPTION VALUE="WDS Domino Backup ">WDS Domino Backup</OPTION>
<OPTION VALUE="Mike Tripp">Mike Tripp</OPTION>
<OPTION VALUE="Heather Lowe">Heather Lowe</OPTION>
<OPTION VALUE="Maureen O'Gorman">Maureen O'Gorman</OPTION>
<OPTION VALUE="Addelmajid Lotfi">Addelmajid Lotfi</OPTION>
<OPTION VALUE="<open> ">open</OPTION>
<OPTION VALUE="Carolynn Huntington ">Carolynn Huntington</OPTION>
<OPTION VALUE="Joe Richard ">Joe Richard</OPTION>
<OPTION VALUE="WDS - Video Station ">WDS - Video Station</OPTION>
<OPTION VALUE="Liza Nanni">Liza Nanni</OPTION>
<OPTION VALUE="Ursula Bethoney ">Ursula Bethoney</OPTION>
When I select just one user it works, but when I select "ALL" it does not
here is the code :
if ((category !=null) && !(category.equals("ALL")) )
category = (String)request.getParameter("category"); %>
select * from pcinfo
where User = '<sql:escapeSql><%=category%></sql:escapeSql>'
} else if ((category ==null) | | (category.equals("ALL")) ){ %>
select * from pcinfo order by User

Manjunath Reddy
Ranch Hand

Joined: Jul 26, 2001
Posts: 60
Isnt "ALL" different from "All".
It might be the comparison problem..while ur html posts "All"..u r looking for "ALL"
I agree. Here's the link:
subject: jsp sqk question ? urgent
It's not a secret anymore!