简体   繁体   English

Java Web应用程序及其服务器托管

[英]java web application and their servers hosting

I have developed a java web application using JSF 2.0(Facelets) on GlassFish 3.1.1 with a MySql 5 DB, its more of a company website offering their services online. 我已经在带有MySql 5 DB的GlassFish 3.1.1上使用JSF 2.0(Facelets)开发了一个Java Web应用程序,该应用程序更多是公司网站提供在线服务的网站。

I tried to go for the Bulidng my own server hosting, but the company refused and preferred to go for online hosting. 我曾尝试使用Bulidng自己的服务器托管,但该公司拒绝了,宁愿选择在线托管。

So now am going for online hosting and my questions is this:- 所以现在要进行在线托管,我的问题是:

Does JSF (or any other java EE framework) need their own type of servers, or if a server can host jsp/servlets is capable of hosting JSF apps ? JSF(或任何其他Java EE框架)是否需要它们自己的服务器类型,或者如果服务器可以承载jsp / servlet,则可以承载JSF应用程序?

and does applications developed using Glassfish work on TomCat servers or JBOSS or any other? 使用Glassfish开发的应用程序能否在TomCat服务器或JBOSS或任何其他产品上运行?

Does JSF (or any other java EE framework) need their own type of servers, or if a server can host jsp/servlets is capable of hosting JSF apps ? JSF(或任何其他Java EE框架)是否需要它们自己的服务器类型,或者如果服务器可以承载jsp / servlet,则可以承载JSF应用程序?

If a server can run jsp/servlets, it can run JSF (JSf behind the scenes is using servlets). 如果服务器可以运行jsp / servlet,那么它可以运行JSF(幕后JSf正在使用servlet)。 You just need to bundle the jsf implementation library (example: Mojarra jar file) with your webapp. 您只需要将jsf实现库(例如:Mojarra jar文件)与Web应用程序捆绑在一起即可。

Does applications developed using Glassfish work on TomCat servers or JBOSS or any other? 使用Glassfish开发的应用程序是否可以在TomCat服务器或JBOSS或任何其他服务器上运行?

Tomcat is a servlet container, it is not a standard Java EE application server. Tomcat是一个Servlet容器,它不是标准的Java EE应用程序服务器。 In other words, Tomcat doesn't have an EJB container or CDI (Context and Dependency Injection) container. 换句话说,Tomcat没有EJB容器或CDI(上下文和依赖项注入)容器。 So if you used any EJBs or CDI in your application developed using JBoss or Glassfish, it wouldn't work on Tomcat. 因此,如果在使用JBoss或Glassfish开发的应用程序中使用了任何EJB或CDI,则在Tomcat上将无法使用。

Glassfish and Jboss have full support for Java EE applications. Glassfish和Jboss完全支持Java EE应用程序。 So, anything developed using Glassfish can technically work on JBoss. 因此,使用Glassfish开发的任何东西在技术上都可以在JBoss上运行。 You might have to do little tweaks such as pre-pending the JNDI names etc. 您可能需要做一些微调,例如将JNDI名称预先添加等。

Hope that helps. 希望能有所帮助。

You need to do some google 你需要做一些谷歌

for terms like glassfish vs tomcat , tomcat vs jboss and so on... in order to get the general idea and in order to see the pros and cons 诸如glassfish vs tomcattomcat vs jboss之类的术语……以便获得总体思路并了解其优缺点

INMO , in general they are the more or less the same , it also depends on the kind of support you want to get in the future.. some are free some cost hundreds of $$$ and even more 通常,INMO大致相同,这还取决于您将来希望获得的支持类型。有些是免费的,有些则要花费数百美元,甚至更多。

Regarding the migrating from one web server to another : If you write your app tomcat and want to migrate to glassfish it will be doable.. but you probably will have to do some googling in order to do the needed fine tuning and placing the missing jars that the new web server require... 关于从一台Web服务器到另一台服务器的迁移:如果您编写了应用程序tomcat并想迁移到glassfish,那将是可行的..但是您可能必须进行一些谷歌搜索才能进行所需的微调并放置丢失的jars。新的Web服务器需要...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM