Running java program from web page [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
This is the first time I am asking a question here, so forgive me if it is a bit confusing.
I have a java app that writes a word in txt file when started. Now I want to have a button on a web page, and when I click it I want my java app to start. Pretty much I can not figure out how to start java app from web page. If anyone can help I would be really greatful.

There are several way to do this with java.
One way is to do it with Java Servlet.
You need a html form with an action that points to a Servlet (an extended Java Class)
Have a look at this tutorial

As per your question, Java Web Start (JWS) will be a good choice. Just create a .jnlp file along with your jar and then you can start a Java program through a web page

Related

How to run Java Code with html..? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am starting to build my first website with Angular&Bootstrap. I am using the Spring Tool Suite. So far my website looks pretty boring but learning CSS takes me a while.
On my website I have an input (style=file) and a button to submit. So far I managed to press a button to upload a file. I can see is as a String in the console when I log it, its working.
Now to the point where I need help:
I got a java-program that I have to use which gets the path to an XML-File and parses it. It checks if it has the right special format and reads it in. This is only a part of the whole program.
How can I use this in my Code to upload an XML-File and then check it and read it with this program? How do I use the Java-Code? So far I am only using HTML, CSS and Javascript.
Thank you for your help!
There are two options precisely available for you:
1) convert the logic which is in Java to Java script
Or
2) make it a web application and run it on tomcat(or a similar web server)
There are others too but there are a bit heavy to understand and implement.

Enabling a completed Java app on the web [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 am not a Java pro. I need to enable my completed java applications to ONLINE-Versions. Kindly give me the simplest way.
I have tried to go the JSP and Servlet way, but seems exceedingly tiresome,there surely ought to be a direct way.
When you use a typical web application what do you think is happening? You're in a browser and it's displaying some pages. You click around and some server does some work, for example Amazon shows you a list of books you could buy, the server is passing data to the browser for it to display.
That's a big difference from your current Java Application where everything is happening in the same computer.
This split between the UI part of the application, in the Browser, and the server part that's doing the real business is one reason why Web programming is so different from simple Java programming.
Servlets and JSPs are the traditional Java way of doing things, but modern web apps make much greater use of JavaScript for all the UI and all the Java (or any other server technology) does is provide the data displayed by JavaScript.
Bottom line: Sorry, but there is a whole lot more to learn. My recommendation would be to grit your teeth and forget about what you've done so far and start studying JavaScript and HTML.

Please suggest approach for Java-based web app [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 8 years ago.
Improve this question
I'm a Java developer that hasn't coded in about 5 years and wants to polish up my skills. I am going to create a small app that uses an OAuth 2.0 authentication flow and then makes a few REST calls and displays the results. I've got my credentials setup with the OAuth provider.
I used Eclipse back in the day, is that still a solid IDE for this type of project? If I want to share the app with others to show my work, where could I host the code?
Thanks for these and any other pointers.
first off - yes, Eclipse if still a good choice.
if you can, make you app a web-application, and then you can host it in PaaS such as Google AppEngine. then the app itself will be always accessible from any machine that is connected to the web. this way, you will be able to show it to anyone you want.
if you only want to show the code, then GitHub or Google Code are a good choices.
HTH

Access website without browser [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
I am just learning java. I just want to make a simple application to access a web-site.
there is a website onto which i want to log-in through java:
and then interact with it through my interface, basically after log in, i would be writing in some text boxes and sending it.
I tried many places to do it, studied HTTP protocol but still cant make it.
can someone help me out?
Accessing a web site, logging in and interacting with forms on it is somewhat complex work, so it might not be the best choice for a first java project.
But if you want to do it, you should probably use Apache HttpComponents/HttpClient.
There are useful examples at the above link as well, which may help you get started.

Web and database programming with java [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 want to create a Java web application/applet/servlet that does this when the page loads:
Displays "Hello"
Under that, has a box to enter text
Under that, has a button that says OK.
When the user presses OK, I want the text to be saved, and then put into a Microsoft Access database.
This is a vastly simplified version of my real program, but I believe that if I figure out these basic tasks I can complete my actual program. Thanks.
You can check the Java Servlet technology from the Java EE 6 tutorial.
It has some examples at the end of each chapter(check the hello2 example at Part II chapter 3).
For the database you can check JDBC tutorial

Categories