cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaldr...@csc.com
Subject Re: [C2] substitute for xsp-request
Date Thu, 16 Aug 2001 18:00:34 GMT
Using java you can (in a logic block?) you can use ((HttpRequest)
request).getParameter(name).

Use the Integer class to convert a String to an int in java:
Integer.parseInt(string)

however, be careful, if the String is not a properly formed int it will
throw an exception. Best to wrap it in a try/catch block, and it's even
safer to trim the string first, eg
try{
 int i = Integer.parseInt(string.trim());
}catch(Exception e){
 ... handle error
}

Regards,

Anthony Aldridge
Lead Application developer

Managed Intranet Hosting
Personal GDP: 325-8338
MIH Hotline: 876-1300





"Orgalist" <orgalist@wanadoo.fr> on 16/08/2001 17:53:13

Please respond to cocoon-users@xml.apache.org

To:   "cocoon-users" <cocoon-users@xml.apache.org>
cc:
Subject:  [C2] substitute for xsp-request


is there a class in Cocoon2 I could use to
get parameters sent by a form instead of the
tag <xsp-request:get-parameter> ?

thanks

C.

ps does somebody knows a class which can convert string
to int ?


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>







---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message