-
Contributing Member
if-else blocking in Controller Servlet...
When i make use of MVC pattern for my J2EE application development, then i have to write if-else blocking in Controller Servlet. How we can avoid writting this? Is there any pattern available to avoid this?
-
Contributing Member
Re: if-else blocking in Controller Servlet...
I got the following answer through one of my friend....
You could try Struts-like. Define some action mappings in a file, and register each of them in a Map.
<action path="/Hello" forward="/pages/Hello.jsp"/>
When your controller gets for example "/Hello.do", it strips ".do", and looks for the corresponding action "/Hello" in its action map.
If-else are then history
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules