Front Controller Pattern and issues

Hi,
I've implemented the front controller pattern using a Servlet and some JSP pages. The issue I have is that if the JSP page button is clicked, the controller handles the request and performs the proper forwarding.
But for instance, if I type in the URL for the page directly without going through the servlet in the FORM tag then obviously the servlet cannot process the request.
Here's a more concrete example: I have an informational page that you get to by first logging in. But if I type the name of the page directly, http://localhost/employerInfo.jsp I am taken directly to this page, even though I should have logged in first.
I believe there's a way to do this, but I'm completely stumped as to how.
Any information or insight is greatly appreciated.
Thanks,
John

Hey John,
What you need to do is not to access the employerInfo.jsp directly but call the servlet.
You can map a servlet to a URL. For example, using your example below you can call: http://localhost/myservlet?action=openEmployeeInfo
Now your servlet can retreive the action using String x = request.getParameter("action"); You can test if x.equals("openEmployeeInfo") then get the information from a db or something else. Set the info on a context like request, session or servlet context and then forward to the jsp page using the request dispatcher.
RequestDispatcher rd = request.getRequestDispatcher("/employeeInfo.jsp");
rd.forward(request, response);
If you have more questions, post here again.

Similar Messages

  • Musings: MVC Front Controller/Command and Controller Strategy

    Hi,
    I am currently taking my first shot at implementing the Front Controller pattern, the Command and Controller Strategy flavor, in Java. When applying the pattern, my chosen point of focus is achieving as much isolation as possible of Client-specific implementation details from the rest of the framework (Web-based framework Clients, Swing-based framework Clients, queueing-based framework Clients, etc.) However, I am running into a lot of (apparent?) inconsistencies when it comes to CCS discussions "out there", so I have a feeling that perhaps I have misunderstood the Front Controller/Command and Controller Strategy pattern. Maybe the MVC gurus out there would have some thoughts on the matter.
    My issues:
    1.) Some CCS discussions seem to assign View presentation (sometimes called "dispatch", or "rendering", or "forwarding"?) to an ApplicationController. It seems puzzling to me, since only a concrete FrontController should include any knowledge of a concrete View structure. Shouldn't only a FrontController perform a logical-to-physical resource mapping, thus encapsulating knowledge whether a particular View is a separate, stand-alone Web page or a compound, argument-driven Swing object, and how to "present it" (by either redirecting to a Web page, or bringing a particular Swing object into the foreground)?
    2.) Some CCS discussions seem to introduce Client-specific implementation details at the ApplicationController level, for example "HTTP requests" or "HTTP responses". It seems puzzling to me, since I feel that every part of the framework, except for a concrete FrontController, should be completely independent of the nature of a Client making a request. Instead, I created a generic Request object w/arguments and have a concrete FrontController translate any client-specific details into such a generic Request, before delegating to an ApplicationController.
    3.) In the light of the (2.) above, I am not sure what constitutes a "response" from an ApplicationController back to a FrontController. It seems to me that the only universal "response" is a LogicalViewEnumeration: what View to present once a command has been completed, in many cases a "don't care", or a "show the requestor", or a "show a home page" (not every request has to result in changing a View). Well, perhaps a LogicalViewEnumeration as well as possible View arguments (?).
    4.) In the light of the (3.) above, I suspect that any failures in Request delegation, or Command execution, should be perhaps propagated back to a FrontController by exceptions only, since, say, a WebFrontController might want to show a click-through error page, when a SwingFrontController might prefer to show an error dialog box, a LogicalErrorViewEnumeration might not make sense at all in the context of a particular Client, for example a queueing Client.
    5.) In the light of the (4.) above, there is the question of an appropriate Request interface (into an ApplicationController), an appropriate Response interface (back into a FrontController), as well as an appropriate ViewArguments interface (into a FrontController and later into a View). The problem with generic Requests is that they can be created with nonsensical argument combinations, so shouldn't Requests be abstract and force proper arguments in concrete subclasses, through explicit constructors (in a sense, degenerate Commands)? The problem with Responses and ViewArguments is that... well, I have not found any formal discussion anywhere as to what those should look like. In most samples I have encountered, Responses include Client-specific implementation details, as mentioned in (2.), above.
    6.) Some CCS discussions seem to introduce a Flow Manager at the ApplicationController level. It seems puzzling to me, since the whole point of the Command and Controller Strategy flavor seems to be centralization of business logic execution within self-contained Command objects. Shouldn't Requests get associated with Handlers (objects capable of actually carrying out Requests) and transformed into Commands inside an ApplicationController, thus Commands themselves return appropriate LogicalViewEnumeration back to an ApplicationController, back to a FrontController? Let's consider a ShowMyShippingAddress request coming into the framework: unless such a Request is eventually treated as a Command returning a particular LogicalViewEnumeration, it is suddenly a Flow Manager "acting" as a business logic driver. I guess the question here is: except for a few special cases handled by a particular ApplicationController (authentication, error conditions, default behavior, etc.), should flow management be considered stand-alone, or always delegated to Commands?
    7.) Some CCS discussions seem to include an extra Request argument that specifies an ApplicationController to use (Request.Action="create", Request.Controller="account", Request.Username="me-me-me"), instead of using a Router inside of a FrontController to resolve to a particular ApplicationController through a generic action (Request.Action="createAccount", Request.Username="me-me-me"). I am not sure about the reason for such a design decision: why should a Client or a FrontController be allowed to concern itself with an implementation-level structure of the framework? Wouldn't any framework state -dependent ApplicationController resolution issues be best handled inside a Router, used by a FrontController to resolve [obtain] an appropriate ApplicationController, thus preventing Clients from ever forcing the framework into a possibly inconsistent behavior?
    Any comments appreciated...
    Thanks,
    Gary

    gniemcew wrote:
    1.) Some CCS discussions seem to assign View presentation (sometimes called "dispatch", or "rendering", or "forwarding"?) to an ApplicationController. It seems puzzling to me, since only a concrete FrontController should include any knowledge of a concrete View structure. Shouldn't only a FrontController perform a logical-to-physical resource mapping, thus encapsulating knowledge whether a particular View is a separate, stand-alone Web page or a compound, argument-driven Swing object, and how to "present it" (by either redirecting to a Web page, or bringing a particular Swing object into the foreground)?It is hard to tell without reading the actual discussion, but my guess is that the posters were either conflating or being loose with the distinction between a FrontController and an ApplicationController. The former is (normally) intimately tied to the actual view being used (HTTP, Swing, etc.) whereas the ApplicationController typically is not. Both are involved in dispatch and event processing. The former normally renders a view whereas the latter does not.
    gniemcew wrote:
    2.) Some CCS discussions seem to introduce Client-specific implementation details at the ApplicationController level, for example "HTTP requests" or "HTTP responses". It seems puzzling to me, since I feel that every part of the framework, except for a concrete FrontController, should be completely independent of the nature of a Client making a request. Instead, I created a generic Request object w/arguments and have a concrete FrontController translate any client-specific details into such a generic Request, before delegating to an ApplicationController.Generic is fine. However, you can become generic to the point where your Request and Response interfaces are only acting as "marker" interfaces (think of java.io.Serializable). Writing a truly generic controller is possible, but personally, I have never found the effort justified.
    gniemcew wrote:
    3.) In the light of the (2.) above, I am not sure what constitutes a "response" from an ApplicationController back to a FrontController. It seems to me that the only universal "response" is a LogicalViewEnumeration: what View to present once a command has been completed, in many cases a "don't care", or a "show the requestor", or a "show a home page" (not every request has to result in changing a View). Well, perhaps a LogicalViewEnumeration as well as possible View arguments (?).A given service (if you ascribe to SOA) should be the fundamental unit in your architectural design. A good application controller would be responsible for determining how to dispatch a given Command. Whether a Command pattern is used or whether service methods are invoked directly from your FrontController, the ApplicationController should enforce common service aspects. These include authentication, authorization, auditing, orchestration, validation, logging, error handling, just to name a few.
    The ApplicationController should ideally offload these aspects from a given service. The service would indicate how the aspects are to be applied (e.g., strong authentication required, x role required, fetching of existing process state, etc.) This allows services to be developed more quickly and to have these critical aforementioned aspects developed and tested centrally.
    Your FrontController, in contrast, is responsible for transforming whatever input it is designed to receive (HTTP form data posts, XML-RPC, etc.) and ensure that it honors the contract(s) that the ApplicationController establishes. There are no cut-and-dry decisions though about when a given piece of functionality should be ApplicationController or FrontController. Take error handling. Should I emit just a generic ServiceException or allow the FrontController to decide what to do with a more concrete checked exception? (The FrontController, in any case, should present the error to the user in a manner dictated by the protocol it serves).
    gniemcew wrote:
    4.) In the light of the (3.) above, I suspect that any failures in Request delegation, or Command execution, should be perhaps propagated back to a FrontController by exceptions only, since, say, a WebFrontController might want to show a click-through error page, when a SwingFrontController might prefer to show an error dialog box, a LogicalErrorViewEnumeration might not make sense at all in the context of a particular Client, for example a queueing Client.See above. Yes. However, the ApplicationController could easily 'hide' details about the failure. For example, any number of exceptions being mapped to a generic DataAccessException or even more abstractly to a ServiceFailureException. The ApplicationController could indicate whether the failure was recoverable and/or populate information necessary to speed up production support (e.g., mapping exceptions to error codes and/or providing a primary key in an error audit log table for support to reference). A given FrontController would present that information to the user in the method that makes sense (e.g., error dialog for Swing, error page for HTML, etc.)
    gniemcew wrote:
    5.) In the light of the (4.) above, there is the question of an appropriate Request interface (into an ApplicationController), an appropriate Response interface (back into a FrontController), as well as an appropriate ViewArguments interface (into a FrontController and later into a View). The problem with generic Requests is that they can be created with nonsensical argument combinations, so shouldn't Requests be abstract and force proper arguments in concrete subclasses, through explicit constructors (in a sense, degenerate Commands)? The problem with Responses and ViewArguments is that... well, I have not found any formal discussion anywhere as to what those should look like. In most samples I have encountered, Responses include Client-specific implementation details, as mentioned in (2.), above.See comment on marker interfaces above. Nothing, however, stops you from requiring a certain sub-type in a given service method. You can still pass in the interface and validate the proper type by an assert statement (after all, in the vast majority of situations, the proper service method should get the proper instance of a given Request object). IMO, the FrontController would create the Command instance which would be passed to the ApplicationController which would dispatch and invoke the proper service method. A model response would be received by the FrontController which would then render the appropriate view.
    gniemcew wrote:
    6.) Some CCS discussions seem to introduce a Flow Manager at the ApplicationController level. It seems puzzling to me, since the whole point of the Command and Controller Strategy flavor seems to be centralization of business logic execution within self-contained Command objects. Shouldn't Requests get associated with Handlers (objects capable of actually carrying out Requests) and transformed into Commands inside an ApplicationController, thus Commands themselves return appropriate LogicalViewEnumeration back to an ApplicationController, back to a FrontController? Let's consider a ShowMyShippingAddress request coming into the framework: unless such a Request is eventually treated as a Command returning a particular LogicalViewEnumeration, it is suddenly a Flow Manager "acting" as a business logic driver. I guess the question here is: except for a few special cases handled by a particular ApplicationController (authentication, error conditions, default behavior, etc.), should flow management be considered stand-alone, or always delegated to Commands?There are distinct kinds of flow management. For example, orchestration (or BPM) is properly at either the service or ApplicationController layers. However, determining which view to display is properly at the FrontController layer. The ApplicationController should receive a Command (with a populate Request) and return that Command (with a populated Response). Both the Request and Response are fundamentally model classes (within MVC). The FrontController is responsible for populating the Request and/or Command and rendering the Response and/or Command. Generic error handling is usually centralized for both controllers.
    gniemcew wrote:
    7.) Some CCS discussions seem to include an extra Request argument that specifies an ApplicationController to use (Request.Action="create", Request.Controller="account", Request.Username="me-me-me"), instead of using a Router inside of a FrontController to resolve to a particular ApplicationController through a generic action (Request.Action="createAccount", Request.Username="me-me-me"). I am not sure about the reason for such a design decision: why should a Client or a FrontController be allowed to concern itself with an implementation-level structure of the framework? Wouldn't any framework state -dependent ApplicationController resolution issues be best handled inside a Router, used by a FrontController to resolve [obtain] an appropriate ApplicationController, thus preventing Clients from ever forcing the framework into a possibly inconsistent behavior?I am not 100% sure of what you are getting at here. However, it seems to be the method by which commands are dispatched. They are in effect allowing a FrontController to dictate which of n ApplicationControllers should receive the request. If we allow a FrontController to directly invoke a service method, then the ApplicationController is simply a centralized framework that should always be invoked for each service method (enforced via AOP or some other mechanism). If there is a single, concrete ApplicationController which handles dispatch, then all FrontControllers communicate directly with that instance. It is really just a design decision (probably based on your comfort level with concepts like AOP that allow the ApplicationController to exist solely behind the scenes).
    I might have totally missed your questions, but those are my thoughts on a Monday. Best of luck.
    - Saish

  • Front Controller Pattern

    I'm going to implement the front controller pattern. As it is implemented in the blueprints (Pet Store), requestmappings.xml and screendefinitions.xml are only read upon start up. Thus, the web application has to be restarted to carry out changes.
    I'd like the possibility to perform changes to these files without restarting the app. How should I go about? As I don't want to read the file for every request, I need some kind of cache. But this cache should have some kind of automatic updating mechanism when the files are changed.
    Has anyone done something like this for large web applications?

    I've used a similar approach for this (kitv.co.uk), the project not the website, which is pretty heavy weight application, interactive digital Television over IP.
    My design used the command pattern (GOF 233), which is (IMHO) a better solution to implement the front controller.
    I created an action/command to perform a reload, this re-initialises my request/response handlers (equivelent to the ScreenFlowManager). The re-initialise is really just an alternative wrapper as the initial load.

  • Difference between MVC & Front- Controller

    Hi All,
    could anyone help me out in differenciating the MVC & Front controller patterns.
    regards
    Karthik

    When should an application use the Front Controller
    patern and when should they use MVC? This boils down to scope of the problem domain and requirements.
    The Front Controller seems largely like a subset of
    MVC.Yes.
    Is there a situation where the Front Controller
    is more advantageous to use than MVC?Where its lighter weight pays off, i.e where you do not have a conventional model, e.g with streaming prototcol handlers or with fast readers. MVC is most useful for a N-Tier J2ee application offering CRUD type functionality.

  • Page/front controller

    Does JSF implement front controller pattern or page controller pattern?
    In this article http://websphere.sys-con.com/read/46516.htm I read that it implements page controller but sincerely I am not able to see JSF fit in this pattern...Do you think it is true? But, above all....why?:P
    thanks

    I hate to do this to you but check this link for the debate: http://mail-archives.apache.org/mod_mbox/struts-user/200603.mbox/%[email protected]%3E
    There is no doubt that JSF uses the Front Controller design pattern, but gives you "page controller" funcationality to.

  • Object Oriented Patterns and Visio

    Visio question:
    Does anyone know if there are established shapes for each (or any) of the object oriented patterns? If not, is anyone working on that or interested in that?
    Since they all have names (Momento, Proxy, Iterator, Mediator, Observer, etc.) it seems like they ought to each have their own shape. Since Object Oriented is all about communication of intent, each pattern having its own recognizable shape would go a long way toward a more meaningful communication through diagram. Also, if they each had their own shape, then the super-patterns (based on commonly grouped patterns and interactions) could also be easily represented.
    Blaine

    I'm kind of making an assumption here and if it's in error then feel free to disregard the rest of this post.
    Assumption that you're thinking terms of shapes for representing in UML the various patterns. Everything you need is right there in front of you already regardless of whether you use Visio, Rational, Poseidon or some other UML tool.
    Patterns are not individual constructs. One does not make a Mediator class. One makes a Java class that is an implementation of the Mediator pattern. As such you would see in the static class diagram the same grouping of classes for an X Mediator as you would for Y Mediator. That is the image you're looking for. It's not a single widget that you drag onto the screen, it's in the pattern itself.
    If, however, you're talking about something like a graphical representation to give to managers that says "Here be Momento patterns", then I would postulate that you're trying to communicate information that they don't need nor should they concern themselves with. Patterns are an implementation issue. They deal with, "How" we will solve a problem, not what problem will we solve. Mangaers, IMNSHO, need only concern themselves with what problems we will solve, not how they will be solved.
    Just my 2 krupplenicks on the subject, your milage may of course vary.
    PS.

  • Front Controller in Web Logic

    I am currently working on a front controller.
    WHat i whant to do is pass all call to object on my server through this controller
    like this
    a get for /Info.jsp is caught by the /* servlet url pattern
    next i will handle and check things.
    Finally a want t pass the user the Page.
    This causes a loop.
    Anybody any ideas on how to solve this in web logic

    I think what you need to do is make sure that your scripts are not stored in the root path of your application.
    In your example you are using the root context to trap all requests incoming, processing that request and then presumably trying to forward or redirect to the /login.jsp page after initial processing. Unfortunately requests sent to /* are intercepted and passed to your controller so the attempt to forward to /login.jsp loops back through your server repeatedly.
    Perhaps if you map your controller servlet to a different context to the one where you store your scripts you will then be able to forward successfully
    e.g map the context /members/* to your controller, but store your scripts in the /private context - /private/login.jsp . Then provide a mapping in your controller between script name and actual script location, do a lookup and forward accordingly.
    if you make sure that all your links within your application point through /members/ they will always be processed through your controller. For example the login page would be accessed as /members/login.jsp but after processing in your controller you do a look up and see that login.jsp is in private so you forward your request to /private/login.jsp .
    Well, thats how I would approach it anyway ....

  • Fatal1ty Champion Front Panel I/O Issue

    'Fatalty Champion Front Panel I/O Issue I just purchased a Creative PCI Express Sound Blaster X-Fi Titanium Fatalty Champion Series Sound Card. I have installed the card and front panel into my system with the latest drivers.
    I am unable to get the front panel to work (the soundcard works fine). It has no lights, volume does not work and the mode selection does not work, in fact the only thing that works are my headphones. When I plug in my headphones my speakers mute and I get sound in my headphones. I have disconnected all connections and reconnected them ensure they are fully seated. I have reseated my card as well.
    System Specs
    EVGA X58
    2G of 600 RAM
    2 Vertex20 SSD?s in RAID0
    DVD Player
    GTX295 and a GTX8800
    Dual Mon
    Win7 x64 Ultimate
    My system is extremely stable with no issues other than the new Sound Card. Here is the driver I used, Creative Sound Blaster X-Fi Titanium Driver 2.7.0007. I have also tried the Product Identification Module Update.
    Any suggestions?

    Thanks for the answer so fast.
    I use win xp 32 bit,is there any solution for win xp
    Product indentification module update
    File Name : PID_W7PCAPP_US_2__0.exe
    Requirements:
    [color="#ff0000"]Microsoft Windows 7 64-bit, Windows 7 32-bit <
    Sound Blaster X-Fi and X-Fi Titanium series of audio devices listed above<
    Review and found this also
    XFTI_PCDRVBETA_US_2_7_0008.exe
    Fixes:
    Resolves issue of Sound Blaster X-Fi I/O Dri'veBay not workingin Windows XP. <
    But I have the same problem.
    If you me that fix to you with that patch, I'll have to install win 7.
    Regards

  • Route Pattern/Filter Issues

    Hello - I had a question that I was hoping someone could help me with. I recently had an issue on CallManager 4.1.3sr6a. I have 10 sites, each using their own set of 6 9.@ route patterns for outgoing calls. Although the patterns are distinct, they all use the same route filters. Today, all of the sites began matching on the route pattern with the seven digit filter rather than matching on the long distance filter when a 91XXXXXXXXXX number was dialed (we tested with a number of numbers in different area codes). I wasn't able to input more digits after the 7th and DNA confirmed that it matched on the seven digit filter. The filters are as follows:
    Long Distance =(AREA-CODE EXISTS AND LONG-DISTANCE-DIRECT-DIAL EXISTS)
    SevenDigit = (LOCAL-AREA-CODE DOES-NOT-EXIST AND INTERNATIONAL-DIRECT-DIAL DOES-NOT-EXIST AND AREA-CODE DOES-NOT-EXIST AND SERVICE DOES-NOT-EXIST).
    I was able to resolve the issue by going to each site, removing the long distance 9.@ pattern and simply readding it (no changes were made to configuration).
    It was like it just stopped seeing all patterns using the long distance filter.
    I'm wondering if anyone is aware of a bug that may have caused this.
    Thanks very much!

    For detailed descriptions and examples, refer to the Understanding Route Pattern Wildcards and Special Characters section of Understanding Route Plans.
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/admin/3_0_9/p1rtundr.html

  • 9@ Route Pattern Matched Issues

    Unfortunately I have to deal with a lot of 9@ route patterns in our deployment.  I understand weird things happen when 9@ is used, but even this one is boggling my mind.  So I was hoping someone could help me understand why it's doing what it's doing.
    I have a CSS with a collection of partitions.   I'll call the 3 I'm interested in the following: One-PT, Two-PT, Three-PT.
    One-PT has a route pattern of 9@ with the Local filter applied going to Gateway 1.
    Two-PT has a route pattern of 9@ with the Local filter applied going to Gateway 2.
    Three-PT has a route pattern of 9.XXXXXXXXXX with no filter applied (those are 10 Xs) going to Gateway 3.
    My phone is assigned to the CSS with these 3 partitions.  When I dial 9 981 xxx xxxx DNA says that 9@ from One-PT is always matched.  If I remove One-PT from the CSS, then 9@ in Two-PT is matched.  Only if I remove those 2 partitions does Three-PT get matched.
    Now, as I said above I understand 9@ can introduce weird routing issues, but I thought that the route pattern with 9 and 10 Xs would be more specific and it would be matched.  Obviously I was wrong, but I'm trying to understand why I was wrong. Is this because the 10 digit number dialed matches the NANP and the Local filter matches a NANP area code?  Thus it's the more exact match?
    Thanks!

    Hi,
    As per the following link
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/admin/5_0_4/ccmsys/ccmsys/a03rp.html#wp1050657
    "Using the @ Wildcard Character in Route Patterns
    Using the @ wildcard character in a route pattern provides a single route pattern to match all NANP numbers, and requires additional consideration.
    The number 92578912 matches both of the following route patterns: 9.@ and 9.XXXXXXX. Even though both these route patterns seem to equally match the address, the 9.@ route pattern actually provides the closest match. The @ wildcard character encompasses many different route patterns, and one of those route patterns is [2-9][02-9]XXXXX. Because the number 2578912 more closely matches [2-9][02-9]XXXXX than it does XXXXXXX, the 9.@ route pattern provides the closest match for routing."
    Also, check the following post
    https://supportforums.cisco.com/discussion/10698966/9-route-pattern
    HTH
    Manish

  • After downloading itunes on my new computer all of my songs have an exclamation point in front of them and it says the song could not be used because the original file could not be found. How do I fix this?

    After downloading itunes on my new computer all of my songs have an exclamation point in front of them and it says the song could not be used because the orginal file could not be found. How do I fix this?

    Hey waltee911,
    It sounds like you're seeing something similar to this picture:
    If that's the case, the following article has troubleshooting steps to solve the issue:
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/TS1408
    Welcome to Apple Support Communities!
    Sincerely,
    Delgadoh

  • Pattern Swatch issue

    I have created a fairly complex pattern and have converted it over to a swatch. I apply as a fill inside of a rectangle and then try to print my 11x17 poster. This works perfectly fine.
    I then decrease the opacity of the pattern fill to 55%, try to print again, and the printer REFUSES to print the poster.
    I have tried the opacity with the default illustrator pattern fill, and it works fine! Is my pattern to complex to print at a lower opacity?
    Also, I can save this poster into a PDF and will work on my computer. When I send to another person through email, it crashes completly. This file is only 50K or so, so the file is small and should work perfectly.
    Anyone else run into this kind of issue with complex patterns?
    Chris

    Could simply be a matter of how you print it, i.e. whether you are letting the printer driver flatten the reduced opacity into proper persistent color values or AI. So IOW this would be a problem in teh printer driver rather than AI. Similarly, that other person may experience the same issue in Acrobat in the Bermuda triangle that is hardware acceleration, memory requirements and displaying everything on screen. The way I see it, it's perfectly normal. You could probably avoid some of those issues by manually flattening the pattern, changing the printer settings and chosing a PDF version that also flattens the artwork rather than retaining transparencies natively...
    Mylenium

  • Update methode in model-view-controller-pattern doesn't work!

    I'm writing a program in Java which contains several classes. It must be possible to produce an array random which contains Human-objects and the Humans all have a date. In the program it must be possible to set the length of the array (the number of humans to be produced) and the age of the humans. In Dutch you can see this where is written: Aantal mensen (amount of humans) and 'Maximum leeftijd' (Maximum age). Here you can find an image of the graphical user interface: http://1.bp.blogspot.com/_-b63cYMGvdM/SUb2Y62xRWI/AAAAAAAAB1A/05RLjfzUMXI/s1600-h/straightselectiondemo.JPG
    The problem I get is that use the model-view-controller-pattern. So I have a model which contains several methodes and this is written in a class which inherits form Observable. One methode is observed and this method is called 'produceerRandomArray()' (This means: produce random array). This method contains the following code:
    public void produceerMensArray() throws NegativeValueException{
         this.modelmens = Mens.getRandomMensen(this.getAantalMensen(), this.getOuderdom());
    for (int i = 0; i < this.modelmens.length; i++) {
              System.out.println(this.modelmens.toString());
    this.setChanged();
    this.notifyObservers();
    Notice the methods setChanged() and notifyObservers. In the MVC-patterns, these methods are used because they keep an eye on what's happening in this class. If this method is called, the Observers will notice it.
    So I have a button with the text 'Genereer' as you can see on the image. If you click on the button it should generate at random an array. I wrote a controller with the following code:
    package kristofvanhooymissen.sorteren;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    /**Klasse GenereerListener.
    * @author Kristof Van Hooymissen
    public class GenereerController implements ActionListener {
         protected StraightSelectionModel model;
         /**Constructor.
         *@param model Een instantie van het model wordt aan de constructor meegegeven.
         public GenereerController(StraightSelectionModel model) {
              this.model = model;
         /**Methode uit de interface ActionListener.
         * Bevat code om de toepassing te sluiten.
         public void actionPerformed(ActionEvent arg0) {
         this.model=new StraightSelectionModel();
         try{
         this.model.produceerMensArray();
         } catch (NegativeValueException e){
              System.out.println("U gaf een negatieve waarde in!");
         this.model.setAantalMensen((Integer)NumberSpinnerPanel.mensen.getValue());
         this.model.setOuderdom((Integer)NumberSpinnerPanel.leeftijd.getValue());
    StraighSelectionModel is of course my model class. Nevermind the methods setAantalMensen and setOuderdom. They are used to set the length of the array of human-objects and their age.
    Okay. If I click the button my observers will notice it because of the setChanged and notifyObservers-methods. An update-methode in a class which implements Observer.
    This method contains the follow code:
    public void update(Observable arg0,Object arg1){
              System.out.println("Update-methode");
              Mens[] temp=this.model.getMensArray();
              for (int i = 0; i < temp.length; i++) {
                   OnbehandeldeLijst.setTextArea(temp[i].toString()+"\n");
    This method should get the method out of the model-class, because the produceerRandomArray()-methode which has been called by clicking on the button will save the produce array in the model-class. The method getMensArray will put it back here in the object named temp which is an array of Mens-objects (Human-objects). Then aftwards the array should be put in the textarea of the unsorted list as you could see left on the screen on the image.
    Notice that in the beginning of this method there is a System.out.println-command to print to the screen as a test that the update-method has been called.
    The problem is that this update method won't work. My Observable class should notice that something happened with the setChanged() and notifyObservers()-methods, and after this the update class in the classes which implement Observer should me executed. But nothing happenens. My controllers works, the method in the model (produceerRandomArray() -- produce random array) has been executed, but my update-method won't work.
    Does anyone has an explanation for this? I have to get this done for my exam an the 5th of january, so everything that could help me would be nice.
    Thanks a lot,
    Kristo

    This was driving me nuts, I put in a larger SSD today going from a 120GB to a 240GB and blew away my Windows Partition to make the process easier to expand OS X, etc.  After installing windows again the only thing in device manager that wouldn't load was the Bluetooh USB Host Controller.  Tried every package in Bootcamp for version 4.0.4033 and 5.0.5033 and no luck.
    Finally came across this site:
    http://ron.dotsch.org/2011/11/how-to-get-bluetooth-to-work-in-parallels-windows- 7-64-bit-and-os-x-10-7-lion/
    1) Basically Right click the Device in Device manager, Go to Properties, Select Details tab, Choose Hardware ids from Property Drop down.   Copy the shortest Value, his was USB\VID_05AC&PID_8218 
    2) Find your bootcamp drivers and under bootcamp/drivers/apple/x64 copy AppleBluetoothInstaller64 to a folder on your desktop and unzip it.  I use winrar to Extract to the same folder.
    3) Find the files that got extracted/unzipped and open the file with notepad called AppleBT64.inf
    4) Look for the following lines:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    ; No action
    ; OS will load in-box driver.
    Get rid of the last two lines the following:
    ; No action
    ; OS will load in-box driver.
    And add this line, paste your numbers in you got earlier for USB\VID_05ac&PID_8218:
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    So in the end it should look like the following:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    5) Save the changes
    6) Select Update the driver for the Bluetooth device in device manager and point it to the folder with the extracted/unzipped files and it should install the Bluetooth drivers then.
    Updated:
    Just found this link as well that does the same thing:
    http://kb.parallels.com/en/113274

  • Route Pattern / Extension Issue

    Hello! I'm currently having an issue with a new block of extensions in Call Manager 7.1.5.
    We recently ordered a new block of DIDs. The telco sends us the last 4 digits. The last 4 are 9XXX. When dialing these extensions internally, there is an 8-10 second pause of dead air and then it eventually rings through to the phone.
    All of my Route Patterns for each site start with a " 9. "
    My guess is that when dialing the extension, Call Manager tries to match it to a Route Pattern since it starts with a "9" followed by 3 digits. After it cycles through the Route Patterns and doesn't match it, it eventually routes it to the phone. Is this what's happening? And if so, any thoughts to how I alleviate this issue?
    Any recommendations are appreciated.
    Thanks!

    Hi James,
    It appears to be correct. Due to overlapping pattern, the call manager would wait for an inter-digit timeout to expire and route the calls to the correct pattern.
    As a workaround, you can try to lower the T302 Timer(inter-digit timeout) in call manager to 4-5 seconds (Service Parameters -> Cisco Call Manager -> T302 Timer).
    As this issue is experienced with overlapping pattern, the best way to resolve it to design your dial plan efficient so that there is no overlapping.
    HTH,
    Jagpreet Singh Barmi

  • HELP. Made a pattern and it does not show correctly

    I made the attached fish scale pattern and when i look at in the pattern window it looks fine. However, when ever I use it there is a gold gride line embedded into the pattern. Any suggestions on how to fix it?

    Most probably that's just the usual screen redraw/antialiasing issue with patterns.
    Uncheck antialiasing in Preferences > General to test this
    When printing this shouldn't appear.
    When exporting into bitmap formats try the antialiasing setting Supersampling

Maybe you are looking for

  • Having problems creating new playlists...

    When I get on iTunes i get a message saying The songs on the ipod cannot be updated because all of the playlists selected for updating no longer exists...but i have tried to create new ones and i still recieve the same message   Other OS  

  • Reg ALV grid display

    Hi Expert, I am facing simple problem regarding alv display. While retrieving data, records are shown in internal table (It_final), but it doesn't goes to alv display in output. The code is: FORM merge_data .   SORT it_qasr BY probenr prueflos  vorgl

  • Alert with different repos

    if alerts like "a database is down, or a file system is full", Can these be sent from one Grid Control to another with separate repositories? i would like to know if this is possible regardless of the version, say one is 10.2.0.5, the other is 11.1.0

  • STO Delivery creation(vl10 d)

    Hi sap Gurus, We are creating auto spare STOs which are created by MRP RUN. But while creating the delivery for same material two nos of del as well as two nos of PGI was found in production server leading to the no of issued qty is greater than the

  • What apps or downloads can I use to play games especially on facebook.

    What apps or downloads can I use to play games on especially on facebook on my ipad?