Need some advice in this code

probabily this is a easy stuff..but right now i cant..
I have :
A JSP interface : where user could select option "A" or option "B" or option "C". and a text field to enter some data.
in the Action class, i check by the request.getParamter() to see what the user has selected from the drop down and then apply the following logic in the Action class.
if user selets option "A"
          // put data into session
          show page1.jsp
if user selets option "B"
          // put data into session
          show page2.jsp
if user selets option "C"
          // put data into session
          show page3.jsp
This is what i want to do in the Action class.
Problem :
========
As you see, i have one form bean . but i have to show 3 view depending upon user selection.
How many Action class do i need ?(though i have one only....but could not figure out how do i go about this)
please tell me the flow.
regards

<forward name="success" path="/page1.jsp"/>
/>
          <forward name="failure" path="/index.jsp"/>
</action>
see, the mapping has only page1.jsp.....but i have to
keep page2.jsp and also page3.jsp because user could
select option "B" or option "C" so he could get
those pages as well,
<forward name="successA" path="/page1.jsp"/>
<forward name="successB" path="/page2.jsp"/>
<forward name="successC" path="/page3.jsp"/>
<forward name="failure" path="/index.jsp"/> 
Inside your Action class: String userOption = ...; // A, B or C that use chose
findForward("success" + userOption);
There's nothing magical about "success" and "failure." They just happen to be the most common two ways to leave a page.

