OK, Found an answer for anyone who is interested, If not delete :)
URL url = "" URL("http://localhost/helloworld.jsp");
URLConnection conn = target.openConnection();
conn.addRequestProperty("METHOD", "POST");
conn.addRequestProperty("Cookie", "JSESSIONID="+sessionId);
conn.connect();
BufferedReader in = new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
String inputLine;
StringBuffer pageContent = new StringBuffer();
while ( ( inputLine = in.readLine() ) != null ) {
pageContent.append( inputLine );
}
in.close();
[EMAIL PROTECTED]
08/17/2005 03:04 PM
|
|
Sorry for the off topic post,
I have a case where I am generating a struts form and placing it into a
session. I am having to create a inputStream based on a URL of a JSP which
uses the form, but the JSP cannot find the form in any scope. Does the URL
use a different request/session than the action that is creating it? If
so, does anyone know of a way to pass the dynaform to the URL?
Example code:
JSP:
Hello <bean:write name="myForm" property="userName">
ActionClass
public ActionForward execute(final ActionMapping mapping,
final
ActionForm form,
final
HttpServletRequest request,
final
HttpServletResponse response) {
if(null != form){
callFunction(new URL("http://localhost/helloworld.jsp"));
}
return null;
}