You can use the query string to pass parameters to your Action class:

http://www.whatever.com/myapp/myaction.do?color=red

Then use request.getParameter("color") to retrieve the query parameter in
the Action class.  In this case you are still using an Action class not
Action Servlet.  Don't confuse ActionServlet with Action class.  The .do
request is sent to your subclass of Action by the ActionServlet object as
defined in your struts-config.xml file.

You could use an ActionForm as well. In the above example, it would have a
setColor() method that would get called when the above URL as accessed.

Tim

-----Original Message-----
From: ajTreece [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 1:57 PM
To: Struts Users Mailing List
Subject: Passing parameters directly to Action Servlet


Is it possible... And how do you pass parameters directly to a action
servlet 
without the use of a jsp and action form.

What I'm doing is reading DB CLOB which is actually just XML data an
spitting in 
out to an newly opened browser window.  The originating JSP will just have a

bunch of links that pass the id number and display type to the action
servlet 
(.do). The .do will get the data, format it as required and give it to a jsp
to 
display.

Is this possible or am I barking up the wrong tree...

Thanks, ajTreece


--
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]>

Reply via email to