Architecture of a simple JAVA EE app [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 7 years ago.
Improve this question
I was given the task - to create a simple JAVA EE web-application that have the following functionality:
It had an index page
I choose an algorithm and enter parameters for it on index page
Depending on chosen algorithm a statistical .csv file will be processed on its own way.
After processing the .csv file in compliance with entered parameters and chosen algorithm I get a table where I can find processed data.
I know that it's a very simple application but I don't know what to do - architecture, what kind of web layer and etc

If you install Apache Tomcat on your computer, and then run it, you will find a lot of simple examples, many of which will come close to what your are asking. Plus, once you install it, you have a server on which to run your new code. I would recommend you start there.
Apache Tomcat

I would say that if you really want simplicity, you go with just Servlets for the server-side processing, and JSP pages for the HTML views. I know, it's "vintage" almost, but will get you running in no time and without the need for any special "architecture" or framework besides the servlets API.
You can build your app as a War file with the tool of your choice and deploy it in a Tomcat server and that's it.

Related

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 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.

How to web scrape on server side? [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 not sure if the title says what I needed. But that's the best way I can put it.
My requirement: I want to check if a series of engine numbers (of vehicles) are registered with the local transportation authority. They have provide a web-interface for this task, but I can only check for a single engine number at once. Usually I need to check over 200 numbers. So, its a humongous task to check each one individually.
A couple of years ago, I have created a small standalone python script to do this automatically using web scraping, but now I want to do this on a server.
A user gives all the numbers in the text file which they upload/paste the contents in to a text field. Then I'll have to submit the form on the transportation website (using web scraping) for each number and display a final status for all of them.
What I want to know is how to do this on a server? What technologies could be helpful. I'm comfortable with Java & JavaScript. I don't know PHP (But i can learn if needed). I don't have slightest Idea how to do this on server side. Any Ideas and Help is greatly appreciated.
Thanks.
Java has a library called JSoup, which provides a mostly-familiar api that uses css selectors.
And obviously there are built-in functions that can get you the html from a given URL.
Put those together and you've got a server-side scraper
[edit]
Your question, on a re-read, isn't just about scraping -- it's about how to automatically submit an html form from within Java to an external server. This is an interesting question, one I've wondered myself.
this may be an answer: How to send post form with java?

How to create webservices with struts2 in Eclipse or in Netbeans? [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
please help me to creating webservice with struts 2 either be using of Eclipse or be using of Netbeans.
First you need to know to basic idea behind Web Services and how it works:
A short introduction to Web Services
Then, you need to generate Java classes from the given WSDL file(if there is one, otherwise you need to communicate through SOAP directly):
Creating Java Classes from WSDL file using Apache Axis 2
Generating Java code from a WSDL document
Note: The reference given using Apache Axis 2. There are others ways to do the same task this one of them.
Also, you need to deal with Certificates issue (if it is required). I can not tell much about it. Since, it depends on your case.
Now you can work with your Java application, where you need to establish SSL connection, send requests and receive response from the Server you are requesting services form it.

Categories