JNLP downloading multiple times - java

I am developing a web start application. I am just exploring now and a small POC i developed works well barring one problem. A fresh download of the jnlp file is triggered every time the application is launched. I am serving the app from a local installation of tomcat. Also i haven't signed the app. Could any of these two reasons be a possible cause behind the multiple downloads?

The problem with multiple downloads was that it looked bad in terms of user experience. This can be overcome by using jnlp:// instead of http:// .
Previously : http ://address_of_my_jnlp_file/fileName.jnlp
Now : jnlp://address_of_my_jnlp_file/fileName.jnlp
The browser automatically detects that the download is a WebStart application and delegates it to the local JRE which downloads and runs it directly without triggering a browser download.

Related

Advice on how to handle logs with Azure App Service Linux

So I've got a few applications run in Azure App Service. Most importantly I've got an executable jar running the majority of the application code. It is currently running as an app service with the Java 11 stack - I have deployed the jar file using Azure Devops and Azure will run this jar within its java 11 container.
The problem I have at the moment is with the application logs. I used to able to ssh onto the vm running the code and check the tomcat logs (before moving to azure app service). I also had ELK installed on the vm although a lot of the time I would just prefer to ssh on and grep and view the logs straight from the vm.
Now all I can do is access the log stream. This will stream the logs as they come out but if I want to search for an error from yesterday I am unable to do so. I've contacted microsoft support who haven't been very helpful so far. I've tried using application insights but I'm not sure how this allows me to better view my logs.
Clicking he application logging tab doesn't allow me to do much - I think it has more features for windows app.s
What I'm ideally looking for is maybe a way to mount a storage account and write the logs there? Or some simple log analytics would do which would enable me to view the logs from the day before or search them. Anyone able to recommend what they do in this situation?
Thanks
Yes, it is as simple as the doc mentioned. Just deploy this jar as well and then point to this agent in the jvm args.
Please let me know if you have any issues.

what to use for web application that finds out information about windows/mac

I am a java beginner, looking for pointers to go about writing a web application that would
get downloaded from a internal server,
reads the system information like, OS, antivirus status - on Mac / Windows
generates a report for the user to view
from what i understand this could be done using applets. I learnt that applets are not supported any longer. so any pointers in the right direction would be very helpful
First thing first. You need to understand difference in between Web Application and Desktop application.
You should look for desktop application, which can read data from installed computer and send data using API and API will save that data in some DB and then you can generate reports from it.
In JAVA you can create a executable JAR to do some job on user's computer.

How do I connect my Desktop Java Application to an Existing GAE Datastore?

Currently I have a very basic desktop Java application in Eclipse that is meant to add entities to an existing project's datastore on Google App Engine. I have it all setup right now but since I am new to working with Google App Engine, I have no clue on how to get the application to send the Entities into the datastore of my existing project.
I tried looking this up online but most of what I found was for making java web apps. My goal is to have the application running as its own application, not through a browser.
So, what do I have to do to make the application connect to my GAE datastore? Is there some code I need to type, or perhaps some xml file I need to have within the project? I am just using the Java Eclipse plugin for Google App Engine.
Thanks for the help!
Based on the language of your question, I think you really need a big-picture sort of answer, rather than any specific code. Therefore:
You have a desktop application. This runs on some desktop computer.
You have a Google App Engine application with its data store. This runs in Google's data centers.
These are not the same computer. Therefore, they must communicate over the network in some fashion — that is the missing piece you're looking for.
Since GAE is designed around doing web applications, I recommend you think of this as a “web service” situation — that is, your desktop application makes HTTP requests to your GAE application. (The situation is simplified over the general case because you are writing both the client and the server.)
I recommend you read about designing simple web services and do whatever seems to fit your application.
One important warning: Unless your GAE application only ever has one user, you must not simply write a bridge that gives access to the data store over HTTP, because then anyone can make arbitrary changes to other people's data. As it is said for multiplayer game design: don't trust the client — that is, only accept network requests that make sense according to the rules of your application, and do not expect the client to enforce those rules. This is because anyone can make requests to your GAE application using something other than your desktop application, so you must assume you could receive arbitrary requests. This is the fundamental nature of the Internet.
For example, in the simple case of a multi-user application whose users do not interact with each other using the application, this means that every request that, say, updates a record, should only update a record which belongs to the logged-in user, not one of any other user.
For anyone that gets this problem in the future, I got an answer to it. I just tried experimenting around with the project settings and found it. So as it turns out, after you have installed the GAE Eclipse Plugin, you can just right click your project folder in the Package Explorer, go the Google sub menu, then click on App Engine Settings... .
From there, you need to check the Use Google App Engine checkbox, then in the deployment section, just fill in your project's Application ID. Your project's application ID can be found under the Application Settings tab of your project's online Google app engine dashboard. It is listed there as your Application Identifier.
Turns out that for me, I will need to find a different solution as you cannot integrate GAE with a desktop application that uses the Java Swing library. Bummer :/

Java Web Start - Does it work with Android?

As the title says, is deploying/using applications through Java Web Start a viable option? I found a few posts online from years ago saying that the JavaME applications are only available.
No, it's not an option. Android has an Application Store (called Android Market) that serves a similar purpose: managing applications install, updates and versions... So, technically, you don't need JWS.
Why not just host the .APK file locally on your lan on a webserver and allow people to download it from their browsers?
I believe the only way to get automatic updates like webstart is to use the android market. However, if you just want to deploy your app in your local lan, you can put the app as a link on an internal web server and have people navigate to it using the browser.

Is it possible to bundle my ASP.NET app into a self executable web app? (I know Java can)

NOTE: I'm a veteran Java developer (10yrs) and have recently decided to make things interesting and jump over to the ASP.NET / C# world. Thus the question...
I have a business requirement to build an ASP.NET web application that can be installed into an "enterprise data center" for use by an entire organization or can be downloaded by a single user and run on their desktop (assuming WinXP or higher). Installing the web application into an enterprise environment is easy, but allowing single users to download a file, double-click, then access the application through their web browser is an entirely different story.
To solve the single user dilemma in Java, I would simply bundle the Jetty web app server into my application and configure the WAR file to start up the web server and run the web application when someone double clicks on it.
Is there any way within the .NET world to do something like this?
Are there other .NET web app containers that I could bundle into my application?
Would I need to create an Installer Wizard that would configure IIS on the users machine?
Any help is much appreciated.
probably the closest thing to what you're describing would be a WPF Browser Application.
What I personally would use is a ClickOnce installed winform or wpf application.
You can include the Cassini web server (free to distribute). This server is great for one or two users, but you wouldn't want to run your site on it.
http://www.ultidev.com/products/Cassini/
There's a side benefit to this .... you can include the code in your solution and set break points wherever you need them. If you're using SharpDevelop instead of Visual Studio set Cassini as the startup project.
EDIT : Just checked the site and I'm not sure if it's open source anymore. I may have used Reflector to generate code to set break-points.

Categories

Resources