Hi,
GWT lives in client space so :
* Simple way:
In your jsp:
<script>
var myVar = "<%= (String)session.getAttribute("myVar") %>";
</script>
And in your module :
JNSI.getString("myVar", "defaultValue");
with the JNSI class:
public class JNSI {
public static native String getString(String jsVar, String defaultValue)/*-{
var value = eval('$wnd.'+jsVar);
if(value){
return value;
}
return defaultValue;
}-*/;
}
* more complex :
Define some API in your GWT module by hand or with something like GWT Exporter (
http://timepedia.blogspot.com/2008/06/preliminary-gwt-export-20-release.html):
ie: module provides setMyVar(String method)
call your api from JSP page **after the module sas started**
<script>
function gwt_callback_called_by_gwt_module_onLoad(){
setMyVar("<%= (String)session.getAttribute("myVar") %>");
}
HTH
--
Si l'ignorance peut servir de consolation, elle n'en est pas moins illusoire.