Primefaces upload multi file with umlaut - jsf

I am new to primefaces. I have implemented a web application with Tomcat.
The app includes also a page with single mode file upload and another with multi upload.
As i am using umlaut in the filenames they were sent to the backend in an "encrypted" format. To solve the issue i added to tomcat the config param:
-Dfile.encoding="ISO-8859-1"
and the form is something like this:
<h:form enctype="multipart/form-data" acceptcharset="ISO-8859-1">
....
This works fine for single mode upload. However the multi file does not! For the multi file i tried the form with and without acceptcharset="ISO-8859-1" property. But no results!!
What i am doing wrong? What i need to do to have BOTH upload modes working?
Any advice very much appreciated!
thanks lot!!

Related

How to static-serve all urls without '/' at the end except certain ones using express?

I am setting up a Node.JS application using express, and I want domain.tld/hey to serve the public/index/index.html folder on the server (also containing other files such as .css or .js files).
However, I DO NOT want domain.tld/hey/ to work (the / at the end is a problem for me) and in this case, I want to display a custom error page located at public/error/index.html on the server.
Finally, when accessing domain.tld or domain.tld/, I want to display a custom homepage located at public/home/index.html on the server.
To summerize:
domain.tld or domain.tld/ serves public/home/index.html
domain.tld/something serves public/index/index.html
domain.tld/something/ or domain.tld/some/thing serves public/error/index.html
I already tried using express.static('folder', { redirect: false }) but it doesn't display the index.html file and I can't get the other things to work.
I really don't know how to do it!
I fortunately don't have any code to show you guys as this is more a theorical problem, since I am beggining with expressjs.
Thank you very much in advance for your answers, and please don't hesistate to ask for more details if you need some!

Text file create and upload in node server with Angular 6

I am new to angular 6 and Node as well. Basically I have a requirement of creating a text file on button click and saving it to server using Node. Te save file will be in .txt format so that I could read from it again. I was trying using ng2-file-upload, but that is helpful for upload and save. Not getting any clue how to proceed!
I got the reference of File System API. How to use it from my Angular 6 Code?
Thanks in advance for help!!

DLFileEntryLocalServiceUtil.getFileAsStream(...) not working in liferay server

DLFileEntryLocalServiceUtil.getFileAsStream(...) not working in my server I have s3 configuration for document and media. This method perfectly working without any issue in local server where s3 not configured. Does this require any extra configuration.
I basically want to convert DLFileEntry into File so I had used another method.
File file = DLFileEntryLocalServiceUtil.getFile(user.getUserId(),dlFileEntry.getFileEntryId(), dlFileEntry.getVersion(), true);

How include properties file for internalisation?

I am working on a node JS project with the Kraken framework. Then I use Dust templating and makara for the internationalization. But actually, I have one .properties file for each .dust file and i would like include a main.properties for each other properties for sharing same content across the pages.
I try this in a properties :
include = main.properties
But it doesn't works.
Do you have an idea ?
Thanks you in advance.
There is no mechanism for include currently. This issue is the one to track on that matter: https://github.com/paypal/makara/issues/11

h:outputStylesheet and h:graphicImage not working?

I am using h:outputStylesheet and h:graphicImage in my .xhtml files. It works completely fine on my localhost.
Now I tried to upload my .war it on Hosting space provider which uses NGASI AppServer Manager.
Here, h:outputStylesheet and h:graphicImage tags have stopped functioning. What I noticed is that everything with pattern /ctx/faces/javax.faces.resource/....?ln=.... is giving 404: (Not found) error.
For ex:
http://www.edarena.com/EdArena/faces/javax.faces.resource/theme_edarena.css?ln=css
http://www.edarena.com/EdArena/faces/javax.faces.resource/jsf.js?ln=javax.faces&stage=Development
http://www.edarena.com/EdArena/faces/javax.faces.resource/THEME_EDARENA/logo.png?ln=images
All the .xhtml files in app root are getting accessed properly, which means the mapping /faces/* to Faces Servlet is correct in web.xml.
My first impression was that the image or resource path is somehow not getting determined.
But I just tried renaming my file resources/images/THEME_EDARENA/logo.png to logo1.png.
After this when I refresh my pages using this image, I get message 'Unable to find resource THEME_EDARENA/logo.png' in my tag. If I make it logo.png, the error messages goes away, which means the file is found but something goes wrong while rendering it.
Thanks for any help.
Please suggest something.
BR
Anand

Resources