JSP in MVC

Can any one of you give me a example, on how to write the code in MVC pattern... in a login page... how will write this MVC pattern..

I would like to write it using JSP, Servlets and
beans.. so can you help me on that..Hi,
Struts is indeed a technology based on:
<b>1- Bean = Model</b>
<b>2- JSP = View</b>
<b>3- Servlet = Controler</b>
See you

Similar Messages

  • A problem to display a jsp Using MVC approach

    Hello everybody
    I have got a problem with RequestDispatcher and I would like to get your help.
    I excpect the servlet to display the index.jsp page but the server displays a blank page. web.xml's <servlet> and <servlet-mapping> are set correctly at this TestServlet servlet. what could be the problem?
    my code looks like this:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class TestServlet extends HttpServlet{
         public void doGet(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {     
         String url = "/index.jsp";     
         ServletContext context = getServletContext();
         RequestDispatcher dispatcher = context.getRequestDispatcher(url);
                   dispatcher.forward(request, response);     }
    public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
              //doGet(request,response);
    PS: please help me, this step blocks me for several weeks.
    thank you.

    Hello Thomas, thanks for your answer.
    >
    Thomas Jung wrote:
    > Does this problem happen in IE for all different MIME Types?  I can't recreate your problem as the same functionality works perfectly fine in my installation of IE.
    It does happen for Gif-, Jpeg- and Pdf-binaries (other Mime-types I haven't tested yet) and it is IE 7 I am using.
    > Do you have any browser plug-ins - like Anti-Virus scanners that might be interupting? 
    There are no relevant (as far as I can tell) plug-ins especially no anti-virus scanners loaded.
    > >however an export of the binary stream shows the binary is incomplete.
    > This could be indicative of the problem or it might be perfectly normal.  What trace tool are you using? 
    > It might just be the cause of a multi-part MIME.
    The trace-tool is HttpWatch.
    I think this correlates with the fact that the tab closes right away (i.e. before the stream has been downloaded completly).
    > Can you download attachments in IE from other websites?  There really isn't anything special that SAP is doing in Web Dynpro from a browser side.
    I can download/open Pdfs from SDN for example
    Unfortunately I still haven't got a clue what happens. The code-snipplet producing the response looks like this
    METHOD onactionopen_document .
      DATA: file TYPE zrms_st_file.
      file = wd_this->get_file( ).
      cl_wd_runtime_services=>attach_file_to_response(
          i_filename      = file-filename
          i_content       = file-binary
          i_mime_type     = file-mimetype
          i_in_new_window = abap_true ).
    ENDMETHOD.
    where the type zrms_st_file has three components: binary (type tr_xstring), filename and mimetype (both dstring). Debugging (breakpoint right before method is called) shows that the mimetype is correct.
    Regards,
    Sebastian

  • Jsp bean property method dilemma

    Hi all,
    I'm just starting using bean and trying to convert old jsp in MVC model using beans. I expose the problem:
    a simple internal search engine ask with a form to enter the some parameter. I want to use this parameter to compose my query to the db.
    Now I use this code in my jsp to make the query:
    boolean firstTime = true;
    Hashtable hshTable = new Hashtable(10);
    Enumeration enumParam = request.getParameterNames();
    while (enumParam.hasMoreElements())
      String name = (String)enumParam.nextElement();
       String sValore = request.getParameter(name);
       if (!sValore.equals(""))
        hshTable.put(name, new String(sValore));
    Enumeration enumHshTable = hshTable.keys();
    while (enumHshTable.hasMoreElements())
      String str_SelectStatement = "SELECT * FROM myTable";
      /*If isn't my first time don't add WHERE but AND*/
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
      String sKey = (String)enumHshTable.nextElement();
       str_SelectStatement += sKey + " LIKE '" + (String)hshTable.get(sKey) + "%')";
    }In this way I compose a smart query like this:
    SELECT * FROM myTable WHERE param1 LIKE 'param1Value' AND param2 LIKE 'param2Value' AND........
    How to convert it in a bean model?
    If I make n setXxxx() getXxxx() I loss in reuse of code.
    If I make personalized setXxxx() for the param1 how can I access to the name of the current method?
    I need this to compose my query. I can retrive the param1Value but not the current name (param1) of the parameter.
    import java.sql.*;
    import java.io.*;
    public class DbBean
    String Param1;
    ResultSet r = null;
    boolean firstTime = true;
    String str_SelectStatement = "SELECT * FROM myTable";
    public DbBean()
      super();
    public String getParam1() throws SQLException
      this.Param1 = r.getString("Param1")!=null?r.getString("Param1"):"";
      return this.Param1;
    public void setParam1(String param1Value)
      if (firstTime)
       str_SelectStatement += " WHERE (";
       firstTime = false;
      else
       str_SelectStatement +=" AND (";
    str_SelectStatement += NameOfTheMethod... + " LIKE '" + param1Value;
      this.Param1= newValue;
    }How can I take the NameOfTheMethod... Param1?
    I search around and I read that you can access to the Method name in the stack trace in an other method. But I can't belive this is THE way. It is no suitable.
    Any suggestion will be greatly appreciated.
    Thank you

    Hiya Ejmade,
    First of all: you're missing the concept of the MVC (Model - View - Controller) model. There are two (2) versions out there, with the currently pending (no. 2) going like this:
    from a resource, a JSP page acquires a java bean, encapsulating the data. Via set/get methods of the bean, you create content on the JSP page
    If you wanted to comprise your search engine like this, you would first have to create a file search.jsp (can be .html at this point) which would call a SearchServlet. This servlet would perform a query, encapsulate the data in some object (let's say java.sql.ResultSet) and then forward control to a JSP page, including the object. The page would acquire the object (through the session context, for instance), extract data, and make it available on the site.
    But that's not what's puzzleing you. You would like to know which method created the database query string so you could adapt that very string. This can be done with the class introspection API, reflection. It's quite complex, you'll need to read about it in a tutorial, try:
    http://java.sun.com/tutorial
    The reflection API has quite a lot of overhead and it, honestly speaking, does not have to be used here. Instead, try this:
    public class DBean {
    Hashtable queryParamters;
    public DBean(Hashtable queryParameters) {
      this.queryParameters = queryParameters;
    public String generateSQLCode() {
      StringBuffer call = new StringBuffer("SELECT * FROM myTable WHERE ");
      for (Enumeration e = queryParameters.keys(); e.hasMoreElements();) {
       String key = (String)e.nextElement();
       call.append(key + " LIKE " + (String)queryParameters.get(key));
      return(call.toString());
    }This code should generate the string for you (with minor adjusments). Btw, I noticed some basic mistakes in the code (calling the Object() constructor, for instance, which is not neccessary). Do pick up a good java book ..
    Hope this helps,
    -ike, .si

  • How to Connect to multiple oracle databse

    Dear All
    As I am new to Java
    Can you post java code for how to connect mutliple database (I am using Oracle database) with one class or method and the Connection con object I want use in my jsp to get connected and obtain result for response.
    Can you plz post JAVA code and how do i call the the connection in JSP.
    Thanks Lot in Advance for help...

    Here a simple typical oracle connection code :
    Connection connection = null;
        try {
            // Load the JDBC driver
            String driverName = "oracle.jdbc.driver.OracleDriver";
            Class.forName(driverName);
            // Create a connection to the database
            String serverName = "127.0.0.1";
            String portNumber = "1521";
            String sid = "mydatabase";
            String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
            String username = "username";
            String password = "password";
            connection = DriverManager.getConnection(url, username, password);
        } catch (ClassNotFoundException e) {
            // Could not find the database driver
        } catch (SQLException e) {
            // Could not connect to the database
        }You can take a look [here |http://courses.coreservlets.com/Course-Materials/csajsp2.html] (http://courses.coreservlets.com/Course-Materials/csajsp2.html) for JSP, Servlets, MVC pattern
    and [here |http://courses.coreservlets.com/Course-Materials/msajsp.html] (http://courses.coreservlets.com/Course-Materials/msajsp.html) for database connection.
    You'll also find there many other useful resources.
    good luck

  • J2EE Best Practices on Cache (I know there's a lot of answers but...)

    Hello friends,
    i'm developing a JSP-Servlet MVC application and I have the following problem. I want to control errors at low level, so i want to permit send a form, presenting a error message in a new window with a back button that cals history.back(). The problem is that I want that user data must not be rewrited. I hope that form backs to exactly the same point before user submits. When i play with the cache headers, all i get is have the data back, but when i try to submit from selects or change anything ans submits, the response is the same, like if I repaeat the same inputs.
    I tried cache-control: no-cache,no-store,post-check=0,pre-ceck=0
    and the HTTP1.0 pragma no-cache
    all with expires clausule. But i can't get what I want. Browser disables submit button, and if not I have problems with selects onchange (which acts in fact like a submit by the button) and when I fight that troubles, then I find that user must rewrite the form data during a histroy.back() event.
    So my question is, once i said all this things, which is the best way to implement that functionality??
    Please help me it's very improtant for me, i've read HTTP RFC inclusive, but I just don't get it after combine everything from my JSP filter (setResponse).
    Thank you very much in advance, hope you can help me

    What kind of TV is it?
    The most common way to hook up a laptop to an external display is with the VGA connection.
    VGA connections are fairly common on modern flat panels. If you're trying to connect to a standard definition CRT(tube) TV, an s-video video connection may be possible if both the laptop and TV support s-video. Quality will be poor, however.
    Disclosure: Former BBY employee.

  • Best Practices for many Remote Objects?

    Large Object Model doing JDBC over RMI
    Please read the following and provide suggestions for a recommended approach or literature that covers this area well?
    N-Tiered Architecture
    JSP/Servlet (MVC) - Database Access Layer - Database
    Applets - JSp/Servlet Engine - Database Access Layer - Database
    Application Layer - Application Layer - Database Access Layer - Database
    I have an object model developed using Torque (A JDBC Object Relational modeling framework) for over 100 tables (to be over 160) that I am commencing to enable over RMI. I have got several remote methods up and running. For some of the simple methods starting up has been easy. Going forward I forsee issues.
    Each table has a wrapper or data object and a peer object that have setters/getters and special methods as desired. The majority of these classes are extended from Base Objects that have basic common functionality for retrieving, creating, and manipulating with a database using SQL.
    I have started building a Remote Interface and an Implementation class that invoke the necessary methods and classes within the Object Model to pull successfully off or update the database. Additionally the methods will need to return objects that represent non-primitive serializable dataobjects and collections of objects.
    Going forward client applications, servlets, and jsps will be using the database in more complex and comprehensive methods over rmi. Here are a couple of things I am concerned about.
    1) When to use java.rmi.server.codebase for class loading? In my implementation several of the remote methods will return objects (e.g Party, Country, CountryList, AccountList). These objects themselves are composed of other objects that are not part of the jvm. For all remote methods that return non-primitive objects must you include the classes in the codebase for the client to operate upon them. Couldn't this be pointless as you have abstract and extended classes all residing within the codebase? In practice do people generally build very thin proxy objects for the peer/data objects to hold just the basic table elements and sets?
    2) Server Versioning/Identity - Going forward more server classes will be enabled via rmi. Everytime one wants to include more methods on interface that is available must you update the interface, create new implementation classes, and redistribute the Remote Interface, and stubs/skels to client apps to operate on again? Is there some sort of list lookup that a client can do to say which processes are available remotely presently (not just at initialization)? As time changes more or fewer methods might be available?
    Any help is greatly appreciated.

    More on Why other approaches would be better?
    I have implemented some proxy objects for the remote Data Objects produced by Torque. To ease the pain, I have also constructed a proxy Builder that takes the table schema and builds a Proxy Object, an inteface for the proxy, and methods to copy between the Torque Data Object (which only lives on the server) into the Proxy Object (accessible by client and/or server).
    The generated methods are useable in the object implementing the Remote Interface but are themselves not remoteable. Only the Server would use these methods. Clients can only receive primitives, proxy Objects, or collections of ProxyObjects.
    This seems to be fairly light currently. I had to jump hoops to use Torque and enable remote apps to use the proxy objects. What would be the scaling issues that will come up? Why would EJBs with containers and all kinds of things about such as CMP vs BMP to be concerned with be a better approach?
    Methods can be updated to do several operations verses Torque and return appropriately (transactions). In this implementation the client (Servlet, mini App or App) needs the remote stub and the proxy objects (100 or so) to stand in for the Torque generated Data Objects. A much smaller and lighter set of classes, based on common JDK classes, instead of the torque classes (and necessary abstracts/objects/interfaces/exceptions for Torque).

  • Instanciate an object depending on a variable value

    Hi there,
    I am developing a Web application based on a JSP+persistency MVC framework. In a number of classes, I have to be able to instanciate a "model" object (OO mapping from an RDBMS table) whose type depends on the value of a String variable. Currently, this is done this way:
      if(Constants.CONSTANT1.equals(value)) {
        return new Type1Model(args);
      } else if(Constants.CONSTANT2.equals(value)) {
        return new Type2Model(args);
      } // else if...The Type1Model, Type2Model, etc. classes extend the same base class. But I find this code ugly - while quite efficient.
    So I am trying to come to a design in which I call ModelFactory.getModel(value, args), period (more accurately, semi-colon). This factory holds a Hashtable, mapping possibles values for "value" to Class. Thus, each Type*Model class registrers itself in the ModelFactory for a given value, guaranteeing simple extensibility without modifying the factory nor the code that uses it.
    Now, am I complicating a lot too much this task which is so easy to perform in C-style code ? Or is this the path to OO-enlightenment ?
    Thanks and regards.

    I would in general avoid the if's as doing a more flexible approach is just as easy to code and more flexible.
    It is always best to first focus on the way you would like to call your code and then work on the details of what you need to do to get the code working (i.e. focus on the interface first).
    You could use reflection and pass in the class name you would like to construct, and simply use the class name as your constant. This is very simple and flexible. The following is close although I didn't test it.
    A sample invocation would be:
    Model myModel=ModelFactory.getModel("com.ssouza.MyModel", args);
    public class ModelFactory {
      public static Model getModel(String className, Object[] args) {
       // this is more psuedo code and I don't know the exact syntax, but
       Class cls=Class.forName(className);
        Class[] argTypes=loop through args array getting the Class associated with each and put it into this Class array
       Constructor con=cls.getConstructor(argTypes);
        return (Model) con.newInstance(args);
    }Steve http://www.jamonapi.com - JDBC/SQL monitoring in jamon 2.3!

  • Modeling a webapplication

    i am developing a web application using servlet,jsp,beans(MVC architecture).can i use uml for analysis and design.i have to prepare the documentation of my project.i would like to follow the OOAD.can you please help me in this regard.

    UML is a communication tool that developers use to capture/document their designs/ideas in a format that can be understood by other developers, as well as non-developers.
    UML will definitely help you and follows the OO methodology.
    It sounds like what you need is a good book recommendation. Can somebody out there recommend a good UML book for shakuttan?

  • Usage of struts

    i am developing a portal using jsp and servlets
    i am confusing where exactly struts can be used in my portal?
    please any one help me in - where i can use struts and what advantages it will give
    prabhakar

    Hi,
    When you use jsp and servlets you are using an API to deliver an end product. In taking this approach you may or may not use design patterns like the JSP model 1 or JSP model2 (MVC) pattern.
    Struts is basically a framework based on a particular design pattern, in this case the JSP Model 2 approach.
    You see, the way web development has progressed over the past 5 years since Servlets appeared is
    1. First people used the APIs(Servlet/JSP API) to deliver web sites.
    2. Then people realized, hang on minute the last web application that I built and the current one that I am building right now are pretty similar, so why not RE-USE the same design architecture and if possible the same code. That is how design patterns were brought into J2EE web front ends, with the most famous being the MVC pattern/architecture.
    3. Then people realized that they could now apply the same design patterns over and over again but not necessarily the actual code. This where frameworks come to fore. They provide with code that are based on design patterns and let you re-use the code over and over again. Struts in that way is just struts.jar and a few .tld files, that's it period. But they are so well built that they allow you to
    a> forget about mundane plumbing and concentrate on the actual logic.
    b> make your web-apps very scalable.
    c> provide for support like internationalisation.
    Swapnonil Mukherjee
    Senior Systems Engineer
    Connectiva Systems
    Saltlake, Calcutta.

  • How display a JOotionPane on client WEB browser ?

    Could some body tel if is it possible to use a JOptionPane on a web browser..
    In this code line :
    JOptionPane.showMessageDialog(null,"Le contenu " + chaine + " du "+ champs +" n'est pas valide","Validation",JOptionPane.ERROR_MESSAGE);
    The first paramter is the contener which will display the error message frame..
    Is there any way to set this paramter to the client web browser...
    I use Servlet and JSP with MVC architecture : All my error message are only diplay on a WEB server if i put null in a first parameter of the showMessageDialog..
    How could il display the JOptionPane on a client web broswer ?

    If you want to execute any java code on the client machine (web browser) you MUST write an applet. Consult the tutorials section on the java.sun.com to learn about applets and how to run them.
    Sai Pullabhotla

  • How Use JOptionPane on a WEB borwser

    Could some body tel if is it possible to use a JOptionPane on a web browser..
    In this code line :
    JOptionPane.showMessageDialog(null,"Le contenu " + chaine + " du "+ champs +" n'est pas valide","Validation",JOptionPane.ERROR_MESSAGE);
    The first paramter is the contener which will display the error message frame..
    Is there any way to set this paramter to the client web browser...
    I use Servlet and JSP with MVC architecture : All my error message are only diplay on a WEB server if i put null in a first parameter of the showMessageDialog..
    How could il display the JOptionPane on a client web broswer ?

    Usually to display a popup message to a user on their browser you use JavaScript.

  • What data structure is better?

    hello all!
    i would like to ask you a suggestion.. i am implementing a project in JSP+java in mvc and i have still not understood what data structure would be better to do the following:
    i have "Catalogs" of entities (e.g. payments) where each one is composed by several double data. the structure of the site is that the jsp talks to its Bean which in turn talks to the controller (normal java class- no servlet) which finally ask the data to the entitiy class. How could i pass these vectors of datas to the jsp page without let it talk directly to the entity? I think that bean+jsp are MVC's boundary classes and i don't want them to talk with entities (and then they cannot directly use entity methods as bill.getAmount())..
    How could i do?
    Thanks a lot! Bye

    I use PNG as it is smaller than TIF and holds transparencym unlike JPG.

  • How to use Spring MVC instead of assembler.jsp in endeca 3.1.0

    Hi ,
    I am new to Endeca . I want to use spring MVC instead of assembler.jsp .Some body please help
    me how can i do it. Wht all i have to do to achieve it.
    Thanks
    Mark

    Hi Mark,
    When using the 3.1 Assembler in your application, you can use either the jar file directly or set up the Assembler as an HTTP service and process the XML or JSON responses. Neither of these approaches conflicts with using Spring in your application.
    Sean

  • Protecting Presentation JSP in a MVC Pattern

    why should I use "login-config" type authentication to protect my presentation JSP used in an MVC pattern from direct access, when I can protect it simply by placing it in my WEB-INF?

    Authentication is not just to protect presentation layer but any resource served by the application server.

  • MVC JSP and Servlets

    I'm creating JSP pages to represent the view of the site and servlets to get the request and decide which JSP page to load next.
    When the servlet recibes a request it generally has to query the database to get some data and then show it back to the client. To do this the servlet calls other object that is responsible to query the database and fill a ResultSet.
    My question is: what is better, to load a Vector with special objects containing the data in the ResultSet and then return this vector to the jsp page for it to use it, or may a return directly the ResultSet to the jsp page? With the first option I have to cycle in the resultSet to load the vector and then cycle through the vector to show the results. With the second option I cycle only once, but I isolate from the database (column names, order in which the things are returned...)
    I hope anybody can give me an opinion.
    Thanks

    There are a few things wrong with this:
    1) MVC -> The View should have no Model work init.
    For the MVC pattern, the database is Model. Use
    a
    a ResultSet in JSP, and now your View is lockedto
    a
    database with a specific column format.
    Huh? I think that's backwards. The View willalmost
    always require Model data unless it is a staticpage.
    The Model, however, should be agnostic about what
    t View technology it serves. (The Controllerbridges
    the two). Also, I would call the database the
    Persistence or Integration tier, a separateconcept
    from the Model, though intimately coupled to it.I meant the work of the model (gathering the data to
    a presentable form) is moved to the View. Yes, the
    View needs to know the Model to be able to display
    its data. But the Model should handle the data
    collection.
    Fair enough. I might have read it backwards as well.
    >>
    2) Any web application (or any application in
    general) wether it uses MVC or not, should still
    follow a 3 tier approach: Persistance (Data),Domain
    (logic), Presentation (View, output) (note, thisis
    different then MVC.) By moving the ResultSet inthe
    JSP you would be dragging the Persistancemechanism
    up two layers. Generally, a layer should only
    see
    the layer just below it (Presentation seesDomain.
    Domain sees Persistance. Persistance never sees
    s Domain or Presentation. Domain never sees
    Presentation. Presentation never seesPersistance).
    >
    I agree that Persistence and View should not seeeach
    other. However, Model and Persistence must. How
    else do you write a DAO? Or even use a mapperlike
    Hibernate?First the Model doesn't fit into just one of the
    three tiers (Persistance Domain and Presentation).
    The Model of MVC is both the Domain logic and the
    e Persistance mechanism.
    To me, at least, Domain logic = model. The terms I have normally read is either "business tier" or "model domain". "Patterns of Enterprise Application Architecture", M. Fowler. Though, I will concede that this tier has the least well defined set of terms.
    But for the three tier architecture: the domain sees
    the persistance. You always see one layer down. So
    Domain sees the persistance and pulls the data into
    the model. So a DAO would be part of the Domain, the
    logic of collecting the data from the database to be
    used in the application (in the correct object graph
    and all that). The persistance though, doesn't see
    the domain.
    Hmm, I'm not sure which direction 'down' is. And even if 'down' meant towards the back-end or away from it, what about the controller? It parses view requests and delegates them to the model. The results are then normally returned to the controller for dispatch to a view. So, the controller seems to have its fingers in all the tiers except integration and persistence, at least to me. I think of the controller as the 'middle man' between model and view that lets the model be agnostic to the view. The view and controller will to some extent always be coupled. However, the model theoretically exists on its own.
    Half of me thinks that I have a different view on
    where the Domain and Persistance border is. I
    thought the DAO or the Data Mapper would be in the
    Domain, whereas you seem to be saying they are in the
    Persistance layer?
    That's interesting. I don't know if there is an absolute answer. We are dealing with the O/R boundary, and the DAO straddles the boundary. However, one could, at least theoretically, change persistence strategies. What would change? Not your model objects, but your persistence tier objects. Though, again, the definition is nebulous.
    3) From a Practical matter:
    In many DBs, if you close the connection fromwhich
    the ResultSet was derived, the ResultSet is
    closed
    and you get errors if you try to access it. Ifyou
    don't close the connection in the Servlet beforeyour
    JSP, then you have to do it in the JSP. Thatmeans
    even more DB bleed through to the JSP, and theM->V.
    Or, you could just not close the Connection and
    d allow it to hang around and create memory
    leaks.
    >
    Yepper.
    4) Also practical:
    To use the ResultSet in JSP is going to require
    scriptlet code. This is ugly and hard to manageand
    update later. You have to wrap your code in
    try{}catch(SQLException e) {} finally {}, so
    the
    code is even uglier and harder to manage(especially
    if you end up not touching the thing for monthsand
    forget what you had done - or god forbid someoneelse
    has to keep up your code). You could make acustom
    tag to handle it, which makes the JSP easier toread,
    but does further damage of spreading the dataaccess
    code all over the application.
    Definitely!
    5) Practical:
    When you do this sort of thing, then later
    decide
    to
    change the way the database is set up, digging
    all
    the places affected by the simple renaming of a
    column, or refactoring of which columns are inwhich
    tables becomes a heavy effort. Keep it all in a
    DataAccessObject, and changes in DB becomestrivial
    to keep track of in your code. It is all in one
    place, and can be tested off line. Harder stillis
    if you change persistance from a database to anXML
    library, or some directory lookup or something.You
    would have to completely refactor your Servlet
    and
    your JSP. Put it in a DataAccessObject and allyou
    have to do is switch out the DAO instance. The
    change is transparent to the Servlet and the JSPas
    long as you maintain an interface.
    Just keep in mind that for the vast majority of
    projects, the RDBMS technology is rarely switched.I
    generally program to interfaces in my Model, butmy
    Persistence tier is always so tightly coupled thatI
    simply use POJO's without an interface.
    6) Practical:
    I have elluded to this several times, but I will
    state it specifically. When you isolate the
    persistance and data access to its own layer
    then
    you
    can swap out the presentation (the View and the
    Controller) when testing all your persistance
    operations. This means the data is independent
    of
    the container. You can run it out of theServlet/JSP
    environment and it will behave EXACTLY as it
    will
    inside the JSP environment. You can designrobust
    tests, debug, redesign, re-edit, etc... muchquicker.
    Then, when all done, plug it into your web app
    p without worry.
    Great point.
    Of course, Numbers 3 -> 6 are the reasons why
    following 1->2 (MVC and the 3 Tier architecture)are
    such good ideas.- Saish
    BTW, please take all the above just in the interest of having a good discussion. I have been wrong many times before! ;^)
    - Saish

Maybe you are looking for

  • Can you help me to add my MP620?

    Hi PAHU, Hi Kappy, Hi all, I've tried w/o success to setup my MP620 over Wifi after upgrading from Leopard to Snow Leopard. PAHU and Kappy, you helped me to configure my printer over my "internet sharing network" with Leopard... I still have the same

  • Why does this happen when I insert editable region?

    Hi ppl... I got a small problem here. When I insert editing region into the ORANGEBOX div, for some unknown reason which I can't figure out, my spry menu bar shifts to the left. But in preview, it looks fine. What's the reason for this and how can I

  • Purchase Requisition Auto Close

    When a Standard Purchase Requisition get auto closed. although we have created Purchase Order from Requisition and Delivered items to locations but still it is in Open Status. Edited by: Abdul Wasi on May 24, 2012 12:02 AM

  • A font package is requried to correctly display after creating interactive form in livecycle

    SO I created a form in acrobat. When I save it, and open it in reader, it opens it fine. But I need to make the fields expandable, so I go to livecycle, and create an interactive form with flowable layout. Once i save it, and open it in reader, it in

  • Error :number range interval 01 does not exist

    Hi,   i created a number range object Z_REPORTID in SNRO for autogenerated ids and later used the function module NUMBER_GET_NEXT. After execution i got the following error. For object Z_REPORTID, number range interval 01 does not exist Message no. N