English 中文(简体)
Tomcat redirecting for a Flex/java web app
原标题:Tomcat redirection for a Flex/java web app

在问我的问题之前,请允许我解释一下情况。

CONTEXT:
I have a web app created in both Flex and Java using LiveCycle Data Services. The application runs on a Tomcat server. Let s assume that the context root of the app is /myApp. When loading server:port/myApp, Tomcat loads myApp.html, which is a wrapper for the application.

REQUIREMENTS: In order to load the application in different languages, I need the swf to read some flashvars to set the loading language and other sutff. The loading language should be set depending on the url.

WHAT I D LIKE TO DO BUT DO NOT KNOW HOW TO: I think that I should have different html wrappers for the swf, so that each html wrapper passes different flashvars to the swf. But not having to deploy a war for each language.
The deployed war should then contain myAppFR.html, myAppEN.html, myAppJP.html... Each wrapper pointing to the same swf but passing different flashvars. I d like server:port/myAPP/FR to load myAppFR.html, server:port/myApp/EN should load myAppEN.html, and so on.

I don t know if I m being clear enough. It s not too clear in my head cause I do not really know how to do it, or if it s even possible!

因此,如果需要,请提供更多细节,并感到可以免费给您提供:

感谢很多。

(PS:I m not a Java pro, so,如果可能的话,则更为详细。)

最佳回答

我最后使用了联合材料:

function getBrowserLangSetting() {
        if(navigator.language)
            return navigator.language

        if(navigator.userLanguage)
            return navigator.userLanguage
}

这对我来说足以确定缺省语。

问题回答

您是否在会议上对用户进行跟踪,或者说什么样? 如果是的话,你可以采用共同方案(或其他一些动态的内容生成框架),将标签包括你喜欢的任何变数——包括用户语言——并公正使用会议当地语言。





相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签