Different encoding on different environment of same web application - unicode

I have a web-application running on WildFly 8.2.
The application has a view, with links to txt-files.
I have the application running on a local WildFly and on a remote "test" server. Both environments have exactly the same version of the application and same version of WildFly. I also try them with the same web browser (Internet Explorer) on different tabs.
When I click one of those links, using the same web browser, in the application that runs on my local wildfly, it shows the umlaut (äöå) perfectly. In the test environment it doesn't. It shows just empty white boxes.
Now, when I right-click on the page on internet explorer. I can see that in the correctly working version the encoding shows "Western European (Windows)" and in the NOT working, test environment, the encoding shows "Unicode (UTF-8)" being used on the site.
Is there a configuration in WildFly that determines this? Because I'm running the same version of the program in the same branch in both instances so the problem shouldn't be programmatical.

Related

Too many redirects issue in local host (IIS,ColdFusion 2018)

I am setting up ColdFusion 2018 Application server with IIS 10. But getting too many redirects issue.
I have tried from square one.. Below are the things I did.
Installed CF 2018 developer
Configure IIS (Windows 10) with CF 2018 using wsconfig.
Created a simple “index.cfm” and tried to access. This page contains just cfset and cfoutput.
got 404 error.
updated “enable 32-bit applications” to false in IIS application pool
404 error resolved, but getting “Too Many redirects issue”
enabled developer tools in IE and checked.
getting 302 status code and it seems index.cfm is redirecting to itself.
Not sure what to do now? Is there anything I missed in setting up IIS with CF 2018 server?
You can resolve this error by making sure that the two required components of IIS are installed on your system. Namely:
ISAPI Extensions
IIS Metabase and IIS 6 configuration compatibility.
First, start the program called Windows Features. You will find Windows Features under Control Panel –> Programs and Features.
When the Windows Features starts, navigate through the features hierarchy under Internet Information Services and select the two features:
(a) ISAPI extensions and
(b) IIS Metabase and IIS 6 configuration compatibility.
Configuring IIS for ColdFusion:
You will have to run the Web Server Configuration Tool that comes with ColdFusion to configure IIS so that all .CFM files are mapped to be handled by ColdFusion.
The following text is directly from the ColdFusion installation guide:
1)Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 9 > Web Server Configuration Tool.
2)Click Add.
3)In the Server pop-up menu, select the host name and the server or cluster name to configure. In the ColdFusion server configuration, the server name is always coldfusion. Clustering support is not available on the server configuration.
Note: The server or cluster does not have to reside on the web server computer.
4)In the Web Server Properties area, select IIS and specify the website. For IIS, you typically specify All.
5)Select the Configure web server for ColdFusion applications option, and click OK.
Note: Omitting the previous step causes your web server to serve ColdFusion source code.
6)Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. In addition, copy your application’s CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.
if you face too many redirects then just enable 32-bit applications to true.
refer this link:
https://community.adobe.com/t5/coldfusion/strange-iis-redirect-issues-leads-to-jakarta-isapi-redirect-dll/td-p/4239297?page=1

Super Dev Mode on a remote server

The project I work at is quite specific. We use GWT with SAP backend. We run the Dev Mode using the following configuration (as program arguments; I run the project directly using IntelliJ IDEA)
-noserver -logLevel INFO -startupUrl http://server-url:8000/aaa -whitelist ^http[:][/][/]server-url[.]eu[:]8000/aaa com.company.project.main.Main
Note, we didn't use a local server (-noserver).
After familiarizing myself with the Super Dev Mode, I understood, that it works similar to GWT Web Mode, i.e. it compiles JavaScript (the folder to compile to can be specified) and then runs the code server with that script hosted.
Due to the specifics of the project, the compiled JavaScript is deployed to the remote server using maven via WebDav. So simply specifying -workDir as a parameter will not deploy the scripts on the remote server. Nor can we run (at least at the moment) a Java server on the server-url address.
Can we use the Super Dev Mode in this situation?
Yes you can.
EDIT 2016-11-27: I built a devserver that can use -launcherDir-style SuperDevMode without the need to write to the server, by using a webpack-like proxy: https://github.com/tbroyer/gwt-devserver
EDIT: there are a few issues re. deferred-binding properties. The recommended use of SDM (since GWT 2.7) is to use -launcherDir which means using a local server.
SuperDevMode works much like DevMode with -noserver, which means you have to deploy your app at least once to your server. In the case of SuperDevMode, it means you have to compile and deploy with the xsiframe linker and devModeRedirectEnabled property set to true.
Then you run SuperDevMode on your machine, create your bookmarklets if not done already, load your app from the remote server and click the Dev Mode On bookmarklet.
This will store something in the browser's sessionStorage so that reloading the page will now load the permutation from the SuperDevMode running on your machine rather than the remote server.
More info about how SuperDevMode works: http://blog.ltgt.net/how-does-gwts-super-dev-mode-work/
For now, I see only one possible solution, which is to run the gwt-codeserver.jar somehow on the SAP server (with the address, say, http://server-url:8000/bbb) and write a servlet, that will redirect all requests to http://server-url:8000/aaa. However, this is not very easy to implement. The SAP server has "tricky" authentication mechanism, where user first sees the logon page and then they are redirected to a generated session-specific URL.
Other ideas are very welcome.

Debugging a GWT application in a remote environment

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:
http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997
I get
Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions
My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?
If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)
Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.
If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.
Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.
Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)
Just enable and disable it in :
chrome://chrome/extensions/
Good luck! It's the only thing wrong with GWT imho...

Embedded Resources accessed by WebResource.axd links not working in production environment

Ok, this has me stumped.
I have several server controls defined in a VB.NET .NET 4 project, lets call it WebControls, to be shared with other projects in the solution. WebControls uses embedded resources (images) so that I don't have to remember to include images in each project that reference the controls. I use Page.ClientScript.GetWebResourceUrl to set image ImageUrl attributes in the server controls.
This all works fine in my application X that uses the controls from WebControls on my dev server. However, when I push this to production, the images represented as embedded resources do not show up.
My production server runs IIS 7.0. I know that disabling compression does not affect anything and that the proper IIS handlers are present for web resource .axd files.
What is even stranger is that I have copies of this application (named differently of course) on that same production server and everything works fine in those, but not in X. The application pool uses .NET 4 integrated and will not work on classic mode.
Any suggestions?
Figured this out. Very strange. I rebuilt my WebControls class and my other applications in debug mode and pushed those .dlls to my production server and everything worked fine. Then, I rebuilt in release mode and pushed the .dlls to production again, replacing the debug .dlls, and again all worked fine. Seems to have been an issue with VS 2010 not clearing out the dlls correctly when I cleaned and rebuilt my applications for release.

Can a deployed JBoss web application simply disappear?

A strange problem occurred yesterday on a production system which has been running fine for weeks on a JBoss 4.2.3 application server: the JAR file containing the web application was no longer in the deployment folder (so the clients could no longer access the application). The server is running on a Windows box.
There was no indication of undeployment in the server logs. Normally JBoss detects if somebody deletes (or moves) a deployed web application file and executes the standard undeployment procedure, so there would be a log entry in this case.
Other web applications on the same system continued to run fine, so it was only this JAR file which simply disappeared.
Has somebody seen a similar problem with web applications on JBoss?
I'd bet my shoes that's not possible to happen spontaneously.
Check your security settings - didn't you leave JMX console accessible? Etc.