wood burning stoves 2.0*
The moose likes Servlets and the fly likes jsp vs asp forms big problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp vs asp forms big problem" Watch "jsp vs asp forms big problem" New topic
Author

jsp vs asp forms big problem

eric
Greenhorn

Joined: Jan 18, 2001
Posts: 2
hithere, im some kinda newbie to javaserverpages, now i got some weird problem: i have a field of radio buttons that can vary in their amount, cause they are generated by a db query. the user can modify the selcted values. after he has to click safe, and the
'map' of clicked radio buttons is stored back in the db. as i have no 'for each' etc clauses in jsp i have no clue how to do this the rite way, the thing below just works fine in asp, but some1 could tell me the way with jsp?
<%
if Request.Form.Count > 0 then
for each entry in Request.Form
if not (entry = "x" or entry = "y") then
set db = Server.CreateObject("ADODB.Connection")
db.Open cc_database
sql = "update languages set spr_inuse = " & Request.Form(entry) & " where lan_seq = " & entry
set rs = db.Execute(sql)
db.close
set db=Nothing
set rs=Nothing
if not err.Number=0 then
%><p>error in db: <%=err.Description %></p><%
Response.End
end if
end if
next
end if
%>
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Eric: Thanks for your question... but
When folks register, the one rule they agree to is "For your user name, use a first name, a space and last name.
Obviously fictitious names, or improperly formatted names may be locked out."
This does not mean that if your formal name is Michael Jingleheimerschmidt that you cannot use "Mike Schmidt". In
fact, one of our prestigeous sherriffs is "Mahalakshmi Annadurai", but you know her as "Maha Anna".
Using an unregistered alias for your first few posts is understandable. You're not quite yet comfortable with this
group. But after a few posts, it's time to register and follow the rules. For some forums, abuse of the name rules
has led to not allowing unregistered accounts. So, you will need to create a registered account that follows the
rules.
It is possible that you are horribly paranoid about using your real name on the web. This happens. In that case, feel
free to register using a fictitious name, although this will probably be a disadvantage to you in the future. Use
something like "Al Swensen" or "Rob Cheeny". Do not use cute names like "Justin Case" or "Adam Baum". Do not use
the names of celebrities.
If you are currently using an account that uses an inappropriate alias, please create a new account that follows the
rules. The software we use here is not capable of changing the name on an existing account and we have unlimited
account slots.
I want to maintain a professional exchange on JavaRanch so that corporate america won't feel embarassed to find
employees spending time here.
If a moderator or administrator has directed you to this message and you choose to not follow the rules, there is a
good chance that your improperly registered account could be locked and your unregisted postings deleted. Please
note that your IP is tracked and you might find your IP is blocked.
There are really only two rules you are asked to follow here:
1) Be decent to your fellow ranchers (we really haven't had any trouble with this one)
2) Use an appropriate name (we've had trouble with this one).
I hope that the value of participating on JavaRanch is worth sacrificing a single-name username.

[This message has been edited by Tony Alicea (edited January 18, 2001).]


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Eric:
I noticed that your question is about ASPs (?), not JSPs which is the subject of this forum (we don't care for Microsoft web techniques )
[This message has been edited by Tony Alicea (edited January 18, 2001).]
eric
Greenhorn

Joined: Jan 18, 2001
Posts: 2
sorry for the name, i didnt know that i had to givein ma last name, ill fix this
ma question wasnt only asp, im only new to jsp and needed some help to convert ma stuff into jsp... btw i reached a new high
in getting the data of all radio buttons on 1 site with this:
String paraname = "";
for (Enumeration selectedValues = request.getParameterNames();selectedValues.hasMoreElements(); ) {
paraname = selectedValues.nextElement().toString();
out.print("|"+paraname+"|");
out.println(request.getParameterValues(paraname));
}
problem is that it doesnt werk n1ce,2, so probably some1 could have some look at the code i snippet outta the api?
btw again sorry 4 name problems cya
eric clark
Greenhorn

Joined: Jan 18, 2001
Posts: 16
name fixed....
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Thanks Eric for changing your username...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp vs asp forms big problem
 
Similar Threads
send email with web page textarea contents
Displaying a ResultSet Problem
ASP with JavaScript
One form, multiple radio button groups
Conversion configuration objects from ASP to JSP