- P]
Java̎ԇԇ}
ճWֻҪпҪ͕ԇ}ԇ}Ըõ،ߵ֪RMпy֪ʲôӵԇ}Ǻԇ}СJava̎ԇԇ}Hϣ܉
Java̎ԇԇ} 1
1.HibernateԭʲôҪ?
ԭ 1.xȡļ 2.xȡӳϢSessionFactory 3._Session 4.Transation 5.־û 6.ύ 7.P]Session 8.P]SesstionFactory
ʲôҪã 1. JDBCLĴa˷b˔Lӷ؏Դa 2. HibernateһJDBC־ûһORMF̶ܴȵĺDAOӵľa 3. hibernateʹJavaCֹa팍F 4. hibernateܷdzǂpܡӳ`Ժܳɫָ֧NPϵһһĸNsPϵ
2.Hibernatetd?
1. Hibernate2tdFa)w b)(Collection)
2. Hibernate3 ṩˌԵtd Hibernateڲԃĕr]дcȴIJrŴcȴ͌Ftdʡ˷ăȴ_NĶ˷ܡ
3.HibernateӌF֮g'Pϵ?(磺һPϵ)
c֮gPϵҪwFڱc֮gPϵMвnjMв҂аеıcӳһͨ^ļеmany-to-oneone-to-manymany-to-many
4.Struts1̣
1͑˞g[lHTTPՈ2web.xmlãԓՈActionServlet3struts-config.xml ActionServletȌՈеą䵽ActionFormȻActionServletٌՈl͵Action M̎4ǷCҪCt{ActionFormvalidateCʧtDinputɹt^m5ActionActionForm@Ô{javabean еĘIշ̎픵6ActionActionForwardDJSPAction7HTTP푑͑˞g[
MVCOӋģʽmodalģ͡ ҲQI߉΄յĴa,ஔcJavaBeanviewҕD䌍@ʾஔJSPcontrollerģͺҕDĽ^ஔservletstruts1ǻMVCOӋģʽhibernateǻORMPϵӳ
5.strutsʲô?
struts1ǻJSPservletһ_ԴWebÿʹõMVCOӋģʽstruts2ǻwebworkgĿܣsunwebwork˾_lһܷdzRȫĿstruts2struts1]κPϵһȫµĿ
6.springʲô?
springһSܵĴsZļgIOC(ƷDҲQهע)AOP(澎)
7.hibernateʲô?
hibernateǻORMPϵӳ(ɌPϵӳęC)F,־ûĹ
8.JSFʲô?
JavaServer FaceǻڽMweb_lsturtsĿ
9.ͼsʲô?
ǞߔęzٶǽڔϣһֶνļsǞ˱֔sзǿռsIsIsȵ
10.springʲô
@}ͨ^҂ʲôҪʹspring@}룺AOP _lˆTԄОԵPעcQMPעc뵽óaʹ AOP ( ־־ԡյ)ͿԷֽɷ沢õͬrČģ͵ďs IOC SһԘ쌦đíhȻ@Щfąf~ IOC ^ JNDI]ʹһѳSնλԪ(singleton)ֱӘ(straight construction)ÿһff(collaborator) SpringʹһAOPҲһIOC Spring õĵطQ SpringֻҪ JavaBean Ժļه(f)ȻԺҪrQƽӿڵąf
11.ԼԒҪUstruts2Ĉ̡
Struts 2ܱ¿Է֞3֣ĿFilterDispatcherIտActionÑFII߉MĿFilterDispatcherStruts 2ܵĻA˿܃ȲĿ̺̎CơIտAction͘I߉MҪÑԼFÑ_lAction͘I߉Mͬr߀ҪPļĿFilterDispatcherʹ
Struts 2ĹStruts 1ҪcWebWorkܻͬfStruts 2WebWork汾Ҫ£1͑˞g[lHTTPՈ2web.xmlԓՈFilterDispatcher3struts.xmlҵҪ{õActionͷ ͨ^IoCʽֵעoAciton4Action{ØI߉M̎I߉@һC5Actionꮅstruts.xmlеҵķؽYresultD6HTTP푑͑˞g[
Java̎ԇԇ} 2
һ.x}(30)
1.ЩrԽKֹǰ̵\?
a. һr
b. ԓ{sleep()r
c. һ¾̕r(cǰM̟oP)
d. һȼߵľM;wBr
2. Щ阋캯Զx
a. 캯rQԓcͬ
b. dԽͬQ
c. ʹrԄӈИ캯ژ캯
O׃ijֵMЃȴ
d. ϶
3. Pڮ̎CƵĔЩ_
a. catchֲrrŕfinally(oՓǷë)
b. try^εijlrŕcatch^εij
c. ՓǷle`rfinally
d. ϶
4. PڽӿڵĔЩ_
a. ӿеĔOֵ(ǽӿеij)
b. ӿеķdz
c. ӿڿ
d. ϶_
5.JavaZ،(Overriding)d(Overloading)ǶBԵIJͬF߅Щfnj?
A. ،Ǹc֮gBԵһNF
B. ،һжBԵһNF
C. dһжBԵһNF
D. dǸc֮gBԵһNF
6.StrutsõҕDаЩM?
A. JSP
B. Servlet
C. ActionServlet
D. Action
E. I߉IՔJavaBean
F. EJB
G. ͑˺
7. strutsPFormBeanЩf_ģ
A FormBeanһNbeanҪÁbύρĔ@ЩfoAction
B FormBeanпԌςfąMһ¸ʽϵC@NCһN͑˵C
C ÑÿύaһµFormBean
D ӑBFormBeanMC
8ЩMservlet{ԇ?()
AʹôӡZ ӋC\з
BʹApache Log4J
CʹIDEɵ{ԇ
DֱӲ鿴HTMLԴa ????
Ee`o͑
9PservletĹf_Щ?()
Axȡ͑ĺ@ʽ
Bxȡ͑ĺ[ʽ
CĽY
Dl@ʽĔo͑
El[ʽĔo͑
10Psession÷Щe`?(
AHttpSession session = new HttpSession()
request.getSession()
BString haha =(String) session.getParameter(Attribute)(haha)
Csession.removeAttribute(haha)
Dsession. setAttribute(hahaֵ)
11Pf_Щ?()
AURLݔՈr뵽JSP
BܺӰJSP
Cļ׃ʹ
DļĺҪքӵظʹ(ҪքӸ)
12Pbean`f_Щ?()
A߂һㅢ()Ę캯(DZ횵)
Bԓй_Č׃(ֶ)
CеČԶͨ^getXxxsetXxxL
D͵ČʹisXxxgetXxx
13PMVCfe`Щ?()
AʹÏsĿ
BʹÃȽRequestDispatcher܉ܺõ،FMVC
CһMl׃ĕrMVCӰϵyOӋ
D҂MVC̎Ո
14Ę˺ЩJSTL˺?()
15strutse`Щf_?
A StrutsПoς
B StrutsܻMVCģʽ
C Struts̏sYȆ}()
D StrutsЧؽĿļĿ
}( 5)
1{úMOD(12310)ֵ___
2select round (123.671) from dual@Zݔֵ______
3һRr׃ʹõַ_____
4v_comm = 2800 X := NVL (V_comm0) tXֵ____
5{úINSTR(Here you areer)ֵ___
Д}(10)
1WHEREӾӛ䛣ҲָƷֽMYėl ()
2UNIQUEsвֵܰ ()
3DATE͔аrgֵ ()
4Isпֵ ()
5͞4)ݔ롰hellotֻܴ惦hell ()
6Group byӾIJԃYź ()
7xΘ˕rеselectZ䲻ʹorder byӾ(Ӳԃ
) ()
9|lһl ^̿зֵ ()
10instead
of|lֻǻҕD
SQLZ(̖Ȟ)(10)
1ԃ¸(JOB)ĆT˔
2ԃcTSMITHͬһT(DEPTNO)ĆT(ENAME)Y(SAL)ͲT
3ԃІT(ENAME)Y(SAL)Yȼ(GRADE)
4ԃ@ùY(SAL)ߵ3TϢ
5ԃІT(ENAME)(ENAME)
}(15)
1. PL/SQLУMÑԶx̎3E
ʲô?
2. Щ?ҪB
3. ListMapSetӿȡԪؕrʲôc?
List ضԪ؏ԪءSet o؏ԪأȲMap key-valueֵvalueɶֵ
4 .struts1.0struts2.0ą^e?οƃɷNеĆģʽ?
5. һstruts1.0FHԃɇZ(ģӢ)
6.strutsôform-beanaction
7. HibernateԎķ퓙Cʲô?ʹHibernateԎķtʲôʽ?
8. hibernateһļصʲô?
9.ʲôӵĔmϴŵڶ?
10һspringʲô?
11ĿwFSpringе澎̣wf
12 |l|lĔЩ?
13 ҕDĺxԼʹҕDĺ̎
14 ORACLE5Ns
15 ORACLE^̺ͺĮͬc
}(30)
1һPL/SQLKÑݔľ̖empвԃԓ̖ĆTT̖ܾ̖ҪЮ̎
2һPL/SQLKÑݔĹemplݔ@һÿλTľ̖ܹÿlϢʽ£(ΘˌF)
̖ ܹ
7751 JOHN 95-12-31
3һДEMPijһ(JOB)ǷEMPڴ˹QtTRUEtFALSE
4һ|lEMPвǰl|lTĹY(SAL)^5000MЈeܲ
^5000IJŌT̖r(SYSDATE)UP_EMP
(ע˱ѽYUP_EMP(EMPNO NUMBER(4)SAL NUMBER(72)UDETE DATE))
5ݔYǶ?
importjava.util.Date
public class Test extends Date{
public static void main(String[] args) {
new Test().test()}
public void test(){
System.out.println(super.getClass().getName())}}
6ijaݔĽYǶ? public class smallT
{}
public static void main(String args[]) { } public int get() { } try { } finally { } return 2 return 1 smallT t = new smallT() int b = t.get() System.out.println(b)
7Ӿѭh10Σѭh100ֻصӾѭh10ٻصѭh100ѭh50Ո
8ȥһVector؏͵Ԫ
9һַаַӢַַ͔ՈyӋʹӡַĂ
10. xxx˾sqlԇ
Table EMPLOYEES Structure:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
Salary number(82)
HiredDate DATE
Departmentid number(2)
Table Departments Structure:
Departmentid number(2) Primary Key
DepartmentName VARCHAR2(25).
(1)EMPLOYEES팑ԃڽ߹Y[10002000]֮g߆T(last_name)ԡObama^ІTг@ЩTȫϢ
(2) EMPLOYEES팑ԃTƽY1800
ԪIJTІTг@ЩTȫϢ()
(3) EMPLOYEES팑ԃ˹YڲTƽYĆTг@ЩTȫϢԓTY߳TƽYٷֱ
1𰸣ABD
2𰸣 D
3𰸣BC
4𰸣AB
5AC
6𰸣AG
7𰸣A
8A B C D E
9A B C D E
10A B D
11A B C
12B D
13A C
14A B C
15A B C
16𰸣C
3 123.7 & 2800 2
Д
̡̡̡̡̡
ČSQLZ
1Select jobcount(*) from emp group by job
2Select enamesaldeptno from emp where deptno=(select deptno from emp where ename=SMITH)
3Select enamesalgrade from empsalgrade where sal between losal and hisal
4Select * from (select * from emp order by sal desc) where rownum<=3
5Select e1.ename empnamee2.ename mgrname from emp e1emp e2 where e1.mgr=e2.empno
庆
ͨ^Ͱlث@Զx
һ֞Զx
ڈвʹ RAISE Z@ʽذl
Į̎Į
2(1).
Ǻһ}cǰĿ˟oPЩԱֵעcǰĿPķ˽ȫ}ֻxеһròּɂ棬һ^̳ǔ
(2).^У
^һNYČӴģͣSĄṩһN_ԵķһԏĬFе@^̷Q^^ԭʼ Qԭʼ()ԭʼQĻ()ԏĻ^з͌׃Ļµķʹ֮mҪ
(3).b
bǰ^̺͔Lֻͨ^ѶxĽӋʼ@FԱLһϵȫbČ@Щͨ^һܱoĽӿL
(4). Bԣ
BָSͬČͬһϢ푑BBԺͰBBZԾ`О鹲aăܺõĽQˑóͬ}
List ضԪ؏ԪSet o؏ԪȲMap key-valueֵvalueɶֵ
3List ضԪ؏ԪSet o؏ԪأȲMap key-valueֵvalueɶֵ
4aAction
struts1.2ҪAction^һstruts2.0 ActionҪ^ActionSupport bģʽ
struts1.2 ActiondžģʽIJұǾ̰ȫHһActionČ̎еՈ
Struts1.2 Action_lreСActionYԴǾ̰ȫĻͬ
struts2.0 ActionÿһՈaһ˛]о̰ȫ}
cServletه
struts1.2 ActionهServlet API鮔һAction{ÕrHttpServletRequestHttpServletResponsefoexecut
struts2.0 ActionهSActionÓxΪyԇҪStruts2 Action
ȻLʼRequestResponse
ԪpٻֱLHttpServletRequestHttpServletResponseıҪԡ
dɜy
yԇstruts1.2 ActionһҪ}execute¶Servlet API(@ʹÜyԇҪه)һUչstruts TestCase
ṩһstruts1.2ģMMМyԇ
Struts2.0 Actionͨ^ʼOÌ{÷yԇهע롱ҲʹÜyԇ
Java̎ԇԇ} 3
javaԇ}Ŀ1
1.ՄՄXML?fWebWeb.xmlļ?
XML(Extensible Markup Language)ɔUչӛZcHTMLһӣSGML(Standard Generalized Markup Language˜ͨØӛZ)XmlInternethпƽ_هڃݵļgǮǰ̎YęnϢUչӛZXMLһNεĔ惦ZʹһϵкεĘӛ@Щӛ÷ķʽmȻXMLռõĿgȶMƔҪռøĿgXMLO了պʹ
web.xmlÚgӭ퓣servletfilterlistenerȵġ
2.jspЩÌ?÷քeʲô?()
1)requestʾHttpServletRequestPg[ՈϢṩˎׂګ@ȡcookie headersessionõķ
2)responseʾHttpServletResponseṩˎׂOͻ g[푑ķ(cookies^Ϣ)
3)outjavax.jsp.JspWriterһṩˎׂʹg[ݔY
4)pageContextʾһjavax.servlet.jsp.PageContextڷȡNֿgservletPČAPIҰbͨõservletPܵķ
5)sessionʾһՈjavax.servlet.http.HttpSessionSessionԴAÑĠBϢ
6)application ʾһjavax.servle.ServletContext@ڲPservletservlethϢ
7)configʾһjavax.servlet.ServletConfigԓڴȡservletijʼ
8)pageʾԓa`һservlet
9)exception ᘌe`Wδ
3.ʲô?ЩҪf@ЩԵĺx
(Transaction)LܸиN헵һІԪ(unit)
ͨɸٿvZԻZ(SQLC++Java)ÑĈbegin transactionend transactionZ({)綨_ʼ(begin transaction)սY(end transaction)֮gеȫwMɡ
Ցԓ4ԣԭһxԡmԡ@ĂͨQACID
ԭ(atomicity)һһɷָĹλаTҪôҪô
һ(consistency)ձʹһһԠB׃һһԠBһcԭPġ
x(isolation)һյĈвܱոɔ_һՃȲIJʹõĔlǸxlеĸ֮gܻɔ_
־(durability)mҲQ(permanence)ָһһύДĸ׃͑ԓԵϲԓκӰ
4Collection Collectionsą^e?
Collectionjava.utilµĽӿڣǸNϵĸӿ^ĽӿҪSet List;Collectionsǂjava.utilµᘌϵĎṩһϵoBFNϵ̰ȫȲ
5HashMapcTreeMapą^e?
HashMapͨ^hashcodeMпٲңTreeMapеԪضijN̶ҪõһĽY͑ԓʹTreeMap(HashMapԪصDz̶)
6ArrayListVectorą^e?
ͬ:VectorǾ̰ȫҲfͬģArrayListǾ̲ȫͬ;L:ҪLrVectorĬJLԭһArrayListsԭһ롣
Java̎ԇԇ}𰸡P£
Java̎ԇ}10-25
javaTԇԇ}03-10
Java̎ԇ}03-24
2016javaԇ}켰03-09
javaԇ}201703-06
Java̎ԇ}03-29
Java mainԇ}03-14
NIITJCJavaԇ}03-30
Javaԇ}201602-26