“Error : JSP files must reside in the server root directory or a subdirectory ”
How often have you struggled to specify a different folder for your JSPs, instead of JDeveloper’s default folder “public_html ”?
I struggled with this option today – I inherited an application source code that I had to analyze & look our for ways to improve readability of the code. The application source code had been developed without an IDE (!), using our favorite ANT as the build tool.
I easily imported this code into Jdeveloper 10.1.3 (using NEW -> Project from Source Code). However, I noticed that I frequently hit the error mentioned above.
After Googling a bit, I stumbled upon a few OTN forum posts . I found out that the solution is rather simple.
1. Click on the “Tools” option in the Jdeveloper Menu.
2. Select the “Project Properties” option from the drop down.
You can see the “Project Properties” Window.
3. Click on the “+” in the “Web Application” section to expand the options.
4. You can see the “HTML Root Directory ” option.
5. Specify the Root Directory of your JSP Pages here & click on the Ok button.
6. “Make” or “ReBuild” your project now.
7. You can notice that you no longer see this error .
The supplied JDeveloper help pages are slightly confusing – they don not mention that the “HTML Root Directory ” option is present under the “Web Application” section.