JSP sending a String to a "mini App" and calls that program too.
The solution for my question is related to a JSP and that is the reason why I have posted it hear.
"JSP sending a String to a "mini App" and calls that program too."
Please see further details:
There are many ways on how we can print within a web based java program since there's crystal reports, poi, jasper and even an applets.
Now here's my scenario. I have a web app that can print an O.R. (Official Receipt) wherein there's an embeded applet and my mission now is to find other ways to the job without using (applet) those.
What I did and what I currently have is
1.) Server application that uses socket and waits for SaleID
2.) a Client Side application that sends a saleID to the server.
- Server app is running and is waiting for a client connection.
- A client that is currently connected sends a saleID(long).
- Server recieves the saleID and searches the DB for the saleDetails.
- Once server has the saleDetails, it sends it back to the client in a form of a String.
- Client recieves the String and prints it with the use of a connected printer.
(To make it simple, the Server/Client application is comparable with a chat client)
Now what I have in mind is to integrate it within our web application.
What will happen is
Client uses a web browser to connect to the server's web application and creates a sale.
Once a client finishes a sale within an HTML page,
- this html/jsp should send the "sale id" to a running "mini Client Application"
(ex. a button within an HTML page sends an information to our running "mini Client Application").
- running "mini Client Application" communicates to the "mini server App" and gives the saleID.
- "mini server application" searches for the sale within the database.
- "mini server application" sends back the sale details in a form of a String back to the 'mini client application".
- "mini client application" recieves the sale details and prints it to a connected printer.
Server - runs our Web App (e.g. socket 8080)
- runs a mini Server App (e.g. socket 5000)
Client - runs a web browser.
- runs a mini client application that connects to the "mini server app".
How can we implement that our html/jsp sends information to our running "mini Client Application".
If there are any other information needed in order to rectify my posting, please donít hesitate to reply (comments, suggestion or clarification).