开发者

JSP: Using the same Java object across pages

I have 2 jsp pages, index.jsp and viewer.jsp. viewer.jsp is inside an IFRAME in index.jsp.

index.jsp needs to grab a list of domain names from a Java object foo and provide a drop down menu for the user. After the user picks one and submits it, viewer.jsp needs to read this domain name and use foo to ex开发者_如何学运维tract all the the data it needs to display.

How do I access foo across both pages? Is there a better way to construct this functionality?

I haven't done JSP before (or web programming for that matter), so any help is appreciated. Thanks!


Either put it in session scope, or replace the poor iframe approach by server side includes using jsp:include so that you can end up putting it in the request scope.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