Home > java > javax.servlet.ServletException: Path loginLayout does not start with a "/" character

javax.servlet.ServletException: Path loginLayout does not start with a "/" character

… its been a year and a half , i have used Struts.
A week back we got a project and we decided to use Struts 1.3.5 since Struts 2.0 is still in beta.
While i was trying forward response to a Tile forward instead of directly redirecting to a jsp , i got an exception
javax.servlet.ServletException: Path loginLayout doesnot start with a “/” character
after googling for half an hour i got the solution
pre-requsite :
download Struts1.3.5-all.zip

Step 1. add chain-config.xml to WEB-INF folder inside your project
you can find this file in
/struts-1.3.5-all/struts-1.3.5/src/tiles/src
/main/resources/org/apache/struts/tiles

Step 2.
add the following init-param tag to Action Servlet configuration in web.xml

<init-param>
<param-name>chainConfig</param-name>
<param-value>/WEB-INF/chain-config.xml</param-value>
</init-param>

Step 3.
add commons-chain-1.1.jar to your project library.

this should solve the problem.

  • Share/Bookmark
Categories: java
  1. April 26th, 2007 at 21:06 | #1

    Thank you so much for this. I’ve read 4 books on struts and how come these additional setup was not mentioned. How did you figure it out?

  2. Rajesh
    April 27th, 2007 at 15:00 | #2

    Jon,
    i was just googling and somehow made it work for me.
    btw
    a hug for u (i saw the free-hugs video on ur website :) )

  3. Abhishek Dwivedi
    May 3rd, 2007 at 20:46 | #3

    Rajesh,
    very good posting. Helped me a lot. Somehow my googling was not leading to this solution and I found ur posting, has precise solution for this problem.

    Thanks again… :)
    Abhishek

  4. Ko Ko
    May 12th, 2007 at 20:30 | #4

    Rajesh,
    What a precious finding! Thanks a lot for sharing! I have been spending hours to figure it out…

  5. Rajesh
    May 14th, 2007 at 17:14 | #5

    happy to know :)

  6. Jim
    May 25th, 2007 at 18:48 | #6

    Rajesh,
    Thank you for this. All previous apps had been in struts 1.2 and below and we didnt’ have to do this. We implemented struts 1.3.5 and got this error. I wish I had seen your advice a few hours ago.
    Jim

  1. No trackbacks yet.