Can you render a file without a .jsp extension as a JSP?

前端 未结 2 604
误落风尘
误落风尘 2020-12-20 13:37

Is it possible to tell a standard Java EE servlet container to interpret and render a file as a JSP even if it doesn\'t have a .jsp extension?

Say I have a file call

2条回答
  •  旧巷少年郎
    2020-12-20 14:37

    You can add the following configuration in your web.xml to make files ending with .xyz beeing processed as JSP:

    
        
            *.xyz
        
    
    

    This solution is working with Tomcat and Websphere. And probably with any JEE compliant server container.

提交回复
热议问题