Read the dataobject object in the page stream from the JSP page in eos6

Source: Internet
Author: User
Tags sdo

Http://gocom.primeton.com/blog19014_15440.htm? PHPSESSID = db7e8103fd51917ea949ebab28ee6a57

 

CodeAs follows:
<% @ Page pageencoding = "UTF-8" Import = "Java. util. *" %>
<% @ Page import = "com. EOS. Web. taglib. util. *" %>
<% @ Page import = "commonj. SDO. dataobject, commonj. SDO. Property" %>
<% @ Include file = "/common. jsp" %>
<% @ Include file = "/common/skins/skin0/component. jsp" %>


-author (s): lijd
-Date: 17:47:57
-description:
-->

title


<%
Object root = com. EOS. web. taglib. util. xpathutil. getdatacontextroot ("request", pagecontext);
dataobject [] objs = (dataobject []) xpathutil. getobjectbyxpath (root, "outobjs"); // "outobjs" is the XPath (dataobject array) on the page stream
int Len = objs. length;
string outstr = "Length:" + Len + "content:";
for (INT I = 0; I List list = objs [I]. getinstanceproperties ();
iterator it = List. listiterator ();
while (it. hasnext () {
property pro = (property) it. next ();
outstr = outstr + pro. getname () + "-" + objs [I]. get (Pro) + ",";
}< br> outstr = outstr + "|";
}

System. Out. println (outstr );

%>
</Body>
</Html>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.