Hi i want to how to use DTO in struts frame work.

hi all,
i want to display content on jsp pages using DTO object.
in my application one jsp page for user input. foruser input i am creating one action form for this. and also one DTO class for handing action form .
my main aim is elimunate the actionclass coding thrugh DTOclass .
this is my problem.
can you tell me how to do this.if any solution please forward me .
my email address is [email protected]

Please ignore my previous answer. RowSetDynaClass can be implemented DTO but this will only solve half of your problem. RowSetDynaClass can be used to retrieve the data from the database. RowSetDynaClass cannot be used to encapsulate the data from a Form to take to the database. For this you can use a HashMap or BeanUtils classes.
There are a few examples of implementing those. But I am still looking for a good one.
Is there any point to use RowSetDynaClass to retrive info from DB if you are going to use a HashMap/BeanUtils to get the information from the Form? Should we only use HashMap/BeanUtils for transport the information back and forth between DB and View?
Message was edited by:
gabinux06

Similar Messages

  • How to create web site using STRUTS frame work

    Hi,
    I know how to create web pages using JSP & Servlets.But now i have to create Matrimonial web site using STRUTS frame work.Plz any one guide for me...
    Thank U....

    Struts is not to be confused with JSF.
    Start at their own homepage over there at apache.org.
    Good luck.

  • How to get MS Access DB connection in struts frame work?

    Hi All,
    I am trying to get MS Access db connection in struts frame work .
    I am using websphere.I don't know whether i have to set any configuration in the WSAD.
    In struts-Config.xml i am having this mapping
    <data-source
    type="org.apache.commons.dbcp.BasicDataSource"
    key="userDB" >
    <set-property property="driverClassName"
    value="sun.jdbc.odbc.JdbcOdbcDriver" />
    <set-property property="url"
    value="jdbc:odbc:localhost:9080/u:/EmpDetails.mdb" />
    <set-property property="username" value="" />
    <set-property property="password" value="" />
    <set-property property="maxCount"
    value="4" />
    <set-property property=" minCount="
    value="2" />
    </data-source>
    In the action class i am having this code
    dataSource = getDataSource(request, "userDB");
    conn = dataSource.getConnection();
    stat=conn.createStatement();
    result1=stat.executeQuery("select * from emp");
    While trying to execute this code i am getting this error
    java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted
    any idea why this error is occuring?
    Thanks in advance
    Janaki.

    Yes i know that but i only wanted to know how i will connect MS Access database with Java desktop Application in NetBeans

  • What is the exact use of STRUTS frame work??

    Hi every one,
    I'm new to this STRUTS frame work. Can any one explain me in detail (if possible with an example) about,, why we need to use STRUTS framework as we have already JSP's.
    For example if we want to move from one JSP to another JSP, it is quite easy to move to the page with out any other extra logic. Where as comes to the point of STRUTS, we need to write, JSP form, Form-bean class, Action Class, configure our STRUTS XML file, if validation needed validation xml files. Is it not looking cumbersome to process?
    Please help me to recover from this...
    Expecting reply from many of you..
    Thanx in advance.
    Sriram

    meetshriram wrote:
    Hi every one,
    I'm new to this STRUTS frame work. Can any one explain me in detail (if possible with an example) about,, why we need to use STRUTS framework as we have already JSP's. Struts is a web MVC-2 framework.
    For example if we want to move from one JSP to another JSP, it is quite easy to move to the page with out any other extra logic. No, there's logic, and it's embedded into the page.
    It's fine for one page to another, but when you have a substantial application that has tens or hundreds of JSPs it's much harder to manage.
    Where as comes to the point of STRUTS, we need to write, JSP form, Form-bean class, Action Class, configure our STRUTS XML file, if validation needed validation xml files. Is it not looking cumbersome to process?
    Extra complexity does cost you something. Ask yourself what it's buying you: better layering, more configuration and less code, validation, etc.
    %

  • How to use displaytags with struts

    How to use display tags with struts to generate report from database

    I think it would only consist in including the tag library of displaytags in the header and use the prefix of desplay tags.
    Exporting the report from a database would only need to retrieve this information from the database as a List, Map or Collection of objects (beans) and display tem with the corresponding tag (table)
    You have some more information here:
    http://displaytag.sourceforge.net/11/tut_basic.html
    Regards and good luck,
    Fran Serrano.

  • How to use cookies in struts

    hai
    iI am new to struts. I want to get value in text field from one form to another using cookis in struts, can any one help me?, please...

    To write a cookie in Struts, you create one and add it to the response object. (response.addCookie(cookie)).
    To read it, you use the bean:cookie tag.
    As to use cookies to get a given value from one form to another, there might be better ways, like using request attributes.
    You might be better off keeping those cookies in the jar, after all.

  • How to use internationalization in struts

    how to use the internationalization in struts with clear example

    http://www.google.com/search?hl=en&q=ajax+struts&btnG=Google+Search

  • How to use coolies in struts

    hai
    i got answer for this in O'Reilly Jakarta Struts Cook Book....
    thanks...

    I don't think you should use coolies in struts at all. Or for anything at all. I abhor slavery of any kind

  • I want know how to use the ring tones I made on my i-phone

    I have a ring tone app. I used it to create some 15 second ring tones from the songs on my i-phone (3Gs). I emailed the ring tones from the app to my email account and then I added them onto my i-tunes in the ringtone section. I can not figure out how to take the ringtone and make it work on my phone. I've synced my phone and I don't see them being added. Can someone give me the steps to take after I have the ring tones saved to my library in i-Tunes? Thank you!
    Lisa

    You have to make the changes you want in the folders on your computer, then sync your new choices via iTunes.  iPhone, iPad and iPod touch: Syncing photos via iTunes, http://support.apple.com/kb/HT4236

  • How to use jdbc in struts ?

    i want to connect to database and fire insert, select etc queries but my code should be in struts framework

    Struts is only a view-controller framework. MVC implemented properly places the database operations in the model tier. So, I would advise against doing something that seems quick and simple initially (such as firing off JDBC from a JSP).
    Rather, use Struts to simply be your VC. Within your model tier, create data access objects. These can use an ORM such as JPA (Hibernate, Toplink, etc.) or vanilla JDBC. My assumption since you are using Struts is that you at least have a Servlet container, likely Tomcat or Jetty. If so, there is documentation for each of those containers on how to set-up a JDBC data source. You can use JNDI within your model tier to access the DataSource (if you are using plain JDBC) or to supply the connection information for your EntityManagerFactory (if using JPA).
    If you are not sure how to even perform database access, I would recommend taking a JDBC tutorial. Do so standalone and not bothering with Struts or even Servlets. Once you have JDBC down, you can proceed to JPA and/or then integrate with Struts.
    - Saish

  • How to use Ajax In struts

    I want to use Ajax in my struts framework.Can anyone please suggest me how
    to do this
    Thanks

    http://www.google.com/search?hl=en&q=ajax+struts&btnG=Google+Search

  • How to use TextFormat on multiple frames

    I must be missing something, but how on earth do I make it so
    that I can set TextFormats for the whole movie and not just the
    frame the actionscript is on.
    My movie is basically a video with cuepoints that trigger
    different keyframes that display text appropriate to what the
    person featured in the video is talking about. In other words it's
    like a powerpoint presentation that's run by an FLV file. Almost
    all of the blocks of text I'll be displaying are bulleted lists and
    since, for some odd reason, bulleted lists aren't available using
    the standard Flash GUI text formating tools I need to apply them
    via ActionScript. All the ActionScript is in its own keyframe at
    the beginning of the movie timeline. I've setup my text formating
    code like this:
    var bulletlist:TextFormat = new TextFormat();
    bulletlist.bullet = true;
    bulletlist_field.setTextFormat(bulletlist);
    While I have successfully applied this to a box of text on
    the first frame of the movie, I haven't be able to apply it to text
    on any other keyframe. So from what I can tell, I have to reference
    the above TextFormat actionscript for every frame I need to use it
    on, and since I can't have duplicate TextFormat values, that means
    I'd have to create a new instance with a new name for each frame.
    This seems rather inefficient and frankly ridiculous consider that
    the other ActionScript that I wrote seems to apply to the whole
    movie. And what's the point of using ActionScript to format text if
    you have to redo it for every *******' keyframe? Is there some
    function that I'm missing somewhere to allow me to use one set of
    TextFormat code on multiple frames or is this simply a dysfunction
    of Flash and/or ActionScript 3.
    Any help would be appreciated.

    Craig Grummitt - Why so it is. Thanks for pointing that out.
    But my point still remains: You can change the defaultTextFormat
    property before you assign the text property or you can use
    setTextFormat() after you have assigned the text property. That one
    is a property and the other is a method just makes it more likely
    that somebody will over look one or the other!
    fallenturtle - part of the issue is that really great
    typographic stuff is tough and most people can't even use the
    simple tools that we have. For use with CS4 and Flash 10 publishing
    they are coming out with a far more complex Text Layout Framework.
    As best I can tell it is insanely complex and I'm guessing most
    people will never use it....but who knows.
    Additionally you are trying to do one of the more difficult
    things: mix timeline with code. That always gets tricky. If you
    were just using code you could create one textformat instance and
    apply it to all your code-created text fields. But since each
    timeline created clip is a new one you will need to apply the
    formatting by hand.
    Or you could just have one timeline created text field that
    went across all your frames and then change its properties with
    code everytime you needed to change it.

  • How to use session in Struts

    Hello, there:
    It's a simple question.
    I have a web app which has a login page, in its action class I create an object, user, and save it into session by using request.getSession(true).setAttribute("user", user).
    In another action class, I want to use the info of user then I use request.getSession(true).getAttribute("user"); however, the returned object is NULL. Did I use session in a wrong way?
    Thanks,
    Sway

    Did I use session in a wrong way?No, you are using the session correctly. The code looks fine.
    Check
    - your spelling of the attribute names - obviously they must match
    - the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
    There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
    The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
    In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
    Hope this helps,
    evnafets

  • How to use the url in the work item

    hi ,guys ,
       I have question in design the workflow, my scenario is as follows : I develop the workflow in the sap gui ,then integrate it into the portal using uwl . now i want add a link in the work item ,before approver excute the work item ,the approver can click the url to view the detail approval information ,and the system popup a web window which link to the pcui application . and someone advise me to maintain the href in the work item text ,but i have no iead on it ?can anybody give me some advices or sample material ?thanks in advance .
    Jialiang.Qiu

    Hi
    If we talking about adding an URL in the GUI workitem display you can proceed as follows:
    1. In the workitem text editor, change the editor to line editor (Goto -> Change editor)
    2. enter the tag /* (Usually used for comments) to the left
    3. enter the URL on the line as follows <a href=http://www.cnn.com> click here</a>
    Regards
    Morten Nielsen

  • How to use Schedule End Date in work flow

    I want the delete pages from Page library after the “Schedule End Date” is reached.
    I used workflow, but the “Schedule End Date” column values always returns 1/1/1000 in workflow.
    I am unable to get the actual “Schedule End Date” value form the pages.
    Any help
    with Regards Sivam

    Hi Siva 2013,
    I made a test in my environment and I reproduce your issue.
    By default, it is a hidden field. I make the field unhidden using SharePoint Manager. I set the field with a specific value, and I create a workflow to log the value. But, it always show "0001/01/01".
    As a workaround, I suggest you can filter the items using CAML Query and delete them using Client Object Model.
    I suggest you can filter the items using CAMLDesign.
    More information:
    Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/ee539976(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    CamlDesign:
    http://www.camldesigner.com/
    Best Regards
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for

  • Endianness when running under Rosetta?

    Hi all, I have a Carbon application which is reading binary data from a file's resource and then has to work with that data. I know the endianness of the data on disk so I used to do a byte-swap when necessary (after using ReadPartialResource() to ge

  • Adding a gif image

    At the moment I have just drawn checkers but I would like to add a .gif image so it looks alot better. But im really unsure how to do this without completely messing things up. Thanks to any help guys import java.applet.*; import java.awt.*; import j

  • Defining and activating Non Leading Ledger

    Hi! I am facing problem in assigning company code to non leading ledger, system is giving the message: Migration service must be used for production company codes Message no. FAGL_MIG223 The scenario is like below: Head office is at SIngapore, with c

  • Return Cell information in a Table

    Hi, I have a table component with 5 rows and 6 colums and the only item i can select is a position or row. Is there any way i can return the information of a particular cell. Or is there any other component that can fetch me the same funcionality? I

  • "sticking" IP address using DHCP

    I have a problem of a "sticking" IP address when using DHCP to connect to the wi-fi network in my office. Every time I connect I get assigned the same IP address, usually a high number like 192.168.1.182 or 240. My connection then gets progressively