>You can use a wildcard mapping for this
Okay, I'll try that out. Actually I just don't know where to set wildcard
mappings.

>Also, I'm not entirely sure what you mean when you say "where ??? is the
>keywords for the search".  Do you mean they will be in the form of a
>query string, or literally part of the URI path you request?
Yes, here "???" is the query string, and the directory
"/search/???", obviously, does not exist at all.

Regards.


On 12/7/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>
> You can use a wildcard mapping for this:
>
>
> http://struts.apache.org/struts-doc-1.2.8/userGuide/building_controller.html#action_mapping_wildcards
>
> In your case, something like this should work:
>
> <action path="/search/*" type="your.company.app.SearchAction" />
>
> Note that the servlet mapping remains whatever it is now, I'm guessing
> something like /* in your case.
>
> Also, I'm not entirely sure what you mean when you say "where ??? is the
> keywords for the search".  Do you mean they will be in the form of a
> query string, or literally part of the URI path you request?  I believe
> a wildcard mapping is the answer either way though, even if the above
> configuration isn't precisely right for your particular use case.
>
> Frank
>
> Allen Charlton wrote:
> > Hi all! I wonder how to manage this.
> >
> > Suppose a local site called testsystem, whose index page can be visited
> as
> > http://localhost:8080/testsystem. Now I want an Action (named
> SearchAction)
> > to process all search requests presented by this uri-pattern:
> > http://localhost:8080/testsystem/search/???, where ??? is the keywords
> for
> > search. You know that if I write "<url-pattern>/search/*</url-pattern>"
> > properly in web.xml, such search requests will be served by
> ActionServlet.
> > But it seems that I cannot specify a certain Action for a url-pattern.
> The
> > names of the forwards defined in <global-forwards> is already constants,
> not
> > variables. So how to do this?
> >
> > Big thanks!
> >
> > --
> > See? It is the Eclipse of the Sun!
> > -----------------------
> >
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM: fzammetti
> Yahoo: fzammetti
> MSN: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
See? It is the Eclipse of the Sun!
-----------------------

Reply via email to