Could it be done in a regular Custom Tag? > -----Original Message----- > From: Thom Burnett [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 05, 2006 2:59 PM > To: Struts Users Mailing List > Subject: The first request > > I need to set up my first page with a sequence of database > interactions > before the execute() method is called (I think). What's the > recommended > struts way of doing so. > > > When a first request to my jsp page arrives, I need to read some key > parameters of the request, contact my database, and then fill > in some fields > of the page based on what the parameters and database tell > me. I'm not clear > on how to hook that in. I don't seem to have access to the > doPost() and > doGet() methods that I would with a standard servlet. > > 1. One obvious solution is to extend the struts ActionServlet > so that I can > override the doGet() and/or doPost(). Does that interfere > with standard > struts behavior? > > 2. I could also use a standard servlet to handle the request and then > forward or redirect to my struts pages and servlet. That > seems to somewhat > defeat the purpose of struts but it could be done. > > 3. I could also put a lot of java into my jsp page to do all > my processing > but that's a violation of MVC and pretty messy as well. > > 4. I thought about using the constructor of my ActionForm > since it gets > called at the right time but I don't have the request object > available (and > I need those parameters). > > 5. Any other ideas? > > I need a solution (preferably an example) that works for > struts 1.3.5. with > an ActionForm (not the DynaActionForm). >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]