facebook

"struts forward.setPath" problem:

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #263802 Reply

    augustfox
    Member

    I have a project which has been develped by WSAD5.1.2(ibm).
    Now I want to import this project into eclipse3.1.2+jboss4.0.1sp1+myeclipse4.1.1.
    All has runned well,except one problem as follows:

    In my DispatchAction when forward.setPath(url);
    the url must begin with “/”,
    such as forward.setPath(“/success.jsp”),not forward.setPath(“success.jsp”).

    But all is well in WSAD,I searched some struts/servlet source code,but have
    no idea of it.
    My project uses lots of DispatchActions,all as above,and not want add “/”
    for every forward.setPath().

    Any help is appreciated,thanks all.

    #263820 Reply

    Riyad Kalla
    Member

    Very strange… it sounds like the version of Struts you were using and are now using have changed,if the same code is behaving differently.

    As I understand it, this is an runtime issue and not a build time issue.. is that correct?

    #263870 Reply

    augustfox
    Member

    Thanks rkalla:

    Both are struts1.1,and this error was throwed by javax.servletContext.getReuestDispatch,
    this is the sun’s package,not tomcat or websphere.

    #263874 Reply

    augustfox
    Member

    Now I eidted tomcat’s
    ApplicationContext.class getRequestDispatch to solve this problem for temporarily using.

    #263876 Reply

    Riyad Kalla
    Member

    I’m glad to hear it’s working now, but if you had to edit a Tomcat class, my guess is that you either have a bug or some behavior in the underlying platform changed on you.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: "struts forward.setPath" problem:

You must be logged in to post in the forum log in