Archive for October, 2007

Figure 10-1: Logging on to the application Listing 10-1 shows the JSP code, logon.jsp, that displays the screen shown in Figure 10-1. Listing 10-1: JSP for logon form (logon.jsp) Lou’s Brokerage….Password Entry Screen

Wednesday, October 31st, 2007


Enter Your Account Number and Password in the Fields Below
Then Click Logon to Continue



Welcome to web hosting for all of you from India.Our recommendation is Web Hosting India.

Tuesday, October 30th, 2007

understand new concepts or capabilities of JavaServer Pages to implement the remaining features. Before you delve into the code, let s take a look at the structure of the database that contains the customer, portfolio, and security information used by the application. The Application Data Defined The database for our application consists of four tables. Even though you don t need all four tables to implement the three features mentioned in the previous section, you can describe the tables to provide a more complete view of the application. The four tables containing the data are described below. . CustomerInfo: Contains the usual customer information (name, address, credit card info, and so on), an account ID (primary key), and a password. The customer must supply the correct password to gain access to the application. . CustomerPortfolio: Contains an account ID (primary key), a stock ticker symbol, and a number representing how much of this security the customer holds. . SecurityInfo: Contains a stock ticker symbol, a trade date, and the selling price of the security on the trade date. This table uses a compound key consisting of the stock ticker symbol and the trade date. . TransactionHistory: Contains an account ID, a transaction date and type, a stock ticker symbol, and the number of shares traded on the transaction date. This table uses a compound key of the account ID, transaction date, stock ticker symbol, and the transaction type (buy or sell). The preceding four tables have primary and foreign key relationships to ensure referential and data integrity. For sake of simplicity, the JSP and Java code in this sample application does not have code to capture errors arising from referential integrity constraint violations. The Client Scenario With the application data described, we can now look at a common client scenario. The application will allow a client to proceed through the following steps: 1. The client requests access to the application by entering an account ID and a password. 2. Once the application receives a matching account ID and password combination, the application displays a list of choices. 3. The client requests a listing of his or her transaction history; the application displays the list. Without further delay, let s look at the implementation of this scenario in the Make Money application. Logging on to the Make Money Application The customer enters a URL that identifies the JSP that handles the interactions necessary to grant access to the client. Figure 10-1 shows the client logon screen.
Hosting services offered by our company comes with free domain name if you pay at yearly basis. Find out more at New Orleans Web Hosting services.

Monday, October 29th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Chapter 10: The Make Money Brokerage Application In previous chapters I ve covered the capabilities of JavaServer Pages and shown you some sample JSP code. In this chapter, you can see how JSP can be used in the construction of a brokerage application. First, you can read about the functions available in our Make Money brokerage application. Next, you will read a description of the underlying data store and client scenario. Last, you will see the JSP and Java code that implements a typical client request. The Make Money Application The Make Money application is a small JSP program modeling an online stock trading system. This application will be used to model several aspects of JSP development that we have covered thus far in this book. We will see the use of JavaBeans in JSP pages. We will also see demonstrated the use of JSP error-handling tools discussed in the previous chapter. If this is one of your first JSP applications, you should finish this chapter with a better understanding of how you can use JSP successfully in developing Web applications. The Make Money application provides clients with several functions. Once clients are successfully logged on, they can: l View their account history l View their portfolio l Place a buy or sell order l Change personal information The application is hardly full-featured. My intent is to present the code required to implement some of the operations of the application. The next section describes the implemented features in more detail. Implemented Application Features Later in the chapter we will see the JSP and Java code that enables the following functions: l Handling user logons l Displaying a screen of selections l Displaying the user s account history The JSP and Java code for other options is similar to what is presented here. In other words, it is not necessary to
The European settlement at Melbourne was founded in 1835 by settlers coming from Tasmania (then known as Van Die men’s Land), where they had difficulty finding available land.We provides affordable, discount and cheapest Melbourne web hosting, free domain name, unlimited data transfer, unlimited emails, PHP, ASP, and database hosting,check Web Hosting Melbourne services.

