Within this short blog post you’ll learn how to debug JSP files within portal application using NWDS. (EP 7.3x versions)
The Portal Runtime enables you to run JSP pages in the portal, and to write portal components as JSP pages
When the JSP is first accessed, the portal creates a .java file that defines a class that extends AbstractPortalComponent that is based on the JSP page, and then compiles the file into a .class file. When the JSP is called, it is this class that is executed, not the JSP.
In the following screen shot you can see a sample of how to include such JSP file in our portal application:
The JSP file “MyJsp.jsp”, which is located under PORTAL-INF\jsp is included in the response of the portal application.
More info on JSP’s in Enterprise Portal and the process can be found in here.
Note that you’d be able to stop at breakpoints also without this process, but you won’t be able to see the source you are debugging, therefor making debugging almost useless.
For debugging this JSP with NWDS and see the sources correctly do the following:
- Create a folder named “WEB-INF” under the root folder of your portal application project
- Create sub-folder named “jsp” under WEB-INF folder you’ve just created
- Copy the desired jsp file into the WEB-INF\jsp folder , so after this step your project looks like this:
4. Launch your application and start debugging the jsp – putting breakpoints, watching variables, etc:
* Important note – Do not deploy the application to the server after copying the jsp.If needed, revert to original state before deploying.
* for EP 6.40 and 7.0x the process is far more complex. I may write a post if anyone is interested.
You want to influence the future product roadmap of Enterprise Portal? You plan to implement your portal in the Cloud? Then you should participate in the following survey https://blogs.sap.com/2016/10/11/2016-elections-vote-now/.