开发者

Including static .jsp files in Google App Engine

I am building an application on GAE and, let's say, I just want a plain "About" page for the application. The about.jsp file should or should not have an servlet class?

In web.xml I have something like

<servlet>
    <servlet-name>application</servlet-name>
    <servlet-class>application.applicationServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>application<开发者_高级运维;/servlet-name>
    <url-pattern>/about</url-pattern>
</servlet-mapping> 

How do I include the about.jsp file? is this done automatically?


If it's a static file, you should just have a static HTML page to show the content. A static page will be much quicker to serve than even a static JSP, since the server won't have to inspect the file to see if there's anything to fill in, it will just serve the page immediately.

See the docs on serving static files.


From what i can understand from your question is that wheather or not you need to make an entry for the jsp file in the configuration file. Now if you are going for the default behaviour that is the about.jsp should be displayed when the user hits the url /about.jsp,you need not make an entry for the same. and this is not specific to App engine,this is the default behavior for any container

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