struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terje Hopsø <tehos...@online.no>
Subject RE: trigger an action from a filter?
Date Wed, 16 Jul 2003 07:20:14 GMT
I missed some of the understanding of how Struts works. I had a link (not in
a form) to a page where I wanted to get a resultset from my database first.
I had the logic in an actionServlet. The link activated the filter but not
the actionServlet. If I used a form with submit the actionServlet got
activated but not the filter. That's why I wanted to get the filter to
activate the actionservlet.

I have changed this now and move the logic into the filter an removed the
form/submit button and don't need a actionServlet for this link.

I am a novice to Struts at the moment and I am reading, trying and reading
the books again. 

- Terje



Not sure if this is what Terje is after, but you can use a link instead of a
form:

<html:link action="/action/path">...</html:link>

http://jakarta.apache.org/struts/userGuide/struts-html.html#link

As Max asked though, it would help to have some more detail on what the
requirements are.

Quoting Max Cooper <max@maxcooper.com>:

> You could send a redirect or forward the current request to the Struts
> action (mapping) from a Filter or Servlet.
> 
> What has lead you to want to do this? Perhaps a simpler solution to your
> functional needs is possible.
> 
> -Max
> 
> ----- Original Message ----- 
> From: "Terje Hopsø" <tehosubs@online.no>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Tuesday, July 15, 2003 1:47 AM
> Subject: trigger an action from a filter?
> 
> 
> > Hello,
> >
> > How can I call my actionservlet without using a FORM/SUBMIT? Can I
> trigger
> > it from a Filter-servlet and in that case how?
> >
> > - Terje


-----Original Message-----
From: Terje Hopsø [mailto:tehosubs@online.no] 
Sent: 15. juli 2003 10:47
To: Struts Users Mailing List
Subject: trigger an action from a filter?


Hello,
 
How can I call my actionservlet without using a FORM/SUBMIT? Can I trigger
it from a Filter-servlet and in that case how?
 
- Terje
 


Mime
View raw message