- World's Largest Collection of Frequently Asked Questions
Thursday, August 28, 2014 Home| Ask Questions| About Us| Feedback| Contact Us|
 Common FAQs  
 Our Services  

Question :
How should I model parameter passing in JSP and the relationship between JSP and JavaBeans using UML?
Category Methodology Interview Questions
Rating (0.0) By 0 users
Added on 4/11/2009
Views 118
Rate it!

There are two principal ways to model parameters being passed from a HTML source on the client to a <<server page>> on the server. The first is to put them in a tag value, called parameters. For example:

+------------------+ +--------------------+
| <<client page>> | <<link>> 0..n | <<server page>> |
| Catalog |----------------------------->| Product.jsp |
+------------------+ {prameters="prodid"} +--------------------+
<<build>> |
| <<client page>> |
| Product.html |

In the above example the link from Catalog to Product.jsp indicates that a standard anchor tag is used (i.e. <a>) and that appended to the url is the parameter prodid. At design time this parameter is not given any value, since it is likely to be runtime generated thing. Also note that in this catalog page there are potentially many links to product pages, all with potentially different prodid params.

Multiple parameters can be passed simply be adding them in the string just as you would append them to the url. For example if the parameters tag value was "action=add&prodid&qty". It would indicate that at design time the parameter action was always set to add, and the values for prodid and qty are either not specified, or are specified at runtime.

If the parameters being passed to the server are more complex, and where it might be useful to document heavily each and every one. Then you might want to model them as and association class on the <<link>> association. This lets you not only specific all the parameters, but gives you an oppertuity to specify datatypes, and default values for each. This of course is overkill for most simple parameter usages, but is handy for those special occasions.

+------------------+ +--------------------+
| <<client page>> | <<link>> | <<server page>> |
| HomeMonitor |----------------------------->| HomeControl.jsp |
+------------------+ +--------------------+

| <<parameters>> |
| ControlInfo |
| homeid : long |
| deviceid : long |
| action : enum |
| value : string |

Modeling bean usage in a JSP begins with a <<use bean>> stereotyped directional association from a <<server page>> class to the bean.

+------------------+ +--------------------+
| <<server page>> | <<use bean>> mySched : Schedule | |
| Calendar.jsp |---------------------------------------->| DutyScheduleBean |
+------------------+ {scope=session} +--------------------+

The role name corresponds to the jsp:usebean id attribute, the role specifier Schedule corresponds to the type attribute, and the tag value for scope is the use bean scope attribute. The beanname attribute is another valid tag value that can be specified at design time.

<jsp:usebean id="mySched" class="com.mycompany.myproj.mysubsys.DutyScheduleBean" type="com.mycompany.myproj.comiface.Schedule" scope="session">

If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

    Related Questions
    View Answer
    Recommendations for evaluating UML models? I am trying to put together a set of review guidelines for evaluating UML models that the developers assemble for the respective projects. If you were a reviewer, what would you be looking for to pronounce that the approach or solution is acceptable and sound for the various types of UML diagrams such as Use Cases, Class Diagram, Sequence diagram, etc.)?
    View Answer
    How do we express the relationships between EJB Entity Beans in UML?
    View Answer
    If I'm not object-oriented savvy, from what books can I learn UML?
    View Answer
    What is the difference between an API and a framework?
    View Answer
    Can I use class diagrams to model the logical database design? E.g., can I create a class diagram where each class represents a table in a database and then show the relationships between them along with their attributes and operations (such as stored procedures)?
    View Answer
    Is it correct from a design point of view to make an object both an Observer and Observable at the same time?
    View Answer
    What is a stereotype? Where can this be used? What is a stereotype? Where can this be used?
    View Answer
    What are the plans to represent a Java throws signature element in a UML method signature and how should I represent a Java throws signature element in a UML method signature?
    View Answer
    Where can I find market statistics on Java and Java developers? Things like number of developers, various industry segments, Java usage growth projections, etc....
    View Answer
    Are there any open source/free UML tools for Java developers?
    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!

    View ALL Methodology Interview Questions


    Google Search

    Business FAQs, Internet FAQs, Accounts FAQs, Computer FAQs, Insurance FAQs, Frequently Asked Questions & Related Pages

    Arts and Entertainment Frequently Asked Questions | Business Frequently Asked Questions | Computers Frequently Asked Questions | Programming Languages Frequently Asked Questions | Education Frequently Asked Questions | Electronic gadgets Frequently Asked Questions | Health Frequently Asked Questions | People and Relationships Frequently Asked Questions | Food and Cooking Frequently Asked Questions | History Politics and Society Frequently Asked Questions | Home, Farm and Garden Frequently Asked Questions | Insurance Frequently Asked Questions | Jobs & Careers Frequently Asked Questions | Law and Legal Issues Frequently Asked Questions | Money and Credit Frequently Asked Questions | Science and Technology Frequently Asked Questions | Religion and Spirituality Frequently Asked Questions | Shopping Frequently Asked Questions | Sports Frequently Asked Questions | Travels Frequently Asked Questions | Animal Life Frequently Asked Questions | Literature and Language Frequently Asked Questions | Vehicles Frequently Asked Questions | Plants and Trees Frequently Asked Questions | Miscellaneous Frequently Asked Questions | Software Testing Frequently Asked Questions | Electronics Frequently Asked Questions | Certification Frequently Asked Questions | Web Hosting Frequently Asked Questions | SAP Module Frequently Asked Questions | Database Frequently Asked Questions | Operating System Frequently Asked Questions | Soft Skills Frequently Asked Questions | Hobbies and Collectibles Frequently Asked Questions | Humour and Amusement Corner Frequently Asked Questions | Community life and Leisure Frequently Asked Questions | Street Care and Cleaning Frequently Asked Questions | Technology Frequently Asked Questions | Celebrities Frequently Asked Questions | India Information Frequently Asked Questions | Microsoft Frequently Asked Questions | Multimedia Frequently Asked Questions |
    Copyright © 2005-2014. One Stop All rights reserved Privacy Policy | Terms and Conditions | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Cool Interview | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Freshers & Experienced Jobs | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting in India | Free SMS | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Free Online Exam | The Galz | Fun & Entertainment | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    Page URL:
    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Greetings