Sending "outside" request to Struts Action?

W

willirl

I have an older application where I need to send a URL request into the
new struts code. The request will have information in it about what
action to perform next. It seems like I should be able to send the
request directly to an action but there doesn't seem to be any way to
do this (since an action is not a servlet).

Do I need an "invisable" JSP to funnel through to the Action? (just a
thought)

Can someone tell me how to do this?
 
W

Wendy S

willirl said:
I have an older application where I need to send a URL request into the
new struts code. The request will have information in it about what
action to perform next. It seems like I should be able to send the
request directly to an action but there doesn't seem to be any way to
do this (since an action is not a servlet).

What exactly do you mean by 'send a URL request'? That sounds like a
redirect to me.

If so, just construct the URL, tack on the request parameters and redirect
to it.
http://www.example.com/myApp/something.do?param1=abc&param2=123

Or do you need to make a request of the Struts app and do something with the
response? Again the easiest way to communicate 'from the outside' with a
Struts Action is with HTTP GET or POST. Maybe Jakarta's HTTPClient project
would be useful.

Try posting some code from the project and pointing out where you're stuck.
Otherwise, you leave us guessing.
 
W

willirl

OK. Sometimes you can't see the forest for the trees. That's exactly
what I need to do send the request similar to what you gave above and
then do a forward based on the params.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top