Results 1 to 2 of 2

Thread: if-else blocking in Controller Servlet...

  1. #1
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    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?


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact