{"id":455,"date":"2023-12-05T09:26:02","date_gmt":"2023-12-11T17:01:47","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"},"modified":"2025-07-31T23:43:53","modified_gmt":"2025-07-31T14:43:53","slug":"java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","title":{"rendered":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"},"content":{"rendered":"<p>Java Web\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3078\u3088\u3046\u3053\u305d\u3002\u3053\u3053\u3067\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u3064\u3044\u3066\u5b66\u3073\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u304a\u3051\u308b\u6709\u7528\u306a\u6982\u5ff5\u3001\u305d\u3057\u3066Java\u3067\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u3055\u307e\u3056\u307e\u306aAPI\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h3>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3068\u306f\u4f55\u3067\u3059\u304b\u3002<\/h3>\n<p>\u7c21\u5358\u306b\u8a00\u3048\u3070\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30b5\u30fc\u30d3\u30b9\u3092\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3068\u547c\u3073\u307e\u3059\u3002\u3067\u306f\u3001\u305d\u308c\u306f\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u3069\u306e\u3088\u3046\u306b\u7570\u306a\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3082\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u4ecb\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3055\u308c\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u9055\u3044\u3092\u660e\u78ba\u306b\u3059\u308b\u3044\u304f\u3064\u304b\u306e\u5c5e\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Web applications are meant for users and to be accessed in browser having human readable format whereas web services are meant for applications to access data in the format of XML, JSON etc.<\/li>\n<li>Web applications always use HTTP\/HTTPS protocol whereas traditional web services use SOAP protocol. Recently REST is getting popularity that is an architecture style and almost all times run on HTTP\/HTTPS protocol.<\/li>\n<li>Web applications are not meant for reusability whereas this is one of the benefit of web services. A single web service can be used by different kinds of applications.<\/li>\n<li>Web application can access web services to access some data or to perform some tasks, web services can\u2019t access web applications to fetch some data.<\/li>\n<li>Web applications are capable to maintain user session, web services are stateless.<\/li>\n<\/ul>\n<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u9055\u3044\u304c\u5341\u5206\u306b\u660e\u78ba\u306b\u306a\u308a\u3001\u6df7\u4e71\u304c\u89e3\u6d88\u3055\u308c\u308b\u3053\u3068\u3092\u9858\u3063\u3066\u3044\u307e\u3059\u3002\u4e21\u8005\u306f\u7570\u306a\u308b\u6982\u5ff5\u3067\u3042\u308a\u3001\u7570\u306a\u308b\u76ee\u7684\u306e\u305f\u3081\u306b\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u7a2e\u985e<\/h3>\n<p>\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u306f2\u3064\u306e\u30bf\u30a4\u30d7\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>SOAP: SOAP\u306fSimple Object Access Protocol\u306e\u7565\u3067\u3059\u3002SOAP\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u8a2d\u8a08\u3068\u958b\u767a\u306b\u4f7f\u7528\u3055\u308c\u308b\u3001XML\u30d9\u30fc\u30b9\u306e\u696d\u754c\u6a19\u6e96\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u3059\u3002XML\u30d9\u30fc\u30b9\u306a\u306e\u3067\u3001\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3084\u8a00\u8a9e\u306b\u4f9d\u5b58\u305b\u305a\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30b5\u30fc\u30d0\u30fc\u306fJAVA\u30d9\u30fc\u30b9\u3067\u3042\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f.NET\u3084PHP\u306a\u3069\u3067\u3042\u3063\u3066\u3082\u3001\u4e92\u63db\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>REST: REST\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u958b\u767a\u306b\u304a\u3051\u308b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u30b9\u30bf\u30a4\u30eb\u3067\u3059\u3002\u6700\u8fd1\u4eba\u6c17\u304c\u9ad8\u307e\u3063\u3066\u3044\u308b\u7406\u7531\u306f\u3001SOAP\u3068\u6bd4\u8f03\u3057\u3066\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u4f4e\u3044\u304b\u3089\u3067\u3059\u3002\u30ea\u30bd\u30fc\u30b9\u306fRestful\u306a\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u5fc3\u7684\u306a\u6982\u5ff5\u3067\u3042\u308a\u3001URI\u306b\u3088\u3063\u3066\u4e00\u610f\u306b\u8b58\u5225\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>Java\u306e\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9<\/h2>\n<p>Java\u306f\u72ec\u81ea\u306eAPI\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u3001SOAP\u304a\u3088\u3073REST\u306e\u4e21\u65b9\u306e\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>JAX-WS\uff08\u30b8\u30e3\u30c3\u30af\u30b9\u30fb\u30c0\u30d6\u30ea\u30e5\u30fc\u30a8\u30b9\uff09\u306f\u3001Java API for XML Web \u30b5\u30fc\u30d3\u30b9\u306e\u7565\u3067\u3059\u3002JAX-WS\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u30b5\u30fc\u30d0\u30fc\u3084\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306eXML\u30d9\u30fc\u30b9\u306eJava API\u3067\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>JAX-RS\uff08\u30b8\u30e3\u30c3\u30af\u30b9\u30fb\u30a2\u30fc\u30eb\u30a8\u30b9\uff09\u306f\u3001RESTful Web \u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306eJava API\u3067\u3042\u308a\u3001Java API for RESTful Web \u30b5\u30fc\u30d3\u30b9\u306e\u7565\u3067\u3059\u3002JAX-RS\u306f\u3001\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u958b\u767a\u3068\u5c55\u958b\u3092\u7c21\u7d20\u5316\u3057\u307e\u3059\u3002<\/ol>\n<p>\u3053\u308c\u3089\u306eAPI\u306f\u4e21\u65b9\u3068\u3082\u6a19\u6e96\u306eJDK\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u4e00\u90e8\u3067\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306fJAR\u30d5\u30a1\u30a4\u30eb\u3092\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e2\u3064\u306eAPI\u306f\u3069\u3061\u3089\u3082\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u975e\u5e38\u306b\u591a\u304f\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3>\u3053\u3093\u306b\u3061\u306f\u3001\u4e16\u754c\u306eJAX-WS\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/h3>\n<p>\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306aHello World JAX-WS\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002TestService.java\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jaxws.service;\r\n\r\nimport javax.jws.WebMethod;\r\nimport javax.jws.WebService;\r\nimport javax.jws.soap.SOAPBinding;\r\nimport javax.xml.ws.Endpoint;\r\n\r\n@WebService\r\n@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)\r\npublic class TestService {\r\n\r\n\t@WebMethod\r\n\tpublic String sayHello(String msg){\r\n\t\treturn \"Hello \"+msg;\r\n\t}\r\n\t\r\n\tpublic static void main(String[] args){\r\n\t\tEndpoint.publish(\"https:\/\/localhost:8888\/testWS\", new TestService());\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u305d\u308c\u3067\u4ee5\u4e0a\u3067\u3059\u3002\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3001\u79c1\u305f\u3061\u306eHello World JAX-WS SOAP\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u304c\u516c\u958b\u3055\u308c\u307e\u3059\u3002\u4e0b\u306e\u753b\u50cf\u306fSOAP UI\u3092\u4ecb\u3057\u3066\u3053\u306eJAX-WS\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u547c\u3073\u51fa\u3059\u69d8\u5b50\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u304cJAX-WS\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u975e\u5e38\u306b\u57fa\u672c\u7684\u306a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u5185\u5bb9\u3067\u3059\u3002SOAP\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3068JAX-WS\u306e\u7406\u89e3\u3092\u6df1\u3081\u308b\u305f\u3081\u306b\u8aad\u3080\u3079\u304d\u8a18\u4e8b\u3082\u4ee5\u4e0b\u306b\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>JAX-WS\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>Tomcat\u3067\u306eJAX-WS Web\u30b5\u30fc\u30d3\u30b9\u306e\u5c55\u958b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>Eclipse\u3068Apache Axis\u3092\u4f7f\u7528\u3057\u305fSOAP Web\u30b5\u30fc\u30d3\u30b9\u306e\u4f8b<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>Apache Axis 2 Web\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/ol>\n<h3>\u3053\u3093\u306b\u3061\u306f\u3001\u30ef\u30fc\u30eb\u30c9 JAX-RS \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3<\/h3>\n<p>Jersey\u306fJAX-RS API\u306e\u57fa\u6e96\u5b9f\u88c5\u3067\u3042\u308a\u3001\u6a19\u6e96\u306eJDK\u306e\u4e00\u90e8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5fc5\u8981\u306ajar\u30d5\u30a1\u30a4\u30eb\u3092\u3059\u3079\u3066\u542b\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u6700\u826f\u306e\u65b9\u6cd5\u306fMaven\u30d3\u30eb\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3042\u308a\u3001Eclipse\u3067\u7c21\u5358\u306a\u52d5\u7684Web\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092Maven\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306b\u5fc5\u8981\u306a\u4f9d\u5b58\u95a2\u4fc2\u3092\u6301\u3064\u6700\u7d42\u306epom.xml\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;project xmlns=\"https:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"https:\/\/maven.apache.org\/POM\/4.0.0 https:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\r\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\r\n\t&lt;groupId&gt;JAX-RS-HelloWorld&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;JAX-RS-HelloWorld&lt;\/artifactId&gt;\r\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\r\n\t&lt;packaging&gt;war&lt;\/packaging&gt;\r\n\t\r\n\t&lt;dependencies&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;com.sun.jersey&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jersey-server&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;1.19&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t\t&lt;dependency&gt;\r\n\t\t\t&lt;groupId&gt;com.sun.jersey&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;jersey-servlet&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;1.19&lt;\/version&gt;\r\n\t\t&lt;\/dependency&gt;\r\n\t&lt;\/dependencies&gt;\r\n\t\r\n\t&lt;build&gt;\r\n\t\t&lt;sourceDirectory&gt;src&lt;\/sourceDirectory&gt;\r\n\t\t&lt;plugins&gt;\r\n\t\t\t&lt;plugin&gt;\r\n\t\t\t\t&lt;artifactId&gt;maven-war-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;2.6&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;warSourceDirectory&gt;WebContent&lt;\/warSourceDirectory&gt;\r\n\t\t\t\t\t&lt;failOnMissingWebXml&gt;false&lt;\/failOnMissingWebXml&gt;\r\n\t\t\t\t&lt;\/configuration&gt;\r\n\t\t\t&lt;\/plugin&gt;\r\n\t\t\t&lt;plugin&gt;\r\n\t\t\t\t&lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\r\n\t\t\t\t&lt;version&gt;3.3&lt;\/version&gt;\r\n\t\t\t\t&lt;configuration&gt;\r\n\t\t\t\t\t&lt;source&gt;1.7&lt;\/source&gt;\r\n\t\t\t\t\t&lt;target&gt;1.7&lt;\/target&gt;\r\n\t\t\t\t&lt;\/configuration&gt;\r\n\t\t\t&lt;\/plugin&gt;\r\n\t\t&lt;\/plugins&gt;\r\n\t&lt;\/build&gt;\r\n&lt;\/project&gt;\r\n<\/code><\/pre>\n<p>\u4eca\u3001\u30d5\u30ed\u30f3\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u3057\u3066Jersey\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u30e1\u30f3\u30c8\u8a18\u8ff0\u5b50\u306eweb.xml\u306b\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;web-app xmlns:xsi=\"https:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n\txmlns=\"https:\/\/xmlns.jcp.org\/xml\/ns\/javaee\"\r\n\txsi:schemaLocation=\"https:\/\/xmlns.jcp.org\/xml\/ns\/javaee https:\/\/xmlns.jcp.org\/xml\/ns\/javaee\/web-app_3_1.xsd\"\r\n\tid=\"WebApp_ID\" version=\"3.1\"&gt;\r\n\t&lt;display-name&gt;JAX-RS-HelloWorld&lt;\/display-name&gt;\r\n\r\n\t&lt;servlet&gt;\r\n\t\t&lt;servlet-name&gt;Jersey REST Service&lt;\/servlet-name&gt;\r\n\t\t&lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;\/servlet-class&gt;\r\n\t\t&lt;init-param&gt;\r\n\t\t\t&lt;param-name&gt;com.sun.jersey.config.property.packages&lt;\/param-name&gt;\r\n\t\t\t&lt;param-value&gt;com.scdev.jaxrs.service&lt;\/param-value&gt;\r\n\t\t&lt;\/init-param&gt;\r\n\t\t&lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\r\n\t&lt;\/servlet&gt;\r\n\t&lt;servlet-mapping&gt;\r\n\t\t&lt;servlet-name&gt;Jersey REST Service&lt;\/servlet-name&gt;\r\n\t\t&lt;url-pattern&gt;\/*&lt;\/url-pattern&gt;\r\n\t&lt;\/servlet-mapping&gt;\r\n&lt;\/web-app&gt;\r\n<\/code><\/pre>\n<p>\u521d\u671f\u8a2d\u5b9a\u306b\u306f\u4e0a\u8a18\u306e2\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u304c\u5fc5\u8981\u3067\u3059\u3002\u4e0b\u306b\u306f\u79c1\u305f\u3061\u306eHello World JAX-RS\u30b5\u30fc\u30d3\u30b9\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jaxrs.service;\r\n\r\nimport javax.ws.rs.GET;\r\nimport javax.ws.rs.Path;\r\nimport javax.ws.rs.PathParam;\r\n\r\n@Path(\"\/test\")\r\npublic class TestService {\r\n\r\n\t@GET\r\n\t@Path(\"\/hello\/{msg}\")\r\n\tpublic String sayHello(@PathParam(value=\"msg\") String msg){\r\n\t\treturn \"Hello \"+msg;\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u305f\u3060\u3057\u3001\u4ee5\u4e0b\u306e\u753b\u50cf\u306b\u793a\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u3001WAR\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002URL\u306e\u6700\u5f8c\u306e\u90e8\u5206\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u8fd4\u3055\u308c\u308b\u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u5909\u308f\u308a\u307e\u3059\u3002JAX-RS API\u3092\u4f7f\u7528\u3057\u3066RESTful Web\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u306e\u306f\u975e\u5e38\u306b\u7c21\u5358\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u308c\u306b\u306f\u3055\u3089\u306b\u9032\u3080\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u3055\u3089\u306b\u5b66\u7fd2\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u30ec\u30b9\u30c8\u30d5\u30eb\u306aWeb\u30b5\u30fc\u30d3\u30b9<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>RESTEasy\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>Jersey\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/ol>\n<p>\u3053\u308c\u3067Java\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u7c21\u5358\u306a\u7d39\u4ecb\u306f\u7d42\u308f\u308a\u3067\u3059\u3002\u6700\u5f8c\u306b\u3001\u3082\u3057\u9762\u63a5\u306e\u6e96\u5099\u3092\u3057\u3066\u3044\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306e\u9762\u63a5\u8cea\u554f\u306b\u76ee\u3092\u901a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u53c2\u8003\u8cc7\u6599\uff1aJAX-WS Oracle \u30da\u30fc\u30b8\u3001JAX-RS Oracle \u30da\u30fc\u30b8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java Web\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3078\u3088\u3046\u3053\u305d\u3002\u3053\u3053\u3067\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u3064\u3044\u3066\u5b66\u3073\u3001\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u306b\u304a\u3051\u308b\u6709\u7528\u306a\u6982\u5ff5\u3001\u305d\u3057\u3066Java\u3067\u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u3055\u307e\u3056\u307e\u306aAPI\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3059\u3002 \u30a6\u30a7\u30d6\u30b5\u30fc\u30d3\u30b9\u3068 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u306eweb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" \/>\n<meta property=\"og:description\" content=\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/java\u306eweb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-11T17:01:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T14:43:53+00:00\" \/>\n<meta name=\"author\" content=\"\u5149, \u660e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5149, \u660e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"15\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"name\":\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-12-11T17:01:47+00:00\",\"dateModified\":\"2025-07-31T14:43:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\"},\"description\":\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\",\"name\":\"\u5149, \u660e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"caption\":\"\u5149, \u660e\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","description":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/java\u306eweb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_locale":"ja_JP","og_type":"article","og_title":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb","og_description":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/java\u306eweb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-12-11T17:01:47+00:00","article_modified_time":"2025-07-31T14:43:53+00:00","author":"\u5149, \u660e","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u5149, \u660e","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"15\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","name":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-12-11T17:01:47+00:00","dateModified":"2025-07-31T14:43:53+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55"},"description":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Java\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55","name":"\u5149, \u660e","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","caption":"\u5149, \u660e"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/java%e3%81%aeweb%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":40836,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions\/40836"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}