E
El Durango
Hi I am working on a project that requires Java Servlets and need some
professional advice.
The application requires a servlet to act as an "operator" which sends and
recieves messages between other Servlets or Applications. I need to have
this servlet be able to interface with another servlet as well as an
application. I setup a Java app to communicate with it, however I need the
app to recieve the specific message that the servlet produces rather than
its html output.
There are many different approaches to accomplishing something like this:
I am sure I can define sockets on both the servlet side and the application
side and communicate at a "lower level", but I don't want to take that route
because it may cause issues later on (Firewall). Another thing is that I
should not need to make any server configurations or system configurations
(example: change webserver ports or configure tomcat,setup RMI).
One option that I already have thought of is to pass variables between the
"operator" servlet and other servlets/apps via HTTP. This method should
work, however I would rather access and call methods between each other
rather than pass the variables around.
Now I am open to all suggestions even if they do break any of the previous
constraints, however I would like to take the "easiest and least painful"
route if there is such a thing I hope that you may know about
something I may have overlooked, at the moment I am still researching for
the best possible method to accomplish this. I have read about interservlet
communication but did not find anything that would satisfy communication
with another java application.
Note: all communication has to be bi-directional.
Any suggestions would be welcome.
thank you.
professional advice.
The application requires a servlet to act as an "operator" which sends and
recieves messages between other Servlets or Applications. I need to have
this servlet be able to interface with another servlet as well as an
application. I setup a Java app to communicate with it, however I need the
app to recieve the specific message that the servlet produces rather than
its html output.
There are many different approaches to accomplishing something like this:
I am sure I can define sockets on both the servlet side and the application
side and communicate at a "lower level", but I don't want to take that route
because it may cause issues later on (Firewall). Another thing is that I
should not need to make any server configurations or system configurations
(example: change webserver ports or configure tomcat,setup RMI).
One option that I already have thought of is to pass variables between the
"operator" servlet and other servlets/apps via HTTP. This method should
work, however I would rather access and call methods between each other
rather than pass the variables around.
Now I am open to all suggestions even if they do break any of the previous
constraints, however I would like to take the "easiest and least painful"
route if there is such a thing I hope that you may know about
something I may have overlooked, at the moment I am still researching for
the best possible method to accomplish this. I have read about interservlet
communication but did not find anything that would satisfy communication
with another java application.
Note: all communication has to be bi-directional.
Any suggestions would be welcome.
thank you.