Questions tagged [servlet-dispatching]

A process of invoking a servlet dispatcher to handle a new URI.

A process of invoking a servlet dispatcher to handle a new URI. It can be forward or include method used by the dispatcher.

If you look at the RequestDispatcher javadoc, you'll see that only two methods are usable.

16 questions
224
votes
8 answers

What is Dispatcher Servlet in Spring?

In this image (which I got from here), HTTP request sends something to Dispatcher Servlet. My Question is what does Dispatcher Servlet do? Is it something like getting the information thrown from the web page and throwing it to the controller?
Kevin
  • 23,174
  • 26
  • 81
  • 111
93
votes
16 answers

No mapping found for HTTP request with URI [/WEB-INF/pages/apiForm.jsp]

My handler forwards to internalresourceview 'apiForm' but then i get error 404 RequestURI=/WEB-INF/pages/apiForm.jsp. I'm sure apiForm.jsp located in /WEB-INF/pages/ 13:45:02,034 DEBUG [org.springframework.web.servlet.view.JstlView] - Forwarding…
cometta
  • 35,071
  • 77
  • 215
  • 324
6
votes
1 answer

Why must a child thread that uses a ThreadPoolExecutor not be exposed to any inherited context of the parent thread?

I have made a component that implements ApplicationListener and should log the ip address, the ip address can be retrieved from HttpServletRequest. Apparently this component is run in a child thread and therefore i needed…
Maurice
  • 6,698
  • 9
  • 47
  • 104
2
votes
2 answers

How is dispatching controlled in JAX-RS?

I'm writing a RESTful Web Service with RESTeasy. This is an implementation of JAX-RS. You annotate a class or method with a single @Path annotation. Regular expressions are used to get path parameters. For…
Mark Lutton
  • 6,959
  • 7
  • 41
  • 57
2
votes
2 answers

Servlet: forward request to Servlet by its name when using annotations instead of web.xml?

I have an entry servlet (called DispatcherServlet) which redirects all incoming GET and POST requests at /* to other servlets depending on a configuration parameter. In order to dispatch the request to other servlets, I use their name instead of a…
Hugo
  • 81
  • 5
1
vote
0 answers

Remove extenal dispatcher servlet and use embeded one in spring boot

We have recently migrated to spring boot 1.5.4 from spring MVC, we have moved the dispatcher servlet from web.xml to bean but now we want to remove this explicit dispatcher servlet and want to use an embedded one. When we removed this bean and…
1
vote
1 answer

JSP Welcome file issue

I have given my welcome file in web.xml But when running my spring application, it is showing 404 error on http://localhost:8080/web_customer_tracker/ I use IntelliJ IDEA, GlassFish 5.0.0, index.jsp file is directly under web folder and web.xml is…
user7729696
1
vote
0 answers

Spring returning 200 with no content and not hitting controller

I have a controller as @Controller @RequestMapping("/v2/**") public class ReactController { @RequestMapping(method = RequestMethod.GET) public String reactEntry() { return "react-entry"; } } When I log into the app and go…
John B
  • 32,493
  • 6
  • 77
  • 98
1
vote
2 answers

Servlet Filter going in infinite loop when FORWARD used in mapping in JSF

I have a filter defined in web.xml like following:- AuthenticationFilter /* REQUEST ERROR
anand
  • 81
  • 1
  • 9
1
vote
3 answers

How to link different Servlet together?

First of all, I did not use Spring MVC. :) :) Just want to get it out first. Now what I have is different JSP pages that making calls to different Servlets. All the pieces work great individually but I kind of need to link them together. If all of…
Thang Pham
  • 38,125
  • 75
  • 201
  • 285
0
votes
1 answer

How to call one war file urls in another war file web.xml in java

I am new to java development. In my project i have multiple .ear files with war files. For example i have first.ear have config.war and transactions.war, and second.ear have employee.war,server.war and webconfig.war files. Now my requirement is…
Durga
  • 545
  • 7
  • 21
  • 39
0
votes
1 answer

A new Spring ServletDispatcher/ HandlerMapping redirect request based on domain name

I'm using Spring + Gradle + PostgreSQL, and I want to write a new Spring ServletDispatcher or HandlerMapping (I don't know which one is the best choice). The requirement is: Redirect the HTTP request to different controller according to it's sub…
zhy1378
  • 329
  • 1
  • 2
  • 7
0
votes
0 answers

Two different authenticationManagers for two different dispatcherServlet

In my web.xml I have two different dispatcher servlets, one of them has all beans from root context, second dispatcher servlet has another authenticationManager. as sayed: In the Web MVC framework, each DispatcherServlet has its own…
Yuriy
  • 1,370
  • 4
  • 14
  • 30
0
votes
1 answer

spring mvc annotation many servlet dispatcher

Hi I am just starting to learn Spring mvc, I use spring mvc @annotation and I have 3 servlets dispatchers (appservlet, admin, student): web.xml
mrmadou
  • 101
  • 4
  • 14
-1
votes
2 answers

How to forward the HttpServletRequest and HttpServletResponse object to another service?

I have built a service to extract various details like header, request uri, status code etc from an HttpServletRequest and HttpServletResponse object. I want to extract this information and store it in mongo. Now, I have other services with a…
1
2