如何在liferay中创建顶级servlet [英] How to create a top-level servlet in liferay
问题描述
我想在liferay中创建一个正在侦听URL的servlet,例如
http:// localhost:8080 / my-servlet
我试图将它添加到portlet但我有URL
http:// localhost:8080 / my-portlet / my-servlet
我试图将我的servlet描述添加到ext-web的web.xml中,但没有运气。
有没有办法添加这样的servlet?
Liferay也是Servlet - 应用程序 - 但是非常非常大的一个。 Liferay需要一些servlet容器,如tomcat,jetty,jboss等。
但是,您可以简单地创建servlet项目并将其直接部署到运行liferay的servlet容器中。 / p>
编辑:并通过servlet映射到web.xml,直接访问/*。
I wanted to create a servlet in liferay that is listening to a URL such as
http://localhost:8080/my-servlet
I tried to add it to a portlet but the I have the URL
http://localhost:8080/my-portlet/my-servlet
I tried to add my servlet description to the web.xml of ext-web, but no luck. Is there any way to add such a servlet ?
Liferay is also "Servlet"-Application - but a very-very big one. And Liferay need some servlet container like tomcat, jetty, jboss etc.
However, you can simple create servlet project and deploy it direct to servlet container where liferay is running.
edit: and put to web.xml by servlet-mapping a direct access like "/*".
这篇关于如何在liferay中创建顶级servlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!