« Return to the blog entry
what jerome mentioned is very feasible. I have used the same technique mentioned to post to a java agent, the code (roughly) looks like this:
/*get document context*/
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Document dcx = agentContext.getDocumentContext();
/*init vector and hashtable*/
String strRequestContent = "";
Vector dcxItems = dcx.getItems();
/*search the item list for request_content*/
for (int i=0; i < dcxItems.size(); i++)
{
Item iItem = (Item) dcxItems.elementAt(i);
if (iItem.getName().equals("REQUEST_CONTENT") || iItem.getName().equals("request_content"))
strRequestContent = iItem.getValueString();
break;
}
/*parse request content string using
string parsing _or_ javax.servlet.http
functions*/
what jerome mentioned is very feasible. I have used the same technique mentioned to post to a java agent, the code (roughly) looks like this:
/*get document context*/
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Document dcx = agentContext.getDocumentContext();
/*init vector and hashtable*/
String strRequestContent = "";
Vector dcxItems = dcx.getItems();
/*search the item list for request_content*/
for (int i=0; i < dcxItems.size(); i++)
{
Item iItem = (Item) dcxItems.elementAt(i);
if (iItem.getName().equals("REQUEST_CONTENT") || iItem.getName().equals("request_content"))
{
strRequestContent = iItem.getValueString();
break;
}
}
/*parse request content string using
string parsing _or_ javax.servlet.http
functions*/