Download Settings for Text Files in JSF PrimeFaces - linux

We have a web application hosted on Linux server running Apache Tomcat 6. The application provides a feature of downloading text files through fileDownload tag of PrimeFaces. If we run the application on Eclipse and "download" the file (located on my Windows 7 machine) through the web browser, everything works fine. But when we deploy the application on the Linux server and download the file and open it in Notepad, it doesn't have any line breaks i.e. everything is shown in one line.
Notepad++ shows the file as it should be but we need the same for Notepad too. Is there any setting for Linux or PrimeFaces to make sure that the file transferred to the client side with line breaks for Notepad?
I have Googled but could not find anything related to this.

Related

Eclipse Marketplace Not Showing All Search Results

I'm having an issue with the eclipse marketplace where doing a search doesn't show all available results. Searching for "java" I get a list of about 10 available plugins and at the bottom it says "156 matches. Browse for more solutions."
The problem is, when I click to browse more solutions I just get a blank emacs window and I can't seem to get to any of the other search results so I'm stuck with only the first 10 options.
How can I get it to show the rest of the results?
I'm running eclipse on a RedHat 6 Linux server and using a Cygwin XWindow to open it on my PC. My eclipse version info is below.
When clicking on that link, Eclipse should be opening your web browser. Somehow, on your system, Eclipse thinks that Emacs is your web browser. You can fix this on your system set-up, or override that system settings in Eclipse for Eclipse only.
Set Default Browser
Open Preferences
Navigate to General -> Web Browser
Customize your settings
Visit Marketplace Directly
An alternative is to browse to the Eclipse Marketplace directly in your web browser:
https://marketplace.eclipse.org/search/site/java

Liferay First Start wizard not openeing

I had an old Liferay 6.2 environment that is no longer working well, so I decided to download and run a fresh new environment, so I downloaded the Liferay studio, unzipped it and started the executable, I was expecting to see the First Start wizard that installs the sdk and the server automatically, but this didn't happen and the LR studio finally opened bare with no server installed, even I have no idea if I wished to add the server, where its instance might be, As per what I understand, it's wrapped in one or more of the zip files contained inside.
Liferay Developer Studio 3.0 does not come with a "First Start Wizard" any more, however, Developer Studio 2.2 (the last one that explicitly targeted 6.2) does.
If the First Start Wizard already ran, it won't automatically start again (it's quite particular about that "first" attribute). However, if you look at the top right corner of the eclipse workbench, there's an input field, named "Quick Access". Enter "First" in that field, it will autocomplete to "First Start Wizard" (in DevStudio up to 2.2) and you can run the wizard again this way.
As Liferay 6.2 EE is no longer included in DevStudio 3.0, the wizard to set it up is no longer needed. And the Workspace setup for Liferay 7 / DXP is totally different than the Plugins SDK for Liferay up to 6.2
I don't understand your problem to be honest. Could you please delete ALL your liferay's folders and do this:
Install JDK and setting required environment variables (JAVA_HOME, path)
Download MySQL server and start server (mysqld --console and mysql -u root -p, ext.)
Connecting to MySQL server and create Database for Liferay (write down if you don't know how to do that)
Download Liferay 6.2 Tomcat Bundles
Download Liferay 6.2 Plugins SDK
Download Eclipse LUNA
Create Work space folder; extract the downloaded files in work space directory.
Configure Liferay Tomcat sever information in Plugins SDK properties file.
Start Eclipse and choose liferay prospective
Configure Plugins SDK in Eclipse
Configure Liferay Tomcat Server in Eclipse
Start Server
Could you please do this steps and then write down which point you have trouble with?
Thank you!
Sometimes due to some missing config or some corrupted file this might occur.
So firstly Liferay plugins SDK may or may not be a part of developer studio but generally server is available as a standalone component.
In case you fo not have LR server,please download it from Liferay site or it's github repo.
In order to configure LR server/Plugins SDK go to Windows->Preferences->Liferay to configure the same.

Opening documents in hybrid apps

I have made a hybrid app using jquery mobile and now I want to open few docs such as pdf,pptx etc.which are already included in project on a button click. I have the liberty to open it inside as well as outside the app. Ouside the app will be feasible I guess as device can then take care of opening. I want to install app in iOS, windows and android device. Any help would be appreciated.
#user2621561, you can achieve your requirement by using Cordova file, file transfer and file opener plugin. If the file is available in server, first you got to download the file using file transfer plugin and store it in device using file plugin and then you can open the file using file opener plugin. Have tested this approach in iOS and android, it works. Not tested in windows though.

javafx communicate with serial port with javax.comm

In JDK 8 u 5 I have sample project that uses comm.jar and win32com.dll to communicate with a serial port.
I setup javax.comm correctly and put the related files in the JDK and JRE and was able to run sample code with out error.
I then created a JavaFx project with netbeans and used the sample source code, and also generate Key and set netBeans to sign my code. I also imported the cert to my system and this file to the java exception list.
When I run this with JavaFx it works correctly and communicates with the serial port.
but when run it on a browser I get a javax.comm.NoSuchPortException. If I click on the jnlp file and run it on web start the same things happens.
What is wrong? I'm sure javax.comm is correctly setup on my computer, the jar file is self signed, and the generated cert file is imported. Why does it work on desktop mode but do not work on browser and web start?

Excel export with apache POI driving me crazy

using smartgwt on tomcat running on openjdk on debian squeeze.
I have a grid on my site which you can excel-export. It transfers to server and it exports the data using Apache POI. You then get a popup in the browser so that you can save the excel file.
When running Tomcat locally, all works fine - however on my debian server, the Excel file looks empty when i open it. It IS not empty since if i save it as CSV i can see the data. MY colleague opened it on his phone and could look at the data. However in Excel 11 on Mac or Windows the file appears blank...
I think it has something to do with the Fonts installed on the server, so i have installed the "ttf-mscorefonts-installer" package that contains the Microsoft truetype fonts via apt-get, but still no success. I've tried copying fonts, using both XSL and OOXSL, but to no avail.
has anyone had any experience with this? I feel like i've tried everything now.
For others: This was caused by certain fonts not being available in OpenJDK, without any errors being logged anywhere.
I switched to Sun's JDK on my Debian as well, and the Excel files now open and display properly.

Resources