简体   繁体   English

将企业应用程序从JBoss迁移到WebSphere

[英]Migrating an Enterprise app from JBoss to WebSphere

I am trying to migrate an enterprise application from JBoss to Websphere 8.5. 我正在尝试将企业应用程序从JBoss迁移到Websphere 8.5。 The application is configured with Spring MVC and tiles. 该应用程序配置有Spring MVC和图块。 The application is hosted in the server root of the JBoss Server, ie to access the application we just type https://localhost/ in the browser.For this reason all the links and association in the applications are currently written as follows: 该应用程序托管在JBoss Server的服务器根目录中,即,要访问该应用程序,只需在浏览器中键入https://localhost/ 。因此,应用程序中的所有链接和关联当前编写如下:

<link href="/resources/jQuery.js" .../>
...
<a href="/home">Home</a>

etc. 等等

But in WebSphere the application needs to be in a context root viz. 但是在WebSphere中,应用程序必须位于上下文根目录中。 https://localhost:9443/MigratedApplication . https://localhost:9443/MigratedApplication

The problem is that all the links and resources mapped in the application now are inside https://localhost:9443/MigratedApplication/resources but they are still looked for in https://localhost:9443/resources resulting in errors on the application throughout. 问题在于,应用程序中映射的所有链接和资源现在都位于https://localhost:9443/MigratedApplication/resources但仍在https://localhost:9443/resources寻找它们,从而导致整个应用程序出错。

Any ways to resolve the issue by configuration in WebSphere? 有什么方法可以通过WebSphere中的配置解决问题?

Unfortunately you have hardcoded paths in your application, so you have 2 choices: 不幸的是,您在应用程序中已经对路径进行了硬编码,因此有两种选择:

  • change the context root of the application on WebSphere to / as in JBoss (probably easier one, as doesnt require changes in application) 在JBoss中将WebSphere上的应用程序的上下文根更改为/ (可能更简单,因为不需要更改应用程序)
  • change all links to relative ones (this should be done in the first place during application development to make it independent of context root) 将所有链接更改为相对链接(应首先在应用程序开发期间完成,以使其独立于上下文根)

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

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