开发者

Converting java application to web service in netbeans

开发者 https://www.devze.com 2023-03-19 16:06 出处:网络
I have recently created a java application(calculator) 开发者_如何学Cin netbeans and need to make it into a web service. How do i convert it?You should take a look at the Java API for RESTful Webservi

I have recently created a java application(calculator) 开发者_如何学Cin netbeans and need to make it into a web service. How do i convert it?


You should take a look at the Java API for RESTful Webservices (JAX-RS). You can easily convert a basic POJO into a webservice using annotations (http://download.oracle.com/javaee/6/tutorial/doc/gilik.html#gilru).

Of course, if your calculator application is just a standalone Java application (ie. main method running through command such as 'java calculator') you will have to setup a web application and run it in a web container. Check out http://download.oracle.com/javaee/1.4/tutorial/doc/WebApp.html for details on getting started with Java web applications. Check out GlassFish (http://glassfish.java.net/), Tomcat (http://tomcat.apache.org/) or Jetty (http://www.mortbay.org/) for some web container options.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号