Page 1 of 1

SFS Pro with Jetty/Tomcat, how to?

Posted: 05 Jan 2012, 01:42
by Hatta
Good evening.
I have a little 'in doubt regarding the ability to use:
  • Embedded Jetty Web Server
  • External HTTP Web Services
with the Java programming language.

Is there any article that shows a practical example? I try to explain. If I wanted to write a servlet and use Jetty, where it creates the folder containing the files web.xml and .class, and how everything is configured to use it?

Vice versa, if I wanted to use a separate server such as Tomcat installed on another machine, how can I communicate with the serverside extension -> servlet or servlet -> serverside extension? Using socket or Is there some instructions above API SFS ?

One last question. Wanting to manage the registration / login users, there is a safer solution than the other? In the best way to manage transactions with external servers to DB or the serverside extension?

I hope I was clear.
Thank you and sorry for bad English, I'm Italian.

Posted: 05 Jan 2012, 13:07
by Hatta
Ok, I solved for Jetty (I don't know this web serve. I simply look a little 'files already exist).

It remains only the problem of using servlets present on another server.
Thx

Posted: 17 Jan 2012, 22:52
by Lapo
Calling other servlets is fairly more complicated and poses scalability issues (under heavy traffic the external webserver can become a significant bottleneck) I would recommend to use Jetty if possible. Jetty is a fully featured servlet container just as Tomcat etc...

If you want to go with the external HTTP server you will need an extra library that takes care of HTTP calls from SFS to Tomcat.
http://hc.apache.org/httpclient-3.x/