This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am planning to create a web based project and need some inputs on the best possible approach for building things up. The below is a brief description of the project I am planning to work on.
I have a Java Swing based client server (RMI) application. I need to create some web pages those will interact with this application. I can host this web pages on some web server and those can interact with the application via a web service. The communication will carry exhaustive information to and fro. The requests sent from the web pages will push some relevant information to application server and the server will in turn generate output for the request and return it back to the web page. The web page then displays the data in well formatted way which can be changed by the user on the fly. This change in view will not trigger new request to application server unless the information is incomplete to achieve requested view.
Can any one suggest me best possible way to write something like this? I just need to know the best components to write each piece of code. (e.g. ajax, jsp, servlets, jsf, etc etc..)
for me the requirement seems weird....... If all you want is to create a program which will send some data via web page to the server and show some response then a normal web application(servlets and jsp's) deployed over Tomcat will do the job. i dont know why you need a web service here. If you post your actual requirement(without the design details as mentioned on your post ) then it will be much easier for us to help......
OCP Java SE 6 Programmer, OCP Java EE 5 Web Component Developer, OCE Java EE 6 Web Services Developer, VMware Certified Core Spring 3.x Developer, EMC Proven Professional (ISM-V2)
Rahul V Dixit
Joined: Jan 22, 2009
Thanks Avinash for the reply here are some more details that you asked for.
Here when I say that I want to send response from web page to the server, the server is the application (the swing based RMI app and not TOMCAT). This server is going to do the response generation and give out the result back to the web page.
I am trying to post the requirements here, though these are a bit abstract. The product I work on is a banking application so it needs adequate amount of security while it communicates to the server. The web pages are to be created for reports. So the user requests so report with some selection criteria (which is selected on web page) this information is passed to app server. The app server generates report and sends back to web page. Now the webpage should be built with lightweight components so as to make any modifications on the web page reflect faster (since the data can be huge).
Hope this makes the requirement clear than before.
So you already have a functioning server, do you? Then what you need to do is this:
(1) Get hold of the documentation which explains how to send requests to that server.
(2) Write code in your new web application's servlets which sends requests according to that protocol.
Of course we can't help you with step 1. But once you get to step 2, if you're having problems which you can describe to us, then that's what we're here for.
Rahul V Dixit
Joined: Jan 22, 2009
I think here the confusion is about the server. Lets assume I do not have any server, lets just say that its an application which will do something and give out data based on the request received from the web page.
Does this one make sense? I can manage the interactions between the web page and the server using the web services (I pretty much have the idea on this). Can you please help me with the kind of things I need to write to create the web page? This needs to be light weight component and should be able to refresh the entire data and formatting quite quickly on the web page.