Yes, the return value of fetch() is Value. Functions can only have one
return type, after all - fetch() can't return a different thing for
each type you can store.

Call stringValue() on the Value you get back:

 String html_page = r.fetch("RESULT").stringValue();

The manual section on store and fetch doesn't explicitly mention this,
but I think it follows from the declaration of fetch() and the section
about the Value class.


I think brecon wrote:
> 
> Hello fellow jessers.
> I'm trying to store a string in JESS, in the RHS of a rule, and then fetch
> the string from java and pass it as an argument to a function, but it won't
> behave like a string!! my compiler complains that it's still a "Value"...
> 
> here's my JESS code:
> (defrule startup
> =>
>   (store RESULT ("../servlets/user_profile.html"))
>  )
> 
> I have tried storing it like this:
> store("RESULT", new Value("....html", RU.STRING)) - but no luck with that
> either!!
> 
> I have scoured the manual but I have a funny feeling I'm using something not
> meant for strings!?
> 
> this is the code in my java prog:
> 
>  String html_page = r.fetch("RESULT");
>       dispatcher = getServletContext().getRequestDispatcher(html_page);
> 
> Help!
> Many thanks. Debbie Lampon
> ______________________________________________
> public boolean junkmail=false;
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to