RE: Re: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
PM To: user@struts.apache.org Subject: Re: how forward to servlets? Dave Newton wrote: > Laurie Harper wrote: >> > path="/somepath" >> type="org.apache.struts.actions.ForwardAction" >> parameter="/servlet/com.med.servlet.cp.LogonServlet&

Re: how forward to servlets?

2005-07-19 Thread Laurie Harper
Dave Newton wrote: Laurie Harper wrote: You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts action. Your JSPs, etc. would continue to reference /somepath without change. Would this work for the original examp

RE: Re: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
Thanks. That's exactly what I needed and it works. Jane -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Tuesday, July 19, 2005 4:20 PM To: user@struts.apache.org Subject: Re: how forward to servlets? To offer a concrete example: You

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
Laurie Harper wrote: You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts action. Your JSPs, etc. would continue to reference /somepath without change. Would this work for the original example, which was using

Re: how forward to servlets?

2005-07-19 Thread Laurie Harper
To offer a concrete example: You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts action. Your JSPs, etc. would continue to reference /somepath without change. L. Craig McClanahan wrote: You can indeed forwar

Re: how forward to servlets?

2005-07-19 Thread Aleksandar Matijaca
ge when a servlet is replaced > by an equivalent action. Could I use a ForwardAction action to forward > to the servlets? > > -Original Message- > From: Dave Newton [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 19, 2005 3:32 PM > To: Struts Users Mailing List > Sub

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
one more knowledgable than myself could talk about accessing the Struts config from the outside, or you could parse the parts you're interested in, or something. Dave -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 19, 2005 3:32 PM To:

Re: how forward to servlets?

2005-07-19 Thread Craig McClanahan
You can indeed forward to a servlet ... the path that you specify must be a context relative path (starting with a slash) to some URL that you have mapped to your "other" servlet. The restriction with forwards is that you cannot go outside the current webapp. Craig On 7/19/05, Michael Jouravlev

Re: how forward to servlets?

2005-07-19 Thread Michael Jouravlev
On 7/19/05, Jane Eisenstein <[EMAIL PROTECTED]> wrote: > I would like to be able to forward to the existing servlets from Struts > code in a manner that will not need to change when a servlet is replaced > by an equivalent action. Could I use a ForwardAction action to forward > to the servlets? I

Re: how forward to servlets?

2005-07-19 Thread Michael Jouravlev
On 7/19/05, Aleksandar Matijaca <[EMAIL PROTECTED]> wrote: > How about: > > response.sendRedirect("/yourcontext/YourServlet"); He wants to forward, not to redirect. I guess, something like this should work: RequestDispatcher disp = getServletContext().getNamedDispatcher("LogonServlet"); disp.

RE: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
PROTECTED] Sent: Tuesday, July 19, 2005 3:32 PM To: Struts Users Mailing List Subject: Re: how forward to servlets? Jane Eisenstein wrote: ... > >What am I doing wrong? > > Mixing Struts and servlets ;) Creating a forward doesn't create an action--what is logonServlet.do? If i

Re: how forward to servlets?

2005-07-19 Thread Aleksandar Matijaca
How about: response.sendRedirect("/yourcontext/YourServlet"); inside of your code?? Regards, Alex. On 7/19/05, Dave Newton <[EMAIL PROTECTED]> wrote: > > Jane Eisenstein wrote: > > > > > LogonServlet > > LogonServlet > > com.med.servlet.cp.LogonServlet > > > > > > LogonServlet > > /servle

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
Jane Eisenstein wrote: LogonServlet LogonServlet com.med.servlet.cp.LogonServlet LogonServlet /servlet/com.med.servlet.cp.LogonServlet Its struts-config.xml contains When I try to load this servlet via this code: src="logonServlet.do&targetAction=displayLogonPage" scrolling="

how forward to servlets?

2005-07-19 Thread Jane Eisenstein
I am integrating Struts into an application containing servlets. I would like to invoke these from Struts components, but am having a problem getting this configured. My application's web.xml contains: LogonServlet LogonServlet com.med.servlet.cp.LogonServlet LogonServlet /servlet