If I understand right, the answer is no (and the question is not related to struts, but only to ibatis). You can't get (AFAIK) the sql generated/executed by ibatis, and there are good reasons for that. If you are debugging some sql problem, your database should allow you to turn on full logging of your sql queries.
Hernán J. González http://hjg.com.ar/ On Wed, Mar 4, 2009 at 4:46 PM, Emi Lu <em...@encs.concordia.ca> wrote: > Good morning, > > I have a question based on ibatis + struts. Would it be possible that in > java code, I could get the query in ibatis. > > For example, in ibatis_query.xml > <select id="test"> > select * from a > </select> > > > In java, > =============== > public ActionForward execute( > ActionMapping mapping, > ActionForm aform, > HttpServletRequest request, > HttpServletResponse response) > throws Exception > { > String ibatis_sql = ***(something need to know).getQuery("test", null); > ... ... > } > > > Thanks a lot! > Lu Ying > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org