9 Pages

Struts_Intro

Course: PRO 617, Fall 2009
School: CSU Fullerton
Rating:
 
 
 
 
 

Word Count: 1183

Document Preview

Struts Configuring Components web.xml strutsconfig.xml framework's deployment descriptor. It is used to load and configure various components used by struts framework. application.properties The web application deployment descriptor required by Java Servlet specification. Provides message resources to struts based web application The web application deployment descriptor Struts framework...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> CSU Fullerton >> PRO 617

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Struts Configuring Components web.xml strutsconfig.xml framework's deployment descriptor. It is used to load and configure various components used by struts framework. application.properties The web application deployment descriptor required by Java Servlet specification. Provides message resources to struts based web application The web application deployment descriptor Struts framework includes two components that need to be configured through web.xml file: the ActionServlet and optionally, tag libraries. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app id="WebApp"> <display-name>PRO617Web</display-name> <servlet> <servlet-name>action</servlet-name><!- only one action servlet per application --> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name><! context relative path to xml resource containing config info --> <param-value>WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name><!- debug level for this servlet 0 == least serious, 6 = most serious --> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name><!- debug level for Digester to process application config files 0 to 6 -- > <param-value>2</param-value> </init-param> <init-param> <param-name>validate</param-name><!- specifies whether to use validating xml parser to process config file -- > <param-value>true</param-value> </init-param> <load-on-startup>2</load-on-startup><! weighting with the container. 2 allows other resources to load first -- > </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> </web-app> strutsconfig.xml file Struts config file is a living blueprint of application Struts configuration and Action Servlet work together to form a control layer Every component in Struts configuration is a Java object Struts framework use reflection and introspection to automate loading and configuring java objects Struts config file helps your application react to changes quickly with minimal effort. In practice, it is separating things that rarely change the underlying java classes from things that often change the java objects deployed at runtime. Principle of protected variation...Larman Example file <struts-config> <!-- Data Sources --> <data-sources> </data-sources> <!-- Form Beans --> <form-beans> </form-beans> <!-- Global Exceptions --> <global-exceptions> </global-exceptions> <!-- Global Forwards --> <global-forwards> </global-forwards> <!-- Action Mappings --> <action-mappings> </action-mappings> <!-- Message Resources --> <message-resources parameter="pro617web.resources.ApplicationResources"/> </struts-config> Struts configuration elements Datasources Element Datasource Element Contains zero or more datasource element <!ELEMENT datasources (datasource*)> <!ELEMENT datasource (setproperty*)> Acts as a factory for database connections and provides a single point of control setproperty allows to configure properties that are specific to data source implementation Example: <data-sources> <data-source> <set-property <set-property <set-property <set-property </data-source> property="driverClass" value=""/> property="user" value=""/> property="password" value=""/> property="url" value=""/> </data-sources> Form-Beans Element Configures multiple ActionForm classes that are used by views Within form-beans you can configure zero or more form bean child elements Example: <form-beans> <form-bean name="loginForm" type="com.forms.LoginForm"/> </form-beans> Global Exceptions Element Configures exception handlers declaratively. Contains zero or more exception elements If no handler is found, a ServletException or IOException will be thrown. <global-exceptions> <exception key="error.login" path="/jsp/login.jsp" scope="request" type="com.exceptions.InvalidLogin" </global-exceptions> /> Struts Configuration Elements Global forwards element <globalforwards> <forward name="loginForward" path="/jsp/login.jsp" redirect="true"> </globalforwards> Message resources element Logical name for forwarding or redirecting to a view. The forward element maps a logical name to an application relative URI Hard coding of literal URI is avoided using forward element Example: Specifies characteristics of the message resource bundles that contain the localized messages for an application. Each strutsconfig file can define one or more message resource bundles E.g. <message-resources parameter="pro617web.resources.ApplicationResources"/> Typically, the bundles are either in a jar file or under WEB-INF/classes folder Specifies a fully qualified class name of a general purpose application plug-in module that receives notification of application startup and shutdown events. Plug-in element may contain zero or more set-property elements, so that extra configuration information may be passed to Plugin class E.g. <plug-in className="org.apache.struts.tiles.TilesPlugin"> <set-property property="" value=""/> </plug-in> Plug-in element Struts Configuration Elements Actionmappings Element Contains a set of zero or more action elements for Struts application Action element describes a mapping from a specific request path to a corresponding action class Controller selects a particular mapping by matching a URI path in the request with the path attribute in one of the action elements E.g. <action path="/signin" type="com.actions.LoginAction" scope="request" name="loginForm" validate="true" input="/jsp/login.jsp"> <forward name="Success" path="jsp/login.jsp" /> <forward name="Failure" path="jsp/invalidlogin.jsp" /> </action> Path attribute, in other words is the name of the action. It is the application relative path to the submitted request, starting with a "/" character and without filename extension Scope is the scope in which form bean is placed either request or session. Default value is session. It is specified only when name attribute is specified. Name is the name of the form bean element as specified in the form beams element Validate attribute determines if validate method of ActionForm is called before invoking execute method of the action class Type is the type of the action class Unknown attribute determines whether this action should be configured as the default for this application. It is optional and default is false The application resources file Capable and flexible messaging system. Text for the messages is stored in this properties ...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

