Which Maven GlassFish plugin to use?

Update: CARGO-491 has been fixed and I’ve updated my answer accordingly. To summarize, there are now basically three options: Maven GlassFish Plugin A first option would be to use the Maven GlassFish Plugin. This plugin allows to interact with a local or remote GlassFish install and the management of Glassfish domains and component deployments from … Read more

OpenSSO/OpenAM alternatives [closed]

Are you integrating existing applications, or do you just want to support your own applications? Are you looking for actual SSO or simply shared credentials? SSO is logging in to a single application, and having that credential propagate to another application (such as logging in to Gmail and being automatically logged in to Blogger). Shared … Read more

How should I log uncaught exceptions in my RESTful JAX-RS web service?

For lack of a better way to implement logging for uncaught JAX-RS exceptions, using a catch-all ExceptionMapper as in Other Ideas: #1 seems to be the cleanest, simplest way to add this functionality. Here’s my implementation: @Provider public class ThrowableExceptionMapper implements ExceptionMapper<Throwable> { private static final Logger log = Logger.getLogger(ThrowableExceptionMapper.class); @Context HttpServletRequest request; @Override public … Read more

How to set response header in JAX-RS so that user sees download popup for Excel?

You don’t need HttpServletResponse to set a header on the response. You can do it using javax.ws.rs.core.Response. Just make your method to return Response instead of entity: return Response.ok(entity).header(“Content-Disposition”, “attachment; filename=\”” + fileName + “\””).build() If you still want to use HttpServletResponse you can get it either injected to one of the class fields, or … Read more

Encoded slash (%2F) with Spring RequestMapping path param gives HTTP 400

for spring-boot, the following did the trick @SpringBootApplication public class Application extends WebMvcConfigurerAdapter { public static void main(String[] args) throws Exception { System.setProperty(“org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH”, “true”); SpringApplication.run(Application.class, args); } @Override public void configurePathMatch(PathMatchConfigurer configurer) { UrlPathHelper urlPathHelper = new UrlPathHelper(); urlPathHelper.setUrlDecode(false); configurer.setUrlPathHelper(urlPathHelper); } }

techhipbettruvabetnorabahisbahis forumu