I'm getting a funny looking class returned from a jpath expression. Here is a small code example displays the class name for two strings, one created with a jpath expression and the other a static value. Notice the the class type from the jpath expression looks funny. Am I doing something wrong? Thanks.

Joel

<xsp:logic>
// create an Object from jpath expression; should be String class per javadocs
Object o = <jpath:value-of select='searchType' />;
String oClass = o.getClass().getName();
// create an Object from static String
Object oo = "Test 123";
String ooClass = oo.getClass().getName();
</xsp:logic>


   <!-- display each class name -->
   <oClass><xsp:expr>oClass</xsp:expr></oClass>
   <ooClass><xsp:expr>ooClass</xsp:expr></ooClass>

Returns the following:

<oClass>[Ljava.lang.String;</oClass>
<ooClass>java.lang.String</ooClass>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to