Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

How to create a request redirection from a Web service to a servlet ?  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked about in forum, but did not get an answer.

The browser show that request have sent to the servlet, but еhe client does not receive a response, so there is no redirection to the specified page .

What are you to think about this question?

How is possible to solution this task ?
 
Saloon Keeper
Posts: 5127
135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I advise to refactor your server-side code so that you can call the web service directly. From the SO question I gather that the reason for the redirect is that you want to avoid properly setting up security for the web service - that does not seem like a good reason.
 
alex roman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:I advise to refactor your server-side code so that you can call the web service directly.



What are you mean?

From the SO question I gather that the reason for the redirect is that you want to avoid properly setting up security for the web service - that does not seem like a good reason.



I have two filters on side the server for to check accsess to the  "rest-services"

In order not to create separate security filters for Servlets, I want to redirect all requests through the Web service, and if necessary, send a request to the servlet.
 
alex roman
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after user authentication and authorization, it receives a JWT-token. If the user needs to navigate to a different page, why else would I create filters for the servlet? It is convenient to use web service security filters, and at the endpoint where there is a redirect to the servlet, you can specify the security roles that you can use to move to the next resource.
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!