我在WT论坛上询问了这个问题,但我对回答感到不快,我似乎在此得到非常好的答复。
A html or jsp file is used to launch the xxx.nocache.js, which then decides which browser "permutation" to use.
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<title>xxx</title>
<script type="text/javascript" language="javascript" src="xxx.nocache.js"></script>
</head>
In my case, I am using a jsp. When the JSP is executed, it discovers some conditions. I wish to pass these conditions as values to the GWT module being launched. The "elegant" GWT way to pass these values would be to persist them as request/memcache attributes and then have the GWT module perform RPC to retrieve those values.
For example, the JSP discovers that the current user is Whoopy. Shouldn t I simply have the JSP generate javascript to store
user = "Whoopy"
as a top or namedframe level javascript variable and use JSNI within the module to retrieve the value for user?
我还没有尝试过,但我想知道,任何人在不使用皇家警察部队的情况下,怎么可能这样做。