How Applet talk to Web server [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am going to build web application in Java (JSP). In my web application ;JApplet will communicate with the database that is on other place(Remote Database).
My question is that how applet can take and give the data from the database.
I am Using MYSQL database.
Can I use JDBC for that ?If so then how?

Unsigned applets must follow the same origin policy, hence the applet will only be able to talk with the server from where it was downloaded. For this case it may work, assuming you bundle JDBC driver somehow (like moving driver classes into applet jar, or trying to use multiple jars in the same applet).
However if you want to deploy the application more widely, it may be better to use text based communication (XML or JSON) on the server port 80. JDBC port may be blocked by various firewalls.
As the alternative to the applet technology, you may also look into Google Web Toolkit. It is the same Java (just toolkit compiles to JavaScript) and you should feel at home, but it is easier to deploy reliably. GWT provides callbacks to pass the data to and from the server.

what you exactly wanted to do is run to your applet inside your web container for that you study the architecture of J2EE web container that how it run applet container.you can check on the oracle site link : about j2EE containers. for the architecture you can view this :http://tekmarathon.files.wordpress.com/2012/10/j2ee_component_diagram.png

Related

Simplest Distribution Method for Java Front-end Database Application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this question
I would like to create a front-end application in Java to query a Microsoft SQL database. This application will need to be distributed to around 20 computers and must be extremely user friendly. I'm hoping someone can explain two things:
The simplest way to distribute this application across multiple windows machines. I.e.least amount of software installation and maintenance.
Explain how once distributed, the application might be able to connect to the database upon launch, as opposed to authenticating a user each time.
So far I plan to use Java, JavaFX, & Microsoft JDBC driver. Open to new ideas though, cheers in advance.
For distribution, I can think of a couple of choices:
IF you are sure that each of you 20 computers has a JVM installed, you could package the app as a "FatJar", a single Jar file with all of the dependencies in it. There are plugins for this in both Maven and Gradle.
If you don't have a JVM on these computers, and don't want to have to install one, you could create a native application using GraalVM and Gluon.
Take a look at https://gluonhq.com/create-native-javafx-applications-using-graalvm-22-builds-from-gluon
If you want to connect to the database without user intervention, see sql server login credential for jdbc

Is it possible to register a Domino Server with the Java API or C API? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
We are well on our way to Dockerizing Domino. In fact, we have a Domino Docker running in IBM Cloud (bluemix) that replicates with on prem.
What we want to be able to do is automate the standing up of a Domino server.
In our script, we are thinking of calling a custom program we can build that will use either the C API or Java API to register a new server, deploy a XPages (JSF) application to it, and start the server, replicate over the common user directory (names.nsf) from the master server.
Currently, we started the Domino Container in CentOS in listener mode. We registered the server on prem, and copied over a bunch of files (server.id is one of them) and edited confirmation to manually configure it. We want to automate this process.
Any insights on how this can be better accomplished? any api references you can share to get us most of the way there?
Yes, this is possible. We have done this in Lotusscript using LS2CAPI.
As we are accesing API functions, this is also possible using Java. Not sure, if domino-jna already includes the needed Api calls, but this can be implemented. Take a look at github for Karsten Lehmann and domino-jna.
domino-jna can be used from XPages as well.

How a Web Application works? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am new to this web application thing and I have just started creating a web application using JSP for my implant training but I am very much tangled with these questions in my head.
Do the computers in the client side need java installed for utilizing my web application because I am using JSP ?
How will the computers access my web application after I host it in the server?
What is the procedure to host the application in the server.
I am developing my web application in Netbeans IDE and the server is Tomcat but everything is in my personal computer, very soon I will have to deploy it in actual server and how should I make my web application a stand alone application ( To work without NetBeans IDE ).
No, client only need a web browser.
Client can call your server IP address (http://192.168.1.10/app) or call its domain if you have setup your domain (http://yourdomain.com/app)
You can run your application on any computer (Linux, Windows, Mac, Solaris, BSD, etc.) capable of running Java SE (Standard Edition). Tomcat runs on top of Java SE.

Can you give me an advice about MVC client-server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm going to create a desktop application (Swing) using the MVC. It will be chat and i have some questions. Which classes should be located on client? (View - its logical) Model? Controller? or both classes should be on the server side?
And which classes have to process my database?
If you are planning to have server-client and database access, this sounds like a typical 3-tier distributed system.
Database - represented as DBMS and located potentially on a separate machine. This should provide easy API for queries and updates from the server.
Server - this is where Model is located, again potentially on a different machine than database. Server however has means of working with the database, ideally via the aforementioned API.
Client - contains View and Controller. View is essentially the UI aspect of the Model located on the server. Controller processes user interaction and sends to the server in the processed (clean) form that the server can understand. This is done to reduce server load. The client has no means of accessing the database directly.
If it's all the same to you, I'd recommend to have a look at JavaFX, its MVC is much easier to implement and just plain simple to work with

Monitoring application-specific metrics using JMX and Hyperic [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
My webapp exposes some application-specific metrics (think "orders placed") via JMX, which I'd like to monitor using Hyperic HQ (open source edition).
According to the Hyperic Inventory Model, my Linux server is called a Platform hosting my Tomcat 6 Server, which in turn hosts Services (e.g. "Servlet Monitor") that finally expose Metrics (e.g. "Error Count per Minute").
I assume I need to develop a custom Hyperic plugin (just an XML file, really) that would point the agent and server at the correct JMX MBeans. Ideally, I would like to see my webapp listed as a Service hosted by the Tomcat 6 Server, but looking at the Plugin Development docs, that doesn't seem to be possible.
Maybe that's not too bad anyway, because in theory, I might want to switch my app to Jetty. But I figure that's a very common use case, so are there any best practices? I couldn't really find any examples of this on the web, so I thought I might just ask the experts..
Please note: The Hyperic docs I linked to seem to require an account to view.

Categories