my dog learned polymorphism*
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: 164
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
Similar Threads
Using JSTL Data Displayed In Browser Is Getting Fixed To 24576 Bytes(24 KB)
Populating one drop down based on the other
Dynamic Drop Down
Drop Down box for Jstl Select query results
JDBCAppender Log4j Help!