CSU Fullerton - PRO - 617
ACID TransactionsWhat is Transaction ?Transaction is a unit of work. Several operations are grouped together as a single indivisible unit of work. Atomic Transaction PropertiesA transaction completes successfully or it fails. All the o
CSU Fullerton - PRO - 617
Validation FrameworkStep 1: Edit Struts Config file&lt;!- = Plug Ins Configuration -&gt; &lt;plug-in className=&quot;org.apache.struts.validator.ValidatorPlugIn&quot;&gt; &lt;set-property property=&quot;pathnames&quot; value=&quot;/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml&quot;/&gt;
SUNY IT - CS - 240
712111111111111100100100001101101101101100000100101111101111101100000000000111111111111
SUNY IT - CS - 240
0 F 5 F 12 D 13 D 25 D 26 D 33 D 37 C 43 C 49 C 50 C 50 C 66 B 69 B 71 B 76 B 83 B 86 B 92 B100 A
University of Illinois, Urbana Champaign - CS - 598
Paper Title: Profile-guided Static Elimination of Gophers Please Enter Your Reviewer Number: Section I. Overview A. Content 1. What is the contribution of this paper. Be as specific as possible. 12The authors propose a technique to eliminate gopher
CSU Channel Islands - MIN - 6800
CBPPSIT Pilot Data - Presence of Role Differentiated Practice based on Nursing Job Descriptions and Performance Appraisals Code # 1 2 3 4 5 6 7 Meets Criteria Comments for CompetencyBased Practice No No definitions/guidelines for competency roles sub
CSU Channel Islands - MIN - 6800
CBPPSIT Pilot Study: Executive SummaryDana N. Rutledge PhD RNDo the competencies exist in nursing practice or not? Yes, differentiated role competencies for RNs (as defined according to the California Framework document) are being documented in j
CSU Channel Islands - MIN - 6800
CPBBSIT Evaluation for Pilot Sites Points 6 possible 1 5 10 possible 1 9 (1 each ) JOB DESCRIPTIONAgency Name _ CriteriaA. Submits job description(s) for all staff nurse positions. B. Each staff nurse job description describes RN competencies at
CSU Channel Islands - MIN - 31000
CSPCNCALIFORNIA STRATEGIC PLANNING COMMITTEE FOR NURSING COLLEAGUES IN CARING: Regional Collaboratives for Nursing Work Force DevelopmentFebruary 15, 2000 The Helene Fuld Health Trust HSBC, Trustee 50 East 42nd Street, 19th Floor New York, NY 100
CSU Channel Islands - MIN - 31000
CSPCNCALIFORNIA NURSING WORK FORCE INITIATIVEFACT SHEET PHASE II FINAL REPORTCalifornia's Need for Nurses State and Federal Projections 1. Bureau of Labor and California Employment Development Department list RNs and LVNs among occupations with
CSU Channel Islands - UCIHS - 3601
CSPCNCALIFORNIA STRATEGIC PLANNING COMMITTEE FOR NURSING COLLEAGUES IN CARING: Regional Collaboratives for Nursing Work Force DevelopmentProject Director Report CSPCN/CIC IOC meeting &amp; 2nd Yr. RWJF/CIC Site Visit March 5-6, 2001, Harris Ranch, Fr
CSU Channel Islands - UCIHS - 51800
CSPCNCALIFORNIA STRATEGIC PLANNING COMMITTEE FOR NURSING COLLEAGUES IN CARING: Regional Collaboratives for Nursing Work Force DevelopmentPOSITION STATEMENT ON THE NURSING SHORTAGE AND LEGISLATIVE RECOMMENDATIONS Summary. California will need 25,0
University of Illinois, Urbana Champaign - CS - 511
%!PS-Adobe-2.0 %Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %Title: cs411-s04-hw1.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -t letter -o cs411-s
University of Illinois, Urbana Champaign - CS - 511
m n m f i g nf y t m n is m CCn1Chotqhk uRih`&quot;zfRmgCrou &quot;Dhd( li nt lsfq m gfn q lf q n lis lsfq l q g gni vi {Tuh9Chonhot`PXhC9h ht`q{Cp9Chhfh{itlg5pwhot`{il l{P`fhht VVhRq{up onfhCRRPRfufg onf#hfPigCn iuxTziuCCA i Ws y f
University of Illinois, Urbana Champaign - CS - 511
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;Key&gt;33550c96860cd0e2b7464d24c317c3009ec1f287.ps&lt;/Key&gt;&lt;RequestId&gt;0D 32CB3EA61371FE&lt;/RequestId&gt;&lt;HostId&gt;dJSZcpHarXUUffXkhwFg6lpWtE+d
University of Illinois, Urbana Champaign - CS - 511
oulv`hmu~ziojlCflsh|RejlRiBCzRpmiuoCrTxvf5CCChgeulv`huoC k l k gw v | l v vi e gi lg v | viw k ml i k v k k e k k m v gi e w |il l vz el l v e w k klz e p ol}onlmulhge{ooRlChmhiCfvlviunlfuBvnnlmsP1Crgfno1CRzhgluRluqnvehm`i hmo~Rivg
University of Illinois, Urbana Champaign - CS - 511
%!PS-Adobe-2.0 %Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %Title: cs411-s04-hw2.dvi %Pages: 1 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -t letter -o cs411-s
University of Illinois, Urbana Champaign - CS - 511
q j q j l j i {ql l j jqu o i (iRpkRvwkvoBCRek|wzCRDrRpswPRPizljp5r{9e g j i v i t o o p v p v j ji x i f }RlPkl`RPipksv}lwrqpl1i5ksRio Rioe tqv v o o l o llq l j v pu d }PRPikyCrqpklRlRlki}ritRvRCBwRrkzRlow}Ae {l p v l jiqq
University of Illinois, Urbana Champaign - CS - 511
d j tv fom f j ~ tmf j t d d i { d j tq pjg|9RnCRupzprrPkvdnsj`BCRurgozRukt90|gipmrg{zz0gipnRjzCw| j t d | tmf im {v tmf y dfowv q im d d j t d ju tm df ~ CRugojzgip0pj`1Cgoz`zxspzgoCRuAg|Rjnz5C`pXpjngl`Rjznj v y 00v 'Rsr
University of Illinois, Urbana Champaign - CS - 511
%!PS-Adobe-2.0 %Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %Title: cs411-s04-hw3.dvi %Pages: 3 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -t letter -o cs411-s
University of Illinois, Urbana Champaign - CS - 511
kph{pu k sk i o nk nh iv Cwwwz}wRq5}C{jtw5 p7jwCwwh }w&quot;`R0`hRojqjsqRo C{Xjkjw7CR5kqv`qxohjj0PjsRRij0{ ~ kph{pu k i {kkp iv i p iv v ipk ~ v k i i u i uhs v k v {k k ( jR C ok nh n k i h g k i ivuk nh pv i n iv n o kv k i ph { n
University of Illinois, Urbana Champaign - CS - 511
{ q tnmAjhgf9d h lki e o ~ o 5k 0~ ~ o o j o k T~ k } { o o o { |k k r zy x PjRhi h ~ zP7Rxf nw v sk y u ut i q h l k i e |tnmAjhgf9d 0~ o o j o k T~ k ~} { o o o { |k k r zyx PjRhi h ~ zP7xRf unw v sk y ut i q h l k i e |tnmAjhgf9d h 5
University of Illinois, Urbana Champaign - CS - 591
UT-AustinThe Department Created in 1966 42 tenure-track faculty 190 PhD students, 50 master students, 1300 undergraduate students. Chair: Jayadev Misra Edsger Dijkstra (chair from 1984 to 1997)Research Areastop-10 CS program Formal Methods
University of Illinois, Urbana Champaign - CS - 591
University of Southern California (USC)A Review of Database Related Research GroupsSeptember 2005Compuer Science Department History: Established in 1972 People (as of 2004): Tenure Track Faculty: 27 Joint Faculty: 18 Research Faculty:
University of Illinois, Urbana Champaign - CS - 591
Cornell UniversityDavid Killian 10/25/2005Cornell Tidbits Founded 1865 2,627 Faculty 13,625 Undergraduates, 5,903 Graduates Colors: Carnelian and white Mascot: &quot;Big Red Bear&quot; Yougest Ivy League, largest Ivy League (enrollment) First major
Columbus State University - MATH - 1127
Chapter 1 - Additional Practice ProblemsMULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Classify the study as either descriptive or inferential. 1) The table below shows the number of new AIDS
Columbus State University - MATH - 1127
Chapter 2 - Practice ProblemsSHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Provide an appropriate response. 1) Explain the difference between a frequency distribution and a relative frequency dis
Columbus State University - MATH - 1127
Chapter 2 - Additional Practice ProblemsSHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Construct a grouped-data table for the given data. 1) Kevin asked some of his friends how many hours they had
Columbus State University - MATH - 1127
Chapter 3 - Additional Practice ProblemsMULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Find the mean for the given sample data. Unless otherwise specified, round your answer to one more decima
Columbus State University - MATH - 1127
Chapter 4 - Practice ProblemsSHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Provide an appropriate response. 1) Compare the relative frequency formula for finding probabilities to the classical fo
Columbus State University - MATH - 1127
Chapter 5 - Additional Practice Problems Binomial Distribution MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Evaluate the expression. 12 1) 2 A) 66 20 1 A) 19 B) 21 C) 1 D) 20 B) 3,628,800 C) 7