未分类题

YourwebapplicationusesasimplearchitectureinwhichservletshandlerequestsandthenforwardtoaJSPusingarequestdispatcher.YouneedtopassinformationcalculatedintheservlettotheJSPforview generation.ThisinformationmustNOTbeaccessibletoanyotherservlet,JSPorsessioninthewebapp.Whichtwotechniquescanyouusetoaccomplishthisgoal?()
A.Addattributestothesessionobject.
B.Addattributesontherequestobject.
C.Addparameterstotherequestobject.
D.UsethepageContextobjecttoaddrequestattributes.
E.AddparameterstotheJSP’sURLwhengeneratingtherequestdispatcher.

A.YouneedtopassinformationcalculatedintheservlettotheJSPforview
B.ThisinformationmustNOTbeaccessibletoanyotherservlet,JSPorsessioninthewebapp.Whichtwotechniquescanyouusetoaccomplishthisgoal?()
A.Addattributestothesessionobject.
C.Addattributesontherequestobject.
D.Addparameterstotherequestobject.
E.UsethepageContextobjecttoaddrequestattributes.
F.AddparameterstotheJSP’sURLwhengeneratingtherequestdispatcher.

【参考答案】

B, E