webMathematica >
webMathematica Tutorial

Mapping URLs onto JSPs

The way that webMathematica maps URLs onto JSPs is very straightforward. The URL names a JSP that lives directly in the webMathematica web application or in a subdirectory. Some examples are shown in this section.
In the first table, the MSP Script.jsp is located in the top of the webMathematica web application directory, for example, /usr/local/tomcat/webapps/webMathematica. It can be accessed by the URL http://host/webMathematica/Script.jsp.
locating in the root directory
script nameScript.jsp
script location/usr/local/tomcat/webapps/webMathematica
URLhttp://host/webMathematica/Script.jsp
In this second table, Script1.jsp is located in a subdirectory of the webMathematica web application directory, for example, /usr/local/tomcat/webapps/webMathematica/Test. The URL http://host/webMathematica/Test/Script1.jsp will find this JSP.
locating in a subdirectory
script nameScript1.jsp
script location/usr/local/tomcat/webapps/webMathematica/Test
URLhttp://host/webMathematica/Test/Script1.jsp
Remember that you should not place JSPs inside the WEB-INF directory. If you do, they will not be accessible.