Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

if-else blocking in Controller Servlet...

This is a discussion on if-else blocking in Controller Servlet... within the Java forums, part of the Software Development category; 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 ...

Go Back   Geeks Talk > Software Development > Java
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,016
Thanks: 0
Thanked 91 Times in 72 Posts
psuresh1982 will become famous soon enough
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?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-13-2007
Contributing Member
 
Join Date: Sep 2006
Location: bangalore, india
Posts: 1,016
Thanks: 0
Thanked 91 Times in 72 Posts
psuresh1982 will become famous soon enough
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
Reply With Quote
Reply

  Geeks Talk > Software Development > Java

« System.exit | java »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
servlet - struts psuresh1982 Java 4 08-22-2008 08:13 AM
why we shift Servlet to JSP ? psuresh1982 JSP 5 06-30-2008 09:09 AM
How many Action Servlet will be available Geek_Guest Java 0 07-01-2007 05:08 PM
About Servlet Filter... psuresh1982 Java 1 06-16-2007 05:41 PM
Controller not responding JobHelper SilkTest 1 03-06-2007 06:42 AM


All times are GMT -4. The time now is 09:02 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved