English 中文(简体)
发射html/jsp与WT模块交流的最佳途径
原标题:Best way for launching html/jsp to communicate with GWT module

我在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?

我还没有尝试过,但我想知道,任何人在不使用皇家警察部队的情况下,怎么可能这样做。

最佳回答

如果是,我只拥有共同财产制生成javascript,以储存用户=“Whoopy”

阁下。 减少太平洋金枪鱼养护委员会的最好做法是要求业绩。

查阅

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签