RE: Send data from servlet to servlet

2002-09-05 Thread jwang13


Martin,
Could you give some code example? I am new to Servlet and don't know how to
do it. I don't care whether to send as request or response. It's just a
large string to be sent from servlet to servlet in another domain. Thanks.

Jenny



   
 
  Martin Cooper  
 
  martin.cooper@tumb   To:   'Struts Users Mailing 
List' [EMAIL PROTECTED]
  leweed.com   cc:
 
Subject:  RE: Send data from servlet 
to servlet 
  09/04/2002 09:14 PM  
 
  Please respond to
 
  Struts Users
 
  Mailing List
 
   
 
   
 



Are you trying to send the data as part of a request or as part of a
response? If it's part of a request, then you should use a POST request
with
multipart/form-data encoding. If it's part of a response, then just send
the
data directly, and then return null from your Struts Action.

--
Martin Cooper


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 04, 2002 2:12 PM
 To: [EMAIL PROTECTED]
 Subject: Send data from servlet to servlet


 I have two web applications running on two domains. I need to send
 data(large amount of xml string) from servlet in one
 application to servlet
 in another application. I can't use parameter in request
 since the amount
 of data is large. I can't use request.setAttribute() since
 attributes will
 be lost during redirect to a dirrefent domain.

 How should I send this large amount of String data? Thanks
 for any help.



 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]




--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Call action from JSP

2002-09-05 Thread jwang13

Could someone help me on this code:

In *.jsp:

%
  if (condition satisfied) {
// how to fill this line to call an action, say invoke.do?
  }
%

Thanks.


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Call action from JSP

2002-09-05 Thread jwang13


I don't use form because I don't need to submit any data. The action will
perform some logic against query string in request and data in session, and
forward wither to a success page or a failure page.

I could put this logic directly in JSP rather than in an action, but I
don't want so many Java code in JSP.



   

  Galbreath, Mark

  Galbreath@tessco.   To:   'Struts Users Mailing List' 
[EMAIL PROTECTED]
  com cc: 

   Subject:  RE: Call action from JSP  

  09/05/2002 12:27 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   




Why would you want to call an Action class directly from a JSP (outside a
form:action block)?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 05, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: Call action from JSP


Could someone help me on this code:

In *.jsp:

%
  if (condition satisfied) {
// how to fill this line to call an action, say invoke.do?
  }
%

Thanks.


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Call action from JSP

2002-09-05 Thread jwang13


The JSP is an index.jsp and condition has to be check there.

If I use response.sendRedirect(URL) in the JSP scriplet, it seems that a
new request is created during redirect. Is there a simple way to keep the
previous request rather than create a new one?



   

  Joe Barefoot   

  Joe.Barefoot@moti   To:   Struts Users Mailing List 
[EMAIL PROTECTED]  
  va.com  cc: 

   Subject:  RE: Call action from JSP  

  09/05/2002 12:42 

  PM   

  Please respond to

  Struts Users

  Mailing List

   

   




hmmm...why not check your condition and perform this logic in an action
before you even forward to the JSP in the first place?

b.t.w., you can always issue a response.sendRedirect( URL ) in the JSP
scriplet, and give it the URL-mapping for the action you wish to redirect
to.  I don't think that doing this is a great idea, however. :)


peace,
Joe

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 10:40 AM
 To: Struts Users Mailing List
 Subject: RE: Call action from JSP



 I don't use form because I don't need to submit any data. The
 action will
 perform some logic against query string in request and data
 in session, and
 forward wither to a success page or a failure page.

 I could put this logic directly in JSP rather than in an action, but I
 don't want so many Java code in JSP.






   Galbreath, Mark


   Galbreath@tessco.   To:
 'Struts Users Mailing List'
 [EMAIL PROTECTED]
   com cc:


Subject:  RE:
 Call action from JSP

   09/05/2002 12:27


   PM


   Please respond to


   Struts Users


   Mailing List











 Why would you want to call an Action class directly from a
 JSP (outside a
 form:action block)?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 05, 2002 1:19 PM
 To: [EMAIL PROTECTED]
 Subject: Call action from JSP


 Could someone help me on this code:

 In *.jsp:

 %
   if (condition satisfied) {
 // how to fill this line to call an action, say invoke.do?
   }
 %

 Thanks.


 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]







 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Send data from servlet to servlet

2002-09-04 Thread jwang13

I have two web applications running on two domains. I need to send
data(large amount of xml string) from servlet in one application to servlet
in another application. I can't use parameter in request since the amount
of data is large. I can't use request.setAttribute() since attributes will
be lost during redirect to a dirrefent domain.

How should I send this large amount of String data? Thanks for any help.



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Send data from servlet to servlet

2002-09-04 Thread jwang13


Ted,

How to send this large size string as response in perform() of the struts
Action? Can you give some code sample?

As I mentioned in previous email, neither set parameter nor set attribute
works in this situation. Set parameter won't work for large size data and
set attribute won't work due to redirect to another domain. I can't think
of any other solutions.

Thanks.

Jenny


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




HTTP request attribute lost due to redirect

2002-09-03 Thread jwang13

I have two web applications on two domains. The action in one application
will set attribute in Http request and redirect to a servlet (or JSP) in
another application. However, it seems that request attribute are lost
during redirect. Any solutions?




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: HTTP request attribute lost due to redirect

2002-09-03 Thread jwang13


I tried parameter and it was successful. However, I need to send large
amount of data and I am not sure if parameter is a good solution.
Basically, what are the differences between attribiute and parameter, and
thieir cons and pros?

Jenny



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]