What is the use of jsp when compare with Struts

what is the use of jsp when compare with Struts

JSP Tag Libraries are great for reusable content formatting and ligic.
For example, let's say you have this Shopping site. Each item you sell is stored in a database, and you get them out depending on Catagories, creating a List of ItemBeans. You allways want to display the items with a catagory header, then a <table> with the item number, the description and the price.
Instead of creating a bunch of logic in the JSP that does this, you can pass it on to a Tag that might look like this in your JSP:
<shopping:itemTable catagory="${selectedCatagory}" items="${itemsForCatagory}" />
This would make the JSP easier to read and work with.
The actual uses are incredible. Have you used the <jsp:useBean ...> tag? That is an example of a use of the Custom Tag Libraries.
Furthermore, look into JSTL (JSP Standard Tag Libraries). They are a collection of tags (API by Sun, coding by Apache) used to do many of the standard actions you might want/need to do in JSPs, like a conditional tag (c:if only do something if the test is true), multiple-conditional tags (c:choos c:when c:otherwise) like an if [else if] else construct. Looping through an array or Collection (c:forEach), storeing values in scopes (c:set) formating numbers and dates (the fmt library), xml transformations (xml library), and lots of other things that you could replace scriptlet code with.

Similar Messages

  • What is the use of destroy() when there is an automatic garbage collector

    what is the use of destroy() when there is an automatic garbage collector

    what is the use of destroy() when there is an
    automatic garbage collectorI don't recognize that particular method but some classes have a so called explicit termination method. Usually classes which allocate OS resources have such a method. It has to be called before the object is released for GC so the OS resourses can be returned properly.
    Or do you mean finailize()? See "finalizers are not your friend" here,
    http://www-128.ibm.com/developerworks/java/library/j-jtp01274.html

  • What is the use of Data packet dim with Virtual cube with services

    Hi Friends,
    Could anybody tell me what is the use of Packet dimension in Virtual cube with services , It cannot contain data persistently ,Just fetch at runtime,Then there is no Physical load happening,Then why it should be automatically created for this??
    Message was edited by: Pradeep choudhari

    Hi Maik,
    Unit dimension will not be created automatically until and unless you have keyfigure referning units..
    But my question is : Why should we have data pack dimension , which is useless in this case of Virtual cube with services.It should not be created automatically!! What do you say??

  • What is the design pattern for web application with struts & hibernate?

    Hi everyone,
    I am new to web application developement.I am using struts for MVC framework & Hibernate for ORM framework.I am little confused that struts used bean representation for collecting form fields(Bean 1),value objects(DTO) for passing value to the JSP(Bean 2) & hibernate use the bean like representation for persistent object(Bean 3).Whether we must use all the bean's which are similar to each other or any reusable bean recommended?

    I'm sure why it didn't work. That is how I bundle the JRE. The only disadvantage about bundling is the size of the installer file will be pretty large. In my opinion, relying on a public version is not a good idea if you have no control of the target box. The user might, for some reason, decide to uninstall java or upgrade to a new incompatible version and your app. may stop working. I'm sure many on here will disagree with this though.
    I always use the marner .exe wrapper:
    http://www.megaupload.com/?d=FYZAVM77
    and inno installer:
    http://www.jrsoftware.org/isinfo.php
    They're both free to use and I've had no problems with them. Another wrapper is Javaround:
    http://sourceforge.net/project/showfiles.php?group_id=234356

  • What is the use of Host in Technical system

    Hi experts,
    While creating Technical sytem what is the use of creating Host.
    while creating Business System we create Logical System.When we are creating for Sap system then there we give client logical sytem name,but while creating for third party systems what is the use of it.....
    while creating Technical system and Business system v have 4 radio buttons
    Web As ABAP
    Web as Java
    Standalone
    thirdParty
    what is the use of Standalone when and in which senario we use this Standalone.
    Note:valuable anser will be rewarded.
    Regards,
    Phani

    Hi
    1. Third Party: Can be any Tech System. For example you want to send a xml message from a file adapter residing on your PC. You can define your PC as a 3rd party Tech/Business System.
    2. StandAlone Java: WEBAS640 has got Basis and Java Stacks. If you installed <b>only the standalone java Stack on a server</b>, then you define a standalone java tech system.
    Regards
    krishna

  • What is the use for CREATING VIEW WITH CHECK OPTION?

    Dear Legends,
    I have a doubt
    What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.
    A: Enforcing constraints at DB level.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???
    Please clear my doubt's Legends
    Lots of Thanks....
    Regards,
    Karthik

    Hi, Karthick,
    karthiksingh_dba wrote:
    ... What is the use for creating view?
    A: First Data Integrity, Selecting Particular Columns..Most views are created and used for convenience. A view is a saved query. If the same operations are often done, then it can be very convenient to code those operations once, in a view, and refer to the view rather than explicitly doing those operations.
    Sometimes, views are created and used for security reasons. For example, you many want to allow some users to see only certain rows or certain columns of a table.
    Views are necessary for INSTEAD OF triggers.
    What is the use for creating a view with check option?
    A: As per oracle manual I read that its a referential integrity check through views.The reason is integrity, not necessarily referential integrity. The CHECK option applies only when DML is done through the view. It prohibits certain changes. For example, if a user can't see certain rows through a view, the CHECK option keeps the user from creating such rows.
    A: Enforcing constraints at DB level.I'm not sure what you mean. Please give an example.
    A: using CHECK OPTION we can do INSERTS UPDATES for a view for those columns who have no constraints... is it right??No. Using CHECK OPTION, you can do some inserts and updates, but not others. The columns involved may or may not have constraints in either case.
    A: If we do a INSERT OR UPDATE for columns who have constraints it will show error... is it right???If you try to violate a constraint, you'll get an error. That happens in views with or without the CHECK OPTION, and also in tables.

  • What is the use of Tcode : FBE1  ?

    Hi,
    What is the use of Tcode : FBE1  ? with example please.
    Regards.

    Hi,
    FBE1 is used for creating payment advices. You can create payment advices for both vendor and customer. Generally this information you will receive from customers, based on that you can create payment advices. Once payment advices are created, you can use these payment advices when the actual payment information comes from bank statement. By the help of payment advices you can identify the open items based on that you can clear the items.
    Hope u understood.
    Regards
    Srikanth

  • What is the use of # in DAL script ?

    Hi Guys,
    In DAL script what is the use of # ? When I am not putting # the keywords are looking blue (Which I think its correct) but in the Help it mentioned with #. If I am putting # in the code then it became grey colour. Which one is the correct ?
    Thanks,
    Bikas

    Hi Bikas,
    # is used to validate numeric values. Please find the sample below.
    Scenario 1_:
    X = Getdata("!/xyz 1,10")
    X may take alphanueric values
    Scenario 2_:
    #X = Getdata("!/xyz 1,10")
    #X will only take numeric values.
    Based on your requirement you can use # accordingly.
    Please let me know if any information required.
    Thanks,
    Sravanthi M.

  • What are the advantage of using Oracle Database when compare to SQL SERVER

    Hi all
    Please tell anyone about
    what are the advantage of using Oracle Database when compare to SQL SERVER
    Thanks in advance
    Balamurugan S

    user12842738 wrote:
    Hi,
    There are various differences between the two.
    1. SQL Server is only Windows, but Oracle runs on almost all Platforms.
    2. You can have multiple databases in SQL Server, but Oracle provides you only one database per instance.Given that the very term 'database' has s different meaning in the two products, this "difference" is absolutely meaningless.
    3. SQL Server provides T-SQL for writing programs, whereas Oracle provides PL/SQLWhich means what? Both products have a procedural programming language. They named them differently, and the languages are not interchangeable. Means nothing in comparing the features/strengths/weaknesses/suitability to purpose.
    4. Backup types in both are the same. (Except Oracle provides an additional backup called Logical Backup.)You make that sound like "Logical Backup" is something more than it is. It is nothing more than an export of the data and metadata. Many experts don't even consider it a backup. I'm sure SQL Server provides the same functionality though they probably call it by some other name.
    5. Both provide High Availability.Well, I guess they both have a suite of features they refer to as "High Availability". But what does that really mean? The devil is in the details. Remember, the two products don't even agree on what constitutes a "database".
    6. Both come in various distributions.???
    >
    If you are going for an Implementation, you can try SQL Server Express Edition and Oracle XE which are free to use.
    Then you can choose whichever is comfortable for your needs.
    Thanks.

  • What is the use of t-rfc in ALE? compared to t-rfc, Qrfc is better and effi

    what is the use of t-rfc in ALE? compared to t-rfc, Qrfc is better and efficient?

    Hi Sunil,
    These are the types of RFC
    Asynchronous RFC (aRFC)
    Synchronous RFC (sRFC)
    Transactional RFC (tRFC)
    Queued RFC (qRFC)
    Parallel RFC (pRFC)
    Asynchronous RFC :
    This is used when you need to increase the performance of ABAP program by having system call more than one function module in parallel than forcing the program to wait for results .
    Transactional RFC
    This let you group one or more function module call together o tRFC LUW and ensure that fucnction module within LUW is called once . In contrast to aRFC and sRFC the tRFC belonging to tRFC LUW are executed in order .
    tRFC is always used if a function is executed as a Logical Unit of Work (LUW). Within a LUW, all calls are
    1.Executed in the order in which they are called
    2.Executed in the same program context in the target system
    3.Run as a single transaction: they are either committed or rolled back as a unit.
    Implementation of tRFC is recommended if you want to guarantee that the transactional order of the calls is preserved
    Asynchronous remote function calls (aRFCs) are similar to transactional RFCs, in that the user does not have to wait for their completion before continuing the calling dialog. There are three characteristics, however, that distinguish asynchronous RFCs from transactional RFCs:
    • When the caller starts an asynchronous RFC, the called server must be available to accept the request.
    The parameters of asynchronous RFCs are not logged to the database, but sent directly to the server.
    • Asynchronous RFCs allow the user to carry on an interactive dialog with the remote system.
    • The calling program can receive results from the asynchronous RFC.
    You can use asynchronous remote function calls whenever you need to establish communication with a remote system, but do not want to wait for the function’s result before continuing processing. Asynchronous RFCs can also be sent to the same system. In this case, the system opens a new session (or window). You can then switch back and for between the calling dialog and the called session
    RECEIVE RESULTS FROM FUNCTION Remotefunction is used within a FORM routine to receive the results of an asynchronous remote function call. The following receiving parameters are available:
    IMPORTING
    TABLES
    EXCEPTIONS
    The addition KEEPING TASK prevents an asynchronous connection from being closed after receiving the results of the processing. The relevant remote context (roll area) is kept for re-use until the caller terminates the connection.
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • What is the use of delta in BW side when we have delta in R/3

    Hi,
    what is the use of delta in BW side when we are already using delta in R/3 side?
    Like,
    Generic extraction:-
    with different delta extractions (Time stamp, Calendar day, Numeric pointer).
    Lo-Cockpit extraction with change log method.
    Co/Pa extraction with time stamp method.
    So from this delta activation first time full data will be loaded and after that only changed data will be loaded because of these deltas in R/3 side.
    So now my question is what is the exact use of delta in BW side with ODS/DSO because data already reached to BW with delta activation right.
    Can you please explain me what is the exact use of BW delta?
    Thanks in advance.
    Points to be added.
    Regards,
    Shyam.

    The purpose of Delta Queue is same in R/3 and BW.
    In BW, Delta Queue is used to capture changes made to objects within BW. (for Eg: BW Statastics)or Update data from one BW system to another BW system (if you have multiple BW systems).
    Message was edited by:
            Praveen Vujjini

  • HT4293 i am trying to use dual monitors when editing with FCPX. I have a macbook pro and an apple cinema display monitor. I have connected them and opened Fcpx but the option to use second monitor is not active! what do i do ? please help going bonkers!

    i am trying to use dual monitors when editing with FCPX. I have a macbook pro and an apple cinema display monitor. I have connected them and opened Fcpx but the option to use second monitor is not active! what do i do ? please help going bonkers!

    <http://support.apple.com/kb/HT5891>
    You can use USB for the Apple trackpad.
    <http://www.mobeetechnology.com/the-power-bar.html>

  • What is the use of session in jsp

    hai,
    what is the use of session in jsp. i cant understand from books. give some practical approach
    thanks

    give some practical approachYou sound like a supervisor ordering for a cup of coffee.
    I DONT TAKE ORDERS !!
    IMAO
    Which book did you refer ? Did you google ?

  • What does the RHD symbol mean when using the multiple speakers?

    i have two 1st gen apple TVs and when i pull up the multiple speakers prompt, i see an acronym "RHD" after each device.
    what does the RHD symbol mean when using the multiple speakers?
    typically i was used to seeing the Apple TV-1  vs. Apple TV-1-RHD??
    What is the difference?

    It's been modified to run Remote HD.
    http://remotehd.com/

  • I upgraded to iOS 7 to my ipad using iTunes. When signing with the Apple ID I get an error reading "There was a problem connecting to the server" anyone who knows what to do next

    I upgraded to iOS 7 to my ipad using iTunes. When signing with the Apple ID I get an error reading "There was a problem connecting to the server" anyone who knows what to do next

    Sounds more like you have a problem with your apple id. For starters go to that page click manage my apple id and singn in. If you can't sign in reset password.
    https://appleid.apple.com
    if you can sign in there, try to sign in to itunes on your computer.

Maybe you are looking for