Debugging Skills Matters Deadly,But People Often Speak About Rarely

Hey Folks !!!
Thanks for giving complementary solution as quick as possible any way.
I am merely seeking for improving debugging skill w.r.t to my language(java).
If anyone have any depth view, please push towards me.
Suppose I am working in spring mvc.In spring boot it is handled by framework itself.
But internally how end user sending request to DispatcherServlet through spring thymeleaf as view.
1.Why handler mapping collect controller id to pushing data towards controllers etc. ?
2.Why it create two ioc container to inject meance dispatcherServlet.xml and applicationcontext.xml??3.Why Multiple url handller mapping and controller are there internally ??

I am trying to reach out and almost succeeded but if anyone have any resources and suggestion or depth view, please feel free to guide ??


Clickbait title nice :stuck_out_tongue:

These types of questions must be answered by OP himself and these questions are nothing todo with the language.

  1. Is it a question
  2. Yes it has 2 ioc container - it’s a design decision, read the docs.
  3. Why it has to be external? do you want to manipulate externally via **.xml
    again it’s a design decision.
1 Like

Yaa mate !!!
It is not supposed to be a question due to non-invasivness behavior of spring,it allows
two container.In future if we migrate to another technology whole code won’t be dragged i.e
on documentation.
Basically it is based on template design pattern for dispatcherServlet registration…

I phrased my question wrongly…
Merely seeking for improving debugging skill. I completely perplexed when gone through the
documentation.If there is any resources w.r.t to debug spring mvc then kindly dispensed me.
It is not a cup of tea to master. I will feel satisfied if i know something new from others.

I don’t know what you mean by based on template design pattern for dispatcherServlet registration
DispatchServlet pattern or any frontcontroller pattern are common among single source of handling the request.
It’s no way related to template pattern, template pattern are completely different subject , it helps sub-modifiers to modify the algorithm for its own nature of the class.

How can we know more info than docs.

Look at starting guide for Spring guide .

Yes I agree !!!
Front controller is a common gateway/an entry point for incoming requests in a web application where all the incoming requests would be received by the front controller. Generally a Servlet/filter acts as a front controller.
Front controller performs some common pre-processing logic/checks or some validations which has to be performed before the request is routed to the corresponding component for processing.

By using Template Design pattern mechanism, MVC did programatic dispatcherServlet registration .
It is basically for register DispatcherServlet in ServletContext programatically. Our class implements from WebApplicationInitializer and override onStartup(ServletContext context) method and register the DispatcherServlet . If we develop second application then register the DispatcherServlet and write all code once again .In second application may be springBeanConfiguration file names and mappings changed rather than remaining code is same.(It is a boiler plate logic). So Spring people provides one Abstract class called AbstractDispatcherServletInitializer. The boiler plate code is written in abstract class . just like we are providing configuration files and mappings. ( If the code is common for all the classes with minute differ then we go for Template Design Pattern )
AbstractDispatcherServletInitializer also implements from WebApplicationInitializer. ServletContainerInitializer will provided by j2EE Spring Internal Component which Implements from SerletContainerInitializer. Internally the Component will call WebApplicationInitializer onStartup(ServletC
ontext context) method …

Sir, I am thinking like that…If it is wrong guide me…

You’re not a native English speaker are you?

Yes sir, U r right but sorry to say !!!
My think might be wrong but in coding thinking matters more than speaking.
I follow spring docs.
Is that anything wrong to ask anything and share my views.
Please don’t revert me back…
Have a nice day !!!

Have a look at the pragmatic programmer book , before that take English course.
You have a terrible communication skills.

There is nothing wrong in asking but spoon feeding seems odd to me.

No sir !!!
Above Post about the front controller and template design pattern, I copied from my mnemonic notes. I hurriedly post. Sorry about that, I cannot convey to you.
Sir, many internals are there, U can taste it only by growing experiences.
Documentation won’t clarify much internals. For project development, U can only followed up.
Sir, I am a seeker, not a spoon feeder.
U have a fundamental right, feel free to think.

Sir, In the company We are using the Iterator design pattern but here I feel irritate design pattern. This type of exception bit costly to handle.

I am posting here because Staffer are providing huge dynamic resources and tools.I learned a lot from that. I seek for more resources from them.

Sorry for my words !!!

Don’t panic, when we found something helpful It will be here, and I have edited your post, Do not tag Staff username in the thread/post Especially never tag me. everyone seeking to get help and we are happy to deliver resources and help you guys seeking, it can take time but that doesn’t mean it’s the end. So be a nice boy, don’t push anything! we will be back with solution as soon as possible.



Stack Overflow is the right place to ask such questions…


1 Like