Sunday, October 28th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Summary In this chapter, you’ve seen how you can leverage the features of JavaServer Pages to create clients for enterprise beans. By using JSP pages, you can hide functions within JavaBeans or custom tags, thereby separating your presentation from your logic. You’ve seen how a JSP page can use a custom tag to locate an instance of a bean’s home object. The single, empty tag containing needed data as values of attributes allows a JSP page to work with the EJB architecture. Once the page has a reference to a home object, the page can request the execution of bean methods like any EJB client. Tag libraries are a powerful feature of JSP. By using tag libraries, your JSP pages contain less Java scriptlet code and more tags. Since scriptlet code implies business logic, by keeping scriptlet code to a minimum, you’ll have less mingling of presentation and logic. You’ve seen the enterprise bean code that performs the same functions as the code shown in Chapter 10. Aside from including dummy method implementations as required by EJB, the code that accesses the database is mostly the same as that shown in Chapter 10. However, by adhering to the EJB specification, your code now creates objects that are distributed objects with location transparency and have access to transaction and security resources by way of the EJB container.
Get account with us and you will get completely access to our free web templates database with over 10.000 templates in it to build your website.Don’t wait, go and check free web templates.

Saturday, October 27th, 2007

The VariableInfo class contains three class variables, listed in Table A-24. Table A-24: Class Variables Declared in the VariableInfo Class Declaration Description static int AT_BEGIN Variable is visible after the start tag. static int AT_END Variable is visible after the end tag. static int NESTED Variable is visible within the start and end tags.
Check our reliable web hosting section. Most often, a reliable protocol is also connection-oriented. However, this is not always so. For example, TCP/IP is a connection-oriented protocol, with the virtual circuit ID consisting of source and destination IP addresses and port numbers. However, there are also unreliable protocols that are connection-oriented as well. These include ATM and Frame Relay, on which 90% or more of all Internet traffic is passed.

Friday, October 26th, 2007

interfaces and adds additional convenience methods including getter methods for the properties in Tag. TagSupport has one static method that is included to facilitate coordination among cooperating tags. Many tag handlers extend TagSupport and only redefine a few methods. Table A-22 lists the methods available in the TagSupport class. Table A-22: Methods in the TagSupport Class Method Signature Description int doEndTag() Invokes this method when processing the end tag. int doStartTag() Invokes this method when processing the start tag. static tag findAncestorWithClass( Tag from, Class tagClass ) Finds the instance of the class named tagClass that is the closest ancestor to the tag named from. Tag getParent() Returns the tag instance enclosing this tag instance. String getTagId() Returns the value of the ID attribute for this tag (if it exists), or null. Object getValue( String key ) Returns a value associated with the argument key. Enumeration getValues() Returns an enumeration representing all the values associated with this tag. void release() Invoked after a call to doEndTag to reset the state of the tag. void removeValue( String key ) Removes a key/value pair associated with this tag. void setPageContext( PageContext pc ) Sets the PageContext for this tag. void setParent( Tag ptag ) Sets the parent (ptag) for this tag. void setTagID( String idAttr ) Sets the ID attribute of the tag. void setValue( String key, Object value ) Sets a value for a key/value pair in this tag. The TagSupport class also has two instance variables that are coded as shown in the following: protected String id ; protected PageContext pageContext ; The VariableInfo Class This class contains information on the scripting variables that are created/modified by a tag at run-time. This information is provided by TagExtraInfo classes and it is used in the translation phase of JSP. Table A-23 lists the methods available in the VariableInfo class. Table A-23: Methods in the VariableInfo Class Method Signature Description String getClassName() Returns the class name of the scripting variables coded in the tld as the element. boolean getDeclare() Returns the value of the element coded in the tld. int getScope() Returns the value of the element coded in the tld. String getVarName() Returns the name of the scripting variable coded in the tld as the element coded in the tld.
We are the the largest streaming host company, and we provide professional audio & video web hosting streaming using Real Networks, QuickTime, Flash and Windows Media.We strongly recommend you to visit and check web hosting streaming services.

Friday, October 26th, 2007

TagLibraryInfo getTagLibrary() Returns the tag library owning this tag. String getTagName() Returns the tag name. VariableInfo[] getVariableInfo( TagData td ) Returns information on the object created by this tag at runtime. Null means no such object created. Default is null if the tag has no “id” attribute, otherwise the array, {”id”, Object}, is returned. String toString() Overridden version of Object.toString. TagLibraryInfo getTagLibrary() Returns the tag library owning this tag. String getTagName() Returns the tag name. VariableInfo[] getVariableInfo( TagData td ) Returns information on the object created by this tag at runtime. Null means no such object created. Default is null if the tag has no “id” attribute, otherwise the array, {”id”, Object}, is returned. String toString() Overridden version of Object.toString. The TagData class also includes several class variables, used as arguments to the getBodyContent method, which are listed in Table A-20. Table A-20: Class Variables Declared in the TagInfo Class Declaration Description static String BODY_CONTENT _EMPTY The current instance of BodyContent is empty. static String BODY_CONTENT_JSP The current instance of BodyContent contains JSP code. static String BODY_CONTENT_TAG_DEPENDENT The current instance of BodyContent depends on the evaluation of another tag. TheTagLibraryInfo Class This class contains information found in the Tag Library Descriptor file about the tag library. Table A-21 lists the methods for the TagInfo class. Table A-21: Methods in the TagLibraryInfo Class Method Signature String getInfoString() String getPrefixString() String getReliableURN() String getRequiredVersion() String getShortName() String getURI() Description Returns the info string coded in the tld. Returns the prefix string used to reference tags within the JSP page. Returns the URN to the tld. Returns the version of the JSP container. Returns the preferred short name of the library. TagInfo getTag(String shortName ) Returns the TagInfo object (tagInfo) for the library with the short name argument. TagInfo[] getTags() Returns an array of TagInfo objects one for each tag described in the tld. Returns the URI from the taglib directive for this library. Instances of class TagLibraryInfo have instance variables that hold values returned from the get methods listed in Table A-21. The TagSupport Class The TagSupport class is a base class for defining new tag handlers implementing the Tag interface. The TagSupport class is a utility class to be used as the base class for new tag handlers. The TagSupport class implements the Tag and IterationTag
Would you like to be a member of headache free web site owner’s community. Now you can. We focus in IX Web Hosting, go go go!

Thursday, October 25th, 2007

String getID() Returns the value of the ID type attribute or null if no ID attribute exists. void setAttribute( String attName, ObjectattValue ) Sets the value of the attribute named attName to the value attValue. String getID() Returns the value of the ID type attribute or null if no ID attribute exists. void setAttribute( String attName, ObjectattValue ) Sets the value of the attribute named attName to the value attValue. The TagData class contains a variable coded as follows: static Object REQUEST_TIME_VALUE This variable tells the JSP container that the value of an attribute is available as a run-time expression, but will not be available at translation time. TheTagExtraInfo Class This class provides extra information about a custom tag. To associate a TagExtraInfo class with a tag handler class, this class must be mentioned in the Tag Library Descriptor file (tld). This class must be used if the tag defines any scripting variables or if the tag wants to provide translation-time validation of the tag attributes. Table A-18 lists the methods for the TagExtraInfo class. Table A-18: Methods in the TagExtraInfo Class Method Signature Description TagInfo getTagInfo() Returns the instance of TagInfo for the tag class. VariableInfo[] getVariableInfo( TagData td ) Returns information on scripting variables defined by this tag. boolean isValid() Translation-time validation of tag attributes. void setTagInfo( TagInfo ti ) Sets the TagInfo object for this class. The class contains an instance variable coded as follows: protected TagInfo tagInfo ; This instance variable represents the instance of TagInfo associated with instances of TagExtraInfo. TheTagInfo Class Tag information for a tag in a Tag Library; this class is instantiated from the Tag Library Descriptor file (tld). Table A-19 lists the methods for the TagInfo class. Table A-19: Methods in the TagInfo Class Method Signature Description TagAttributeInfo getAttributes() Returns a TagAttributeInfo object describing the attributes of the tag or null if tag has no attributes. String getBodyContent() Returns the BodyContent object as a string. String getInfoString() Returns an information string coded in the tld. String getTagClassName() Returns the name of the class that provides the run-time handler for the tag. TagExtraInfo getTagExtraInfo() Returns the instance of the TagExtraInfo class, if any exist.
Hosting services offered by our company comes with free domain name if you pay at yearly basis. Find out more at New Orleans Web Hosting services.

Wednesday, October 24th, 2007

