Your problem is a JSP corker - nothing to do with JSP as an implementation, but the
fact that if you're writing scriplets, then you're outside of a Java IDE with no
compiler/parser support.

s1.getBytes is trying to get the method getBytes as a variable, rather than:
s1.getBytes() - to call the method.

As I said, an easy mistake when you've got no tool support to write the script :)

If you wrap any functionality you need in a bean (either stateful or a stateless
"controller" bean), then you can develop these in an IDE and get all the tool
support you need.

Jari

Jeff Brown wrote:

> I'm working with some COM objects that only accept bytes.  However, the data
> I'm trying to send is in string form (sent by form input elements).  In ASP
> this was not a problem since VBScript auto-casts everything.  Java's a bit
> pickier and my knowledge of Java is shaky at best.  I've tried:
>
>         <%       string s1, s2;
>                  s1=request.getParameter("someString");
>                    s2 = s1.getBytes;
>         %>
>
> This returns the error:  "Attempt to reference method getBytes in class
> java.lang.string as an instance variable."
>
> There's gotta be an easier way to do this :)
>
> ____________________
> Jeffrey W. Brown
> Test Engineer
> Citr!x Systems, Inc.
> PHONE: (954) 267-2846
> EMAIL: jeff.brown @ citrix.com
> ____________________
> The information contained in this message is confidential and may be
> legally privileged. It is intended solely for the addressee. Access to
> this message by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying or distribution of this message, or
> any action or omission taken by you in reliance on it, is prohibited and
> may be unlawful. Please immediately contact the sender if you have
> received this message in error.
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to