You're right... why do it in a scriptlet when I can just do it in my action. I just used getter/setter and the s:property tag to display my stack trace string that I created in my catch block.
Thanks! On Mon, 2007-11-19 at 11:24 -0800, Dave Newton wrote: > If you want to access something in a scriptlet (which > hopefully you don't want to do) you can either access > the value stack or just stick it in one of the scope > maps. (See ParameterAware, RequestAware, SessionAware, > ApplicationAware.) > > If you want generic tag-based access then just expose > the object through the normal S2 mechanism, by > creating a public getter method; members exposed like > that are available via both S2 tags and JSTL/JSP EL. > > d. > > --- Jason Deffenbaugh <[EMAIL PROTECTED]> > wrote: > > > In struts 1 you could use the bean:define tag to use > > objects in a jsp > > file... for instance I used this to show a stack > > trace in an error jsp. > > > > <bean:define name="error" id="e" > > type="java.lang.Exception"/> > > <% > > out.println("<!--"); > > StringWriter sw = new StringWriter(); > > PrintWriter pw = new PrintWriter(sw); > > e.printStackTrace(pw); > > out.print(sw); > > > > sw.close(); > > pw.close(); > > out.println("-->"); > > %> > > > > where I had set > > > > catch (Exception e) { > > request.setParameter("error", e); > > } > > > > How would I accomplish this in struts 2? > > > > Thanks! > > > > -Jason > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]