aspose file tools*
The moose likes JSF and the fly likes cannot get a value from jsf back to the html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "cannot get a value from jsf back to the html" Watch "cannot get a value from jsf back to the html" New topic
Author

cannot get a value from jsf back to the html

ahmet temiz
Greenhorn

Joined: Apr 09, 2010
Posts: 10
hello

I can send data to jsf app from an non-jsf ( a html page). But I cannot
get a value from jsf back to the html page from which I had sent the parameter.



how can I do that ?

regards

Ahmet Temiz
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

As long as both pages are in the same WAR, this is easy. JSF session-scope managed beans are nothing but ordinary J2EE session objects which were constructed and initialized based on faces-config data instead of manual Java code. So just put the data into a session object.


Customer surveys are for companies who didn't pay proper attention to begin with.
ahmet temiz
Greenhorn

Joined: Apr 09, 2010
Posts: 10
Tim Holloway wrote:As long as both pages are in the same WAR, this is easy. JSF session-scope managed beans are nothing but ordinary J2EE session objects which were constructed and initialized based on faces-config data instead of manual Java code. So just put the data into a session object.


thank you Tim

You mean I have to follow this procedure:

HTTPConnection con = new HTTPConnection("www.****");
HTTPResponse rsp = con.Get("/my/fie***");


regards


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

ahmet temiz wrote:
You mean I have to follow this procedure:

HTTPConnection con = new HTTPConnection("www.****");
HTTPResponse rsp = con.Get("/my/fie***");


No. In your servlet, just do this:


You would only create an HTTPUrlRequest if the object was in some other webapp where a different session environment existed. And in that case, you would have to set up an encoding scheme to serialize the data in an HTTP-friendly form (text) on the external webapp and a corresponding decoding scheme on the client side. XML is popular for that.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: cannot get a value from jsf back to the html