<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>JAX-RS on ARI Systems</title>
    <link>https://aripd.com/tags/jax-rs/</link>
    <description>Recent content in JAX-RS on ARI Systems</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>ARI Systems</copyright>
    <lastBuildDate>Sat, 16 May 2026 06:19:44 +0000</lastBuildDate>
    <atom:link href="https://aripd.com/tags/jax-rs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>RESTfu­l</title>
      <link>https://aripd.com/blog/restful/</link>
      <pubDate>Sat, 15 Dec 2018 00:00:00 +0000</pubDate>
      <guid>https://aripd.com/blog/restful/</guid>
      <description>&lt;h2 id=&#34;references&#34;&gt;References &lt;a href=&#34;#references&#34; class=&#34;permalink&#34;&gt;&lt;i class=&#34;bi bi-link-45deg&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://dennis-xlc.gitbooks.io/restful-java-with-jax-rs-2-0-en/cn/part1/chapter7/exception_handling.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;RESTfu­l Java­ with ­JAX-­RS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;exception-handling&#34;&gt;Exception Handling &lt;a href=&#34;#exception-handling&#34; class=&#34;permalink&#34;&gt;&lt;i class=&#34;bi bi-link-45deg&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;JAX-RS 2.0 has added a nice exception hierarchy for various HTTP error conditions. So, instead of creating an instance of &lt;code&gt;WebApplicationException&lt;/code&gt; and initializing it with a specific status code, you can use one of these exceptions instead.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;table class=&#34;table table-hover&#34;&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Exception&lt;/th&gt;&#xA;          &lt;th&gt;Status Code&lt;/th&gt;&#xA;          &lt;th&gt;Description&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;BadRequestException&lt;/td&gt;&#xA;          &lt;td&gt;400&lt;/td&gt;&#xA;          &lt;td&gt;Malformed message&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;NotAuthorizedException&lt;/td&gt;&#xA;          &lt;td&gt;401&lt;/td&gt;&#xA;          &lt;td&gt;Authentication failure&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;ForbiddenException&lt;/td&gt;&#xA;          &lt;td&gt;403&lt;/td&gt;&#xA;          &lt;td&gt;Not permitted to access&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;NotFoundException&lt;/td&gt;&#xA;          &lt;td&gt;404&lt;/td&gt;&#xA;          &lt;td&gt;Couldn’t find resource&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;NotAllowedException&lt;/td&gt;&#xA;          &lt;td&gt;405&lt;/td&gt;&#xA;          &lt;td&gt;HTTP method not supported&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;NotAcceptableException&lt;/td&gt;&#xA;          &lt;td&gt;406&lt;/td&gt;&#xA;          &lt;td&gt;Client media type requested not supported&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;NotSupportedException&lt;/td&gt;&#xA;          &lt;td&gt;415&lt;/td&gt;&#xA;          &lt;td&gt;Client posted media type not supported&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;InternalServerErrorException&lt;/td&gt;&#xA;          &lt;td&gt;500&lt;/td&gt;&#xA;          &lt;td&gt;General server error&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;ServiceUnavailableException&lt;/td&gt;&#xA;          &lt;td&gt;503&lt;/td&gt;&#xA;          &lt;td&gt;Server is temporarily unavailable or busy&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&#xA;&lt;h2 id=&#34;common-options&#34;&gt;Common Options &lt;a href=&#34;#common-options&#34; class=&#34;permalink&#34;&gt;&lt;i class=&#34;bi bi-link-45deg&#34;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;-#, --progress-bar&lt;/code&gt;&#xA;Make curl display a simple progress bar instead of the more informational standard meter.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