Similar Messages

  • Need some advice on this big project

    Hello there!
    Let me introduce myself. My name is Wisse and I have been working with Adobe products since I was a child at the age of 8 (10 years ago). Well, then it was called Macromedia Flash but you understand what I mean.
    I have always been using flash for making animations and small simple applications (for presentations and games) in my spare time. I also use photoshop and dreamweaver for making sites and other things. So I will soon order the new CS5 web design collection.
    I have a big (biggest so far) project coming up and before I really started I thought it'd be best to orient on what Flash application(s) to use and how I will make this project. So here is the plan:
    I am making a dutch driving exam site where people can take practice exams for a small text message fee. The application will have to look slick and work smoothly. I made this to clarify what the application has to do.
    I have never worked with Flash Builder and Catalyst but I kind of like the idea of making nice looking interfaces using Catalyst and then export them to Flash Builder. But as I just said, I have never worked with Flash builder and so I don't know whether  I will be able to make this on Flash Builder (due to it's complexity). Flash builder also has some nice options for accessing external data (the XML, HTTP API and PHP in this case). Catalyst's data list designer and transition animator will save a lot of time and effort when compared to doing it manually in Flash Pro. The big issue here is that I have no idea how to script the rest in Flash builder. the 5 day course might help, but I want to make to be sure that Builder is the best way to go before doing so.
    But on the other hand, I am quite familiar with flash and that could also save time. Flash is a bit harder to use when I want to make a good UI and Flash builder wins when you look at the server communication and the debugging tools.
    So I would like some advice from some fellow Adobe users. What would you do? What would be the best way for me to go, according to you?
    Thanks in advance,
    Wisse Jelgersma.

    Just to elaborate,
    The shape and look of the outside of a car is defined by A) its colour and B) the reflections of the light sources on its surface.
    It's relatively easy to change the colour of the shell of the turtle, but making it look reflective is much harder (I didn't do a very good job myself), especially if you also want to keep the textures of the shell somewhat intact.
    To light the shell you need to consider what the light sources are that are hitting the shell when it is outside. Reflections of the sky and clouds should be brighter, reflections of the ground should be darker.
    In my attempt, I overlaid a landscape picture, warped to roughly follow the shape of the car, then played around with blend modes and opacity and colouration to achieve the above effect. (Although the "specular" highlights could stand to be brought up a bit more). In practice, making this look realistic is probably beyond my skill set.
    Then I added the lightning bolt and wheels for fun.
    Mike

  • Need some help for this code.

    Hi Everyone,
    I've test codes for east region and west region.
    I've a requirement to replace the west test id with east test id.
    That mapping has been done by the onshore team, I've got the mapping doc.
    But updating these details is a tricky part. It's nothing like direct update and replace those test codes.
    As per the mapping if it's
    In case of one to one (East - West) mapping which going to affect only a single row, I’ll have to update there,directly.
    In case of one – many (East - West) mapping and which is going to affect multiple rows, I’ll have to update the latest one and rest will be deleted only in that group. To identify the latest we have to check the latest order detail for that test.
    Suppose I've a west code named W123 and it has to be replaced with E123, in this case direct update.
    But now I've a transaction table where a patient has ordered multiple tests, In this case suppose the
    patiend id is P123 and ordered tests are W123, W234, W345; I'll have to update W123 as E123 and rest
    should not be deleted.
    But if I'll get multiple west code mapped towards single east code, the latest record as per the order detail needs
    to be updated and rest needs to be deleted if mapped with multiple west test codes, for single record and group record as well. Some thing like this.
    E123 - W123, W234 so I'll have to find out the latest and update there accordingly for single record and now
    patient has orderd multiple tests and the group record is like P123(patient) -----has orederd for W123, W234, W345.
    Now only the lastest test code suppose W234 has to be replaced with E123 and W123 has be deleted and W345
    should be there with E123.
    Now please see the code.
    CREATE OR REPLACE
    PROCEDURE P_UPDATE_TEST_ID AS
    V_EAST_TEST_ID            TEST_CODE_CONVERSION.EAST_TEST_ID%TYPE;
    V_ARRAY                   VARCHAR2(4000);
    V_COUNT                   NUMBER := 0;
    BEGIN
      FOR I IN (SELECT EAST_TEST_ID
                      ,STRAGG(WEST_TEST_ID) AS V_STRING
                FROM TEST_CODE_CONVERSION
                GROUP BY EAST_TEST_ID)
      LOOP
        V_EAST_TEST_ID            := I.EAST_TEST_ID;
        V_ARRAY                   := I.V_STRING;
        V_COUNT                   := V_COUNT+1;
        DBMS_OUTPUT.PUT_LINE('EAST_TEST_ID = ' ||V_EAST_TEST_ID|| ' || '||
                             'WEST_TEST_ID = ' ||v_array);
        Now after this I need to segregate the string values and check individual record
        and group record as well, for update. Now If I'll add the regexp_substr, then how
        to map those extracted values for checking.
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('v_count = ' ||V_COUNT);
    END P_UPDATE_TEST_ID;Please suggest something.
    Regards,
    BS2012.
    Edited by: BS2012 on May 23, 2013 4:40 PM

    Hi Bawer,
    Thanks for your interest, but I've done that yesterday.
    Bawer wrote:
    Sorry, but
    >
    Here I'll have to check which one is the latest and update that with relative east test id ...
    >how do you describe the *'latest'* and *'relative east'* ?We have one more template table where we'll have to take the max of template_test_id to figure out "which one is the latest?" To identify the relative east we have a parent table named "test" from there we can find the relative test ids by the column name called East_west_ind (indicator); as per the mapping.
    and depending to this,
    >
    ... rest one has to be deleted and other should be untouched.
    >which one is here, in your sample to be deleted and which should be untouched?
    (maybe a sample after-update output?)If you see the patient id 93, we have number of tests has been ordered. But 3257, 3515 test ids are same as per the mapping. So we need to check the max of template_test_id to figure out "which one is the latest?" as we have one entry in template table always for a new order. In terms of that I'll have to update 3257 as it's the latest entry and 3515 has to be deleted and rest of the test ids should be untouched. I did it yesterday, but i couldn't respond you. Thanks once again for your interest.

  • Need some help troubleshooting this code

    I have the following code in a JSP (HTML stuff edited out). If I run it as it is I get a blank page. But if I comment out the line that says "ruleName = rs.getInt("rule_name");" I am able to see the output of the prepared statement call. I need to see the results of both queries. Any ideas how I can fix this? Thanks.
    <%@ page language="java" import="java.sql.*" %>
    <%@ page import="oracle.jdbc.driver.*" %>
    <%@ page import="oracle.sql.*" %>
    <%@ page import="beans.*" %>
    <%
    Connection conn = null;
    CallableStatement cstmt= null;
    Statement stmt = null;
    int ruleName = 0;
    try {
    //Build the database connection string
    String SYSTEM_DB_DRIVER =
    "oracle.jdbc.driver.OracleDriver";
    String SYSTEM_DB_URL =
    "jdbc:oracle:thin:@<db connection string>";
    String SYSTEM_DB_FILE = "<db>";
    String SYSTEM_DB_USER = "<user>";
    String SYSTEM_DB_PASSWORD = "(passwd>";
    Class.forName(SYSTEM_DB_DRIVER);
    conn = DriverManager.getConnection(SYSTEM_DB_URL +
    SYSTEM_DB_FILE, SYSTEM_DB_USER, SYSTEM_DB_PASSWORD);
    System.out.println("creating stmt for rule name");                    
    stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT DISTINCT MAX(TO_NUMBER(rule_name)) FROM rules WHERE product_id = CHR(" + prodId + ")");                    
    ruleName = rs.getInt("rule_name");
    System.out.println(ruleName);
    // Prepare a PL/SQL call.
    OracleCallableStatement call =
    (OracleCallableStatement)conn.prepareCall("{ call wacc_eaicl_p_requirement.open_rules_dtl (:1,:2) }");
    // Return the rules.
    call.registerOutParameter(1, OracleTypes.CURSOR);
    call.setInt(2, Integer.parseInt(prodId) );
    call.execute();
    ResultSet rset = ((OracleCallableStatement)call).getCursor(1);
    System.out.println(prodId);
    rs.close();
    stmt.close();
    conn.close();                                    
    rset.close();
    call.close();
    conn.close();
    catch(Exception e)
    %>

    Never mind. I fixed it. Silly me. Lesson learned: Use exceptions!

  • Hello, I need some advice on my codes.

    for (int h = 0 ; h < imageHeight; h++){
       for (int w = 0; w < imageWidth; w++){
          if(w < watermarkWidth && h < watermarkHeight){
             int[] imagePixelValue = getImagePixelValue(image, w, h);
             int[] watermarkPixelValue = getWatermarkPixelValue(watermark, w, h);
             int[] embeddedPixelRGBValue = getEmbeddedPixelValue(imagePixelValue, watermarkPixelValue, 0.5);
             setRed(image, w, h, embeddedPixelRGBValue[0]);
          setGreen(image, w, h, embeddedPixelRGBValue[1]);
          setBlue(image, w, h, embeddedPixelRGBValue[2]);
    }As you see I am trying to embed a smaller image like barcode into my original image. But from what I can think of now, I make use of a if statement to check if the w(width) and h(height) from the for loop is valid for the resolution of the barcode. And if is it valide then the system will take the every RGB value from the pixels of the valid statement and merged the pixel together using the equation my teacher had gave me from our meeting this week, then after the system will set the RGB with the new merged pixel value. The equation is correct, but I think that for me to use the if statement, I think its a bit strange as the code seems to be lacking of something.
    Lets say is the barcode has 100x200 resolution and the image have 300x700 resolution, if I changeif(w < watermarkWidth && h < watermarkHeight) to if(w <= watermarkWidth && h <= watermarkHeight) then I will recieve the index out of bound error. I am confused with this as <= means smaller or equals to from what I learn.
    So, I am asking your help here to improve the structure of my code and please tell me why do you give that advice to me. Thanks a lot for your great help.
    Edit: I edit the post to sort the codes up for better viewing.
    Edited by: KamenRider on Sep 20, 2008 7:44 PM

    Arrays are zero -based. For your image of 100 X 200 pixels, the columns are numbered from 0 to 99 and the rows from 0 to 199.
    db

  • I need some advices for FLASH code optimisation...

    Hi All,
    Lat me explain what im doing right now for a better picture -
    My project was previously done in Director >> Im
    reengineering it in flash. Im using a lot of scenes for different
    pages. Every pages have buttons and hell lot of audio and MC's. I
    have my own script on every scene, frame1. Is this right? most of
    the codes are redundant. I cannot access variables and functions
    from a different Scene right? (please correct me if im wrong).
    And till today I have a huge pile of code. Is there any
    concept of Header files like in MFC. If i make an .as file, can i
    embed it inside the .fla and use the variables which are there?
    Because I dont need an extra .as file along with the
    swf(REQUIREMENTS!!).
    Please give me an insight on this kind of optimization, i.e
    using a concept of header files, #define and stuff.
    Another thing is that - there is a MFC program which loads my
    SWF file and plays it. The swf loads an image from the harddisk
    using the image loader component. Is there any way i can flush the
    image data from the RAM or CACHE after the work is over? Or can
    this be handled by MFC?
    Can MFC unload the flash after its loaded? We are unable to
    find a unload option in MFC side for flash OCX controls.
    It would be great if someone could help me with this.
    Regards
    Roshan Kolar

    I already know how to get the path of the class file.
    I just want to know {color:#ff0000}why I can run the the code in a single class file rather than run it inside a jar file{color}?
    Thank you
    Edited by: willnzy_cn on Oct 2, 2007 3:24 AM

  • Need some help with this code.

    var myDoc = app.documents[0]
    var mySel = app.selection[0]
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myHolidayStyle1 = "Holiday-Header" // Header 'day of the week'
    var myHolidayStyle2 = "Holiday-Sub-Heading-Date" // Header 'month and day'
    var myHolidayStyle3 = "Holiday-Header-Body" // Lead Paragraph 'default paragraph style'
    if (mystory = "Monday" ) {
        paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Tuesday") {
        mystory.paragraphs(0). appliedparagraphstyles = myHoldiayStyle1;
    else if (mystory = "Wednesday") {
        mystory.papragraph(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Thursday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    else if (mystory = "Friday")  {
        mystory.paragraphs(0).appliedparagraphstyle = myHolidayStyle1;
    else if (mystory = "Saturday") {
        mystory.paragraphs(0).appliedparagrahstyles = myHolidayStyle1;
    else if (mystory = "Sunday") {
        mystory.paragraphs(0).appliedparagraphstyles = myHolidayStyle1;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 15") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 16") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 17") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 18") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 19") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 20") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 21") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 22") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 23") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 24") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    else if (mystory = "December 25") {
        mystory. paragraphs(1).appliedparagraphstyles = myHolidayStyle2;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    if (mystory =!  [myHolidayStyle0], [myHolidayStyle1]) { // not sure if I did this IF selection not equal Holidaystyle 0 and style 1 then perform loop, correctly???
        for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myHolidayStyle3;
    =============================
    ==========================
    I'm getting a error saying Paragraph is not a function, but nor is mystory.paragraph(0) , so i'm just trying to figure out what synax goes before that.
    =============================
    The text that is bold is the prolbem i'm having. I just got  a Javascript bible on how to program in javascript. How would i make that function work. I'm sure its simple. I'm just hoping I have If some Then ({) command follow by what I want it to do is correct. And I'm understanding this. there is so many different syntax's to choose from, any help would be appreciated. I work for a Newspaper company, and Indesign CS3 Javascript coding is a bit diffrent from normal javascript.

    Okie, I'm making progress now. Because well it didnt crash, but then again, LOL the script didnt apply the paragraph styles when I selected the text!
    any suggestions?
    I'm also getting a weird error now with the loop, but I also dont think its working because maybe the myStyle and myStle1 aren't applying themselves correctly, in the first part of the script.
    this is the Error Message:
    Error Number : 30477
    Error String: Invalid value of set propert 'appliedParagraphStyle'. Expected ParagraphStyle or String, but Recieved nothing.
    Line: 110
    Source: myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
    //var myDoc = app.documents[0]
    var mySel = app.selection[0];
    var myStory = mySel.parentStory; // Now we are pointing to the entire story
    var myStyle = app.activeDocument.paragraphStyles.item ( "Holiday-Header" ) ;
    var myStyle1 = app.activeDocument.paragraphStyles.item ( "Holiday-Sub-Heading-Date" ) ;
    var myStyle3 = app.activeDocument.paragraphStyles.item ( "Holiday-Header-Body" ) ;
    if (myStory.contents == "Monday" ) {
        myStory.paragraphs.appliedParagraphStyle = myStyle;
    else if  (myStory.contents == "Tuesday") {
        myStory.paragraphs[0]. appliedParagraphStyle = myStyle;
    if  (myStory.contents == "Wednesday") {
        myStory.papragraph[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Thursday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    if  (myStory.contents == "Friday")  {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    else if (myStory.contents == "Saturday") {
        myStory.paragraphs[0].appliedparagrahstyle = myStyle;
    if  (myStory.contents == "Sunday") {
        myStory.paragraphs[0].appliedparagraphstyle = myStyle;
    // it finds if in the selection of the month and day if they equal for example Decmeber 15 then applies the HolidaySub-Heading-Date
    if   (myStory.contents == "December 2") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 3") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 4") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 5") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 6") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 7") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 8") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 9") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 10") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 11") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 12") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 13") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if   (myStory.contents == "December 14") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 15") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 16") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 17") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 18") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else  if (myStory.contents == "December 19") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 20") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 21") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 22") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 23") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    if  (myStory.contents == "December 24") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    else if (myStory.contents == "December 25") {
        myStory. paragraphs[1].appliedparagraphstyle = myStyle1;
    // If text doesn't  equal Day of the week like Monday and doesn't equal month and date like Decmber 14
    // then the document loops into doing the the rest of the document in Holiday-Header-Body
    // not sure if this loop will stop once it reaches another day of the week and then repeat the above tasks again.
    // not sure if I did this IF selection not equal mystyle and mystyle1 then perform loop, is done correctly???
    if (myStory.contents !=  (myStyle && myStyle1)) {
       for (loop=0; loop<myStory.paragraphs.length; loop++)
      myStory.paragraphs[loop].appliedParagraphStyle = myStyle3;
        I'm truly grateful for the Support and Assistance everyone has been providing me, I'm learning, and I thank you all for your help.

  • When I burn a disc from a playlist in iTunes, the track names and artist info does not display on the disc when friends view/listen to it. This probably is an easy fix, but I need some advice.

    When I burn a disc from a playlist in iTunes on my MacBook, the track names and artist info does not display on the disc when friends view/listen to it. This probably is an easy fix, but I need some advice.

    No, this standard has been implemented for several decades.
    How iTunes remembers audio CDs - http://support.apple.com/kb/TA27785
    It is just conceivable you burned a CD that exactly matched one already in the Gracenote database.  Gracenote uses track count and duration to decide what CD it is you have in a computer.  If you have one that matches that it will label it.  You could conceivably even have one that matches it that is not the correct one.
    This script will only work on Macs:
    http://dougscripts.com/itunes/scripts/ss.php?sp=cdtexttocdinfo - script to use CD-text file on CD to label CD in iTunes

  • Business Delegate pattern - need some advice

    Hi. First let me apologize for the long post. I could see no other way. I�m building a system that quite large and I need some advice. The system is a type of transaction system, let�s suppose a shopping cart. I�m using struts taglibs and tiles for presentation, struts proper for controller, and POJOs for business logic. Also I�m using OJB for my data tier.
    Now I�ve been reading Pro Jakarta Struts (Apress), which BTW is a recommended read to anyone with novice experience in struts and related technologies. I�ve assimilated most of the techniques and patterns described in the book, and most of them make sense to me. However, I�ve hit a snag while reading the Business Delegate and Service Locator patterns.
    The way I had though of building my application before reading the book, was to have a wrapper class, such as the following:
    public class ShoppingCart {
      private IAuthenticationService authenticationService;
      private ITransactionService transactionService;
      public ShoppingCart() {
         authenticationService = new DBAuthenticationService();
         authenticationService = new DBTransactionService();
      public login(String username, String password) {
         String sessionToken = authenticationService.logon(username, password);
         return sessionToken;
      private boolean isValidUser(sessionToken) {
         bolean validUser =  authenticationService.isValidUser(sessionToken);
         return validUser;
      public performTransaction(sessionToken, TransactionVO) {
         if (!isValidUser(sessionToken) {
              throw new AuthenticationException();
         transcationService.performTransaction(TransactionVO);
      public editPreferences(sessionToken, PreferencesVO) {
         if (!isValidUser(sessionToken) {
              throw new AuthenticationException();
         authenticationService.performTransaction(PreferencesVO);
    }My idea was that my wrapper class would isolate all the business logic and could perform login service in case my application was ever to be used with other presentation layer than struts (standalone client, web services). However I believe that this overlaps the Business Delegate pattern and maybe even totally implements it. The way I understand the code I�m reading in the book, they suggest having a BD for each major service such as AuthenticationServiceBD, TransactionServiceBD, etc� However this would break my single point of entry for authenticating users. I really need some advice on my design and how it fits with the BD and SL patterns (or others). I would also like to know what you think/recommend of my authentication strategy.
    thanks in advance
    Raphael

    Thanks for your reply. This however, I understood. My concern is regarding my application in regards to business delegate pattern. You see I have this class (simplified for clarity):
    public class ShoppingCart {
       private ILoginService ls = new DBLoginService();
       private ITransactionService ts = new DBTransService();
       // and so on for all services I offer.
       //  then I mirror all the calls of my private interfaces
       //  and pass them through internally
       public String sessionToken login(String username, String password) {
            ls.login(username, password);
       public boolean addToCart(sessionToken, itemNo) {
            // check session
            ts.addToCart(sessionToken, itemNo);
       //  and so on
    }Multiple questions for this one:
    1) Am I not already implementing the Business Delegate pattern with my ShoppingCart class since all interfaces are private and all calls are mirrored from the wrapper class (ShoppingCart) to the private interfaces? All services are implemented as POJOs and I am not using JNDI at the present so I don't use the ServiceLocator pattern.
    2) I store a reference to the wrapper class (ShoppingCart) in the ServletContext so I can grab it from my Action classes. What do you think of this approach?
    3) How many BDs should an application contain. In my case I use just one. What is the advantage of using more?
    4) I create my own session tokens in case I ever want to use to business code in a non-web applications where sessions are not available readily. This brings about the problem that I can't pass the interfaces directly to the Action classes because the login session needs to be checked before any calls to services. So all methods include a sessionToken parameter which I use to check the session. This way, if I want to expose some of the services through web services, I can still use a login. What do you think of this approach.
    5) Any other remarks are very welcome...
    I really need help with this from an experienced programmer. Most things I can handle on my own but with this type of design issue, books just don't cut it. I need experience. I would really apreciate some feedback.
    Raphael
    ps: I would give all my Duke dollars for this (I only have 30), but I'm not sure how. If you want them I can create a dummy question and give them to you.

  • I need some advice...

    Hi, I'm not quite sure where this topic should go exactly as it isn't about a specific topic. So plz fogive me if it's wrongly placed in your opinion.
    Anyway, I've been a long time fan of Linux and I don't want to have to stop using it. I've just recently converted my whole computer to a linuxbox only system, as I was running winxp(uke) before and couldn't stand it. It would lag during simple tasks like going from one directory to another and for no apparent reason, which aided me in my conversion. Enough about winblows, I don't need to tell you guys why it sucks, we all have our reasons. But there is just one thing bothering me now... and that is gaming. I am a huge fan of gaming and have been doing so for quite some time now (years) and well... gaming on linux hasn't been too pleasant for obvious reasons.
    1) the games I play except for quake3 are written and made to run solely on a winblows workstation.
    2) Wine and Winex3 have limited, but growing support for a range of games.
    3) Lastly the main game I would like to play (Steam CS 1.6) doesn't like to run on linux due to its constant updates, which throws WInex3 out of wack. Where it could have been working the day before but due to the update it no longer runs.
    I'm thinking of just making a partition for winxp(uke) so that I can game, but this isn't something I'm totally willing to do.
    Basically I need some advice and/or suggestions that anyone is willing to share with me.
    Thank you in advance.
    BTW: I'm not new to linux, I've been using it for almost 2 years now and have tried ALL of the distro's you can think of. (Arch is my distro of choice at the moment, along with slackware.)

    Enemy Territory is an excellent game, and it is totally free.
    I haven't played the free game from the US Army, but heard it is really good, and is totally free.
    I bought Return to Castle Wolfenstein, which plays perfectly in Single player mode, but I have some trouble in multiplayer mode (and I'm not an expert either).
    I bought Unreal Tournament 2004, which plays perfectly in both single player and online, but I simply suck at the game.
    I bought Never Winter Nights because I know the company has a linux version you can download once you have a registered copy.  I havent installed it yet, though, been playing UT2004.
    Doom3 is supposedly going to have a linux installer on the CD's, like UT2004 does.
    Anygame that uses OpenGL graphics instead of DirectX will prolly run under WINE or WINEX, or be easy for the original company to port (if they choose to).
    There are some "up and coming" linux only OpenGL games, light flightgear (a flight simulator), and a couple of 'massive online games".
    Betweet RTCW, EnemyT, Never Winter Nights, UT2004, and soon Doom3 - I have enough games to play, and thats without buying winex.
    Fergettabout Windows! You simply don't need it anymore.
    If you are determined to run Windows, get a removeable drive bay, and just swap boot drives when you want to swtich.  Or use GRUB if you want to select from multiple OS's.
    thx

  • I need some advice about the macbook pro and iPhone 5. I took a video on my iPhone and tried to email it it said it was too big to send? So i downloaded it to my macbook pro and tried to mail it to no avail? The macbook tells me the server won't let it th

    I need some advice about the macbook pro and iPhone 5.
    I took a video on my iPhone and tried to email it it said it was too big to send? So i downloaded it to my macbook pro and tried to mail it to no avail? The macbook tells me the server won't let it through other mail goes through any ideas how to resize it or what it might take to send it?

    I agree with LowLister, the best option for you to share the video online is to upload it to your online storage account for example : Box, Dropbox, SkyDrive (All of them provide free storage beginning from 2GB).
    You can upload the files which you want to share in this online storage and then they have sharing options in which you'll will get the link of the file to be sent and send the email. You're good to go!
    Tip : You can store multiple files for backup purposes.

  • Having some serious issues with my iPhone and need some advice

    I'm going to these two issues which have been occuring with me for the past weeks-
    1.) I am facing a problem with my iPhone 5's lightning port or the cable. This started happening all of a sudden; one second my phone is charging, and the other it is not. Even if it is slightly moved from its position, it would stop charging, and further shaking starts it again, so on and so forth. At first I thought the issue might be with my cable, so I asked my friend to bring his lightning cable to my house so we could test that. It happened again- one shake the phone will charge, another shake stops it. (Note that any kind of movement does this, not only shaking) I'm a bit skeptical about his (my friend's) cable too, though- it shows NOT CHARGING on his iPad while it is in fact actually charging. His cable is only 3-4 weeks old though, so this confuses me even more. I think the issue might be with my port, but as of now I cannot draw a valid conclusion to my problem.
    2.) The second problem is that I've noticed my battery drains a **** lot faster now- ever since the first issue started. I manage to get my phone charging by placing it very carefully on the table and it charges overnight. However, when I pick it up in the morning, and read some news, it drains from 100% to 99% in ~60 seconds. This never happened before. Before this, it used to be at 100% for at least 10-15 minutes (might be even more). If I reboot my phone, it shows 100% again, but it still drains a lot faster now. I know because I've been using this phone for the past 4 months now, and I know when it drains and when it does nots
    Please, help! I need some advice as to how I should approach this problem. My phone is in the warranty period, however, I would like to have an expert's opinion first.

    Hello,
    First: I've experienced the same problem with my iPhone 5. I've bought a new charger and it still did the same thing. I went to the Apple Store to get my iPhone checked out and they said that the pins inside my iPhone we're damaged, and I had to get a replacement.
    ~ Josh

  • Dell Live! Value Soundblater card!!!! Need some advice

    I have an old 400 that has this card installed model #CT4780. I have purchased a new Dell E30 and want to install this card in it. I have downloaded the driver pack <FONT face=Verdana color=#ff0000 size=3>Li'veDrvUni-Pack(ENG).exe. This<FONT face=Verdana color=#ff0000 size=3> was<FONT face=Verdana color=#ff0000 size=3> listed<FONT face=Verdana color=#ff0000 size=3> on<FONT face=Verdana color=#ff0000 size=3> the<FONT face=Verdana color=#ff0000 size=3> website<FONT face=Verdana color=#ff0000 size=3> as<FONT face=Verdana color=#ff0000 size=3><FONT face=Verdana color=#ff0000 size=3> the<FONT face=Verdana color=#ff0000 size=3> correct<FONT face=Verdana color=#ff0000 size=3> one<FONT face=Verdana color=#ff0000 size=3> for<FONT face=Verdana color=#ff0000 size=3> XP.<FONT face=Verdana color=#ff0000 size=3> I notice that in the old computer there is a cable from the card to the CD-Rom and also one from the card to the modem. Are these cables need in the new computer? Also will I have a conflict with the integrated sound card that came with the new computer? I have not done anything expect download the driver pack.
    I know some about computers but do not like to install boards and new computers fearing some thing will go wrong. I need some advice and the procedure before I preceded. Any help would be greatly appreciated. Thanks

    Newer operating systems, computers, & audio cards do not require the use of the cable from the CD Rom to the soundcard. It is now handled via the IDE cable. Being that you only upgraded half of this equation (that being the computer and not the soundcard), this may be a "trial & error" situation. I do not have the experience with modem cards to comment on that one.
    Finally, you will need to disable the onboard soundcard via the motherboard's Bios. Look in the MB's manual to perform this action.
    Message Edited by johnston2 on 0-25-2006 06:49 PM

  • Songs disappearing. Need some advice.

    I need some advice regarind my ITunes library. I spent a lot of time importing all my cd's. I now have approx. 14,000 songs now. First I had put them all in as mp3's, then I heard about the quality and smaller size of AAC. I think that is where some duplicates came from. But some how I've ended up with up to 6 of a lot of my songs, at least it is showing 6 copies of many of my song in my ITunes library. But when I go to delete all but one of the songs, through ITunes, sometimes it is fine and sometimes I get the ! icon. I guess even though I left one in Itunes it actually deleted all copies. I did not know I was doing this because it doesn't show the ! icon until you go back and try to select the song. This took days and days to deleted over 6,000 duplicates.
    Now I'm finding some albums are missing songs and some are missing the whole albums even though they show in Itunes. I even have gone through and tried to "FIND" the songs some are really there but most are not. So how to I go about reconstructing the library. Is it best to try and find each one or just wipe (delete) my library clean and just reimport the entire library? I'm talking about reconstructing approximately 12,000 songs and I have no idea how many cd's.
    I just would like to know how you guys would handle this. Thanks for your help.
    Nancy

    miner78 wrote:
    Need some advice....I just bought the new retina MacBook Pro (2,199 model) and after reading about the ghosting or burn in issues that some users are experiencing I am starring to wonder if I made the right decision.  I am still waiting for my laptop to come in so I can still cancel my order.  I'm seriously considering opting for the non-retina MacBook Pro instead.  This will be my first Mac and I will mainly be using it to browse the web and do photo editing (I'm an amateur photographer) I know the non-retina doesn't not come with SSD and wondering how much of difference that makes.  Any advice, suggestions will be welcomed
    That's incorrect:
    Order online and for a fee you can have an SSD.

  • I'm Back! Need some Advice! Rebuild time! 6/19 UPDATE! 2nd UPDATE 7/6/15

    WooHooooooo! Another quick update, only 5 minutes ago I found this link on credit karma http://www.creditonecards.com/pre-qualification.php?C1BSourceID=C1B1  that lets you prequalify for a credit card! Which I have tried many many many times  only to recieve the message sorry we couldn't prequalify you at this time but here are some SECURED cards you may like which sucks! I decided to try one more time at this link and was totally surprised to get preapproval for a platinum card yay! Mind you, this card is probably the worst card to get and I will probably never ever use it, just need it to help with my utilization scores. The fees are high, the rates are high, the balance is low........but oh well I am still doing the happy dance!!!

    izzesparks wrote:
    Hi everyone! Long time no see! Just need some advice on what else I should be doing. I have been a part of this forum for many years now and I have taken and heeded so much advice that my head is about to explode and now I just want to make sure I am not forgetting anything. I tried to keep it short  Last time I was on I hadn’t reached the 600 club yet. But I am here now in the 600 club! Still the low 600’s but its progress. Unfortunately slow progress because a lot has happened since I was last on here. I am now officially divorced. I finally have permanent steady income, no temp services anymore phew. I have had to reevaluate my budget and cut a lot of things out. No cable, no home phone, monitor my electric bill like a hawk and learn to like the darkness, cold in the winter and the heat in the summer. I have an older smart phone, had to do without the latest gadgets and gizmos, which truly hurts my heart because I am an electronic fiend. No tablets here, no high tech laptops. Instead of buying a new car and making payments I bought a really good used gas-efficient car cash, paid in full. But since it’s still a newer car I am paying for full coverage insurance, my only splurge. I have spent this time away from this forum truly taking heed to the lessons I learned on here and reflecting on my situation. I have paid nearly everything off! It took some time but I only have 2 creditors left ‘that I know of’ to pay.One of the creditors has not reported to the bureaus yet but I want to take care of them before they do. Most of the ones I paid have already fallen off because of SOL. I was getting to the point I had the problem where I didn’t just have bad credit, I had NO credit. I hadn’t opened any new accounts until this year. Just today I opened a $500 Secured Personal loan and a few months ago I opened a $300 Secured Credit Card at my credit union. I also applied for a Quicksilver CapOne card and was approved for $300. I just started school this year and there is now a financial aid loan of $1750 that is reporting on my credit report as deferred right now. I tried to prequal for some more but was denied by all of them. So far only quicksilver would approve me.  My plans are to move out of state next May and get an apartment for 6 months while I get the lay of the land and then purchase my FIRST home!! Hopefully everything has aged by then and I have had some CLI’s.  My situation in a nutshell (Transunion was only report pulled) USED CREDITCHECKTOTAL TO PULL ALL 3 FICO REPORTS The good:UPDATES BELOW FROM 7/6/15SDFCU Visa Secured $300 – reporting paid on time every timeQuicksilver Unsecured $300 – not reporting yetSecured Personal Loan $500- not reporting yetUtility- reporting paid on time every timeNEW CARDS ADDED-Cap One Platinum MC Unsecured-not reporting yetVictoria Secret-not reporting yetMarisota-not reporting yetSent a Goodwill email for the Portfolio account listed below 6/1/15, now must wait patiently. UPDATE!! 7/6/15 SENT 3 GOODWILL LETTERS NO RESPONSE. The bad:                                                                                                                                                                                                     DEBT RECOVERY SOLUTIONS- I PAID IN FULL ON 5/27/15 Haven't found a good email contact to send a GW letter, but the search continues....Original Creditor11 VERIZON MARYLAND INCStatus-OpenOpened Date-Mar 06, 2014Balance -$146 Collection Agency-FCOOriginal Creditor HERITAGE WOODSStatus -OpenOpened Date -Jan 21, 2011Responsibility – Joint (THIS IS IN BOTH MY NAME AND MY EX-HUSBAND, AND HE SAYS HE WILL HELP PAY, BUT HE IS NOT GREAT AT FOLLOW THRU)Balance- $1,912 (They have agreed to settle for less than owed for $978)    STARTED PAYMENTS, ASKED SEVERAL TIMES FOR A PFD, EVEN ASKED A SUPERVISOR AND THE RESPONSE WAS A BIG FAT NO, SO I AM GOING TO GO THE GOODWILL ROUTE. Collection AgencyPORTFOLIO Recovery (I ALREADY PAID A SETTLEMENT FOR LESS THAN OWED, ON 5/27/15)Original Creditor HSBC BANK SENT GW LETTER, NO RESPONSEStatus -OpenOpened Date-Apr 15, 2013Balance -$518 Collection AgencyRECEIVABLE SOLUTION (PAID IN FULL ON 5/27/15) THEY HAVE AGREED TO DELETE YAY!Original Creditor MED1 AMERICAN CURRENT CAREStatus OpenOpened Date Jul 25, 2013Balance $101 Collection AgencyUNITED CONSUMERS (PAID IN FULL ON 5/27/15) THEY HAVE ALREADY DELETED FROM ALL 3 CRA'S YAY!Original Creditor MED1 EMERGENCY PHYSICStatus OpenOpened Date Oct 06, 2011Balance -$109 ACS/JP MORGAN (PAID IN FULL ON 2/25/15) Tried several times for a goodwill, no responseOriginal Creditor- Wells Fargo education servicesStatus- closedopen date- 04/2004balance- $3000 ACS/JP MORGAN (PAID IN FULL ON 2/25/15) Tried several times for a goodwill, no responseOriginal Creditor- Wells Fargo education servicesStatus- closedopen date- 04/2004balance- $800 ECMC (TRANSFERRED TO ACS/JP MORGAN) Tried several times for a goodwill, no responseOriginal Creditor- Wells Fargo education servicesStatus- closedopen date- 04/2004balance- $800 ECMC (TRANSFERRED TO ACS/JP MORGAN) Tried several times for a goodwill, no responseOriginal Creditor- Wells Fargo education servicesStatus- closedopen date- 04/2004balance- $3000 A new account was added to my credit report Trident asset - original creditor - Lowe's home improvementI disputed the account since I do not remember ever shopping there, claims I wrote a bad check. I don't even have a checkbook, never have. A new creditor sending letters to me now (boy they sure are coming out of the woodworks, not that I have started paying everyone off) NOT reporting to CRA's yet, going to try to take care of this next week before it does. Sooooooooooo what should I do know????!!!! Thanks in advance for any advice given! 

Maybe you are looking for