This week's book giveaway is in the Go forum.
We're giving away four copies of Head First Go and have Jay McGavren on-line!
See this thread for details.
Win a copy of Head First Go this week in the Go 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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: 5288
143
  • 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.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!