Hi all

I had this problem about the redirection or forwarding to a page and
my pics didn't show up there.

Now it seems so, that this is a Websphere problem, because when I get
the ServletContext he doesn't bring the /  as context path. Instead it gets
back my Web folder I use /testapp.

Then I altered the code a slight bit to this:

 protected void processActionForward(ActionForward forward,
                                        ActionMapping mapping,
                                        ActionForm formInstance,
                                        HttpServletRequest request,
                                        HttpServletResponse response)
        throws IOException, ServletException {

        if (forward != null) {
            String path = forward.getPath();
            if (forward.getRedirect()) {
                if (path.startsWith("/"))
                    path = request.getContextPath() + path;
                response.sendRedirect(response.encodeRedirectURL(path));
            } else {

            /*    RequestDispatcher rd =
                    getServletContext().getRequestDispatcher(path);
                rd.forward(request, response);*/
                response.sendRedirect(path);
            }
        }

    }

Can anybody tell me if I'm wrong with that change ?

Regards

Mike






******************* PLEASE NOTE *******************
This message, along with any attachments, may be confidential or legally
privileged.  It is intended only for the named person(s), who is/are the
only authorized recipients. If this message has reached you in error,
kindly destroy it without review and notify the sender immediately. Thank
you for your help.
**********************************************************






******************* PLEASE NOTE *******************
This message, along with any attachments, may be confidential or legally
privileged.  It is intended only for the named person(s), who is/are the
only authorized recipients. If this message has reached you in error,
kindly destroy it without review and notify the sender immediately. Thank
you for your help.
**********************************************************

Reply via email to