Method Signature Description int doStartTag() This method is invoked first when a tag is encountered. int doEndTag() Invoke this method when processing the end tag. int doInitBody() Invoke this method before evaluating the tag body. BodyContent getBodyContent() Returns the current BodyContent object. JspWriter getPreviousOut() Returns the enclosing JspWriter. void release() Resets the state of the tag. void setBodyContent() Prepares for tag body evaluation. Method Signature Description int doStartTag() This method is invoked first when a tag is encountered. int doEndTag() Invoke this method when processing the end tag. int doInitBody() Invoke this method before evaluating the tag body. BodyContent getBodyContent() Returns the current BodyContent object. JspWriter getPreviousOut() Returns the enclosing JspWriter. void release() Resets the state of the tag. void setBodyContent() Prepares for tag body evaluation. The TagAttributeInfo Class This class contains information on Tag attributes found in the Tag Library Descriptor file (tld). Only the information needed to generate code is included in this reference. Additional information such as SCHEMA can be found in the complete JSP Specification (java.sun.com/products/jsp). Table A-16 lists the methods for the TagAttributeInfo class. Table A-16: Methods in the TagAttributeInfo Class Method Signature Description boolean canBeRequestTime() Indicates whether this attribute can hold a request-time value static TagAttributeInfo getIDAttribute( tagAttributeInfo[] tai ) Returns the ID attribute (if one exists) in the attribute list argument. String getName() Returns the name of the attribute. String getTypeName() Returns the type of the attribute as a string. boolean isRequired() Indicates whether this attribute is required or not. String toString() Overrides Object.toString. The TagAttributeInfo class also contains a class variable declared as follows: static final String ID = “ID” TheTagData Class The TagData class contains translation-time information for the attributes and values of a tag instance. TagData is only used as an argument to the isValid and getVariableInfo methods of TagExtraInfo, which are invoked at translation time. Table A-17 lists the methods for the TagData class. Table A-17: Methods in the TagData Class Method Signature Description Object getAttribute( String attName ) Returns the value of the attribute named attName or null if no attribute exists. String getAttributeString( String attName ) Returns the value of the attribute named attName as a string or null if no attribute exists.
As web cam capabilities have been added to instant messaging text chat services such as Yahoo Messenger, AOL Instant Messenger (AIM), MSN Messenger and Skype, one-to-one live video communication over the internet has now reached millions of mainstream PC users worldwide.You can see details on web cam web hosting section.

Tuesday, October 23rd, 2007

void setPageContext( PageContext thisPC ) Sets the current page context. This method is called before calls to doStartTag. void setParent( Tag pTag ) Establishes pTag as the parent tag of the current tag. void setPageContext( PageContext thisPC ) Sets the current page context. This method is called before calls to doStartTag. void setParent( Tag pTag ) Establishes pTag as the parent tag of the current tag. The Tag interface also defines a few class variables, which are listed in Table A-13. Table A-13: Class Variables Declared in the Tag Interface Declaration static int EVAL_BODY_INCLUDE The BodyContent Abstract Class Description Returned by the doStartTag method to include the evaluation of the tag body into the output stream (current instance of JspWriter). static int EVAL_PAGE Returned by the doEndTag method to direct the JSP to continue to evaluate the JSP page. static int SKIP_BODY Returned by the doStartTag and doAfterBody methods to omit evaluation of the tag body. static int SKIP_PAGE Returned by the doEndTag method to omit evaluation of the remainder of the JSP page. The BodyContent class is a subclass of JspWriter that can be used to process body evaluations so they can be re-extracted at a later time. Table A-14 lists the methods available in class BodyContent. Table A-14: Methods in the BodyContent Class Method Signature void clearBody() int flush() Redefines flush to make a call to flush illegal for objects of BodyContent. JspWriter getEnclosingWriter() Returns a reference to the JspWriter object from which the current BodyContent is derived from. abstract Reader getReader() abstract String getString() abstract void writeOut() The BodyTagSupport Class Description Clears the contents of a BodyContent object. Returns the instance of BodyContent as a Reader. Returns the instance of BodyContent as a String. Writes the instance of BodyContent to a Writer. The BodyTagSupport class is a base class for defining tag handlers that implement the BodyTag interface. The BodyTagSupportclass implements the BodyTag interface and adds additional convenience methods including getter methods for the BodyContentproperty and methods to get at the previous JspWriter “out” object. Table A-15 lists the methods available with the BodyTagSupport class. Table A-15: Methods in the BodyTagSupport Class
Please check our cheap domain web hosting services, our secret is fast and stable servers, dedicated 24/7 customer support, and many useful FREE bonuses.


Enter Your Account Number: