Timothy Stone wrote:

List,

Struts noob.

I'm checking a form for a parameter that determines whether the user is searching the web at large or the local site:

<input type="radio" name="isLocal" value="true"/>Site&nbsp;
<input type="radio" name="isLocal" value="false"/>Web

If "false".equalsIgnoreCase( isLocal ) then my actionMapping.findForward( "gogoGoogleSearch" ) is envoked.

This is where I get lost... I need to format the query string and pass it to Google in the redirect. At a minimum Google looks for a query string like:

http://www.google.com/search?q=hearts

How do I do this? I think I'm looking for something similar to this, which is what I'm most familiar with:

response.sendRedirect("http://www.google.com/search?q="; + queryString);


What about:


if( "false".equalsIgnoreCase( isLocal ) ) {
        return( new ActionForward( "http://www.google.com/search?q="; +
                                   query, true );
}

I can't seem to find a way of envoking this via the struts-config.xml and a logical mapping name.

The docs seem to suggest that this is okay.

Thoughts?


<actions>
    <action ...
        <forward ... redirect="true" />
    </action>
</actions>

doesn't seem to be doing enough.

Many thanks in advance!

Warmest Regards,
Tim

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



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



Reply via email to