What is the difference between between prototype and request scope in Spring? Both creates a new instance whenever required.
What if I am using prototype scope in WebLayer? How it will be different from request scope?
If a user does a request to the server and if the bean of request scope is asked twice from the spring factory it will return the same object however if bean with prototype scope is asked twice it will return two different object.
I think two should not be compared. Rather than advantage and disadvantage look into your requirement.
The request scope beans are same as the request scope objects when you are working with plain servlet and JSP. In the prototype case you get a new bean every time you ask for it. In request scope you get the same bean till you are in request scope. Also request scope beans make sense only in web applications. Prorotype scope beans lifecycle are not managed by Spring. See here
If you can tell the real life use case where you want to use this, it will be easier to tell which one to use and why?