generator-jhipster icon indicating copy to clipboard operation
generator-jhipster copied to clipboard

Servlet context path with more than one slash not working

Open TheRealHaui opened this issue 2 years ago • 0 comments

Setting a servlet context path containing more than one slash leads the entire application to not work anymore.

When setting

server:
  servlet:
    context-path: /dir/subdir

in the application-dev.yaml file and setting

[        new HtmlWebpackPlugin({
          template: './src/main/webapp/index.html',
          chunksSortMode: 'auto',
          inject: 'body',
          base: '/dir/subdir',
        }),](url)

in the webpack.common.js file like described in the official documentation the entire application goes out of order. Currently React is in use for the web layer.

Obviously web resources like index.html do not get found by the Browser anymore because of obviously wrong directoy/path structures used then. I suspect it a problem with parsing because of the second slash in any internally used library.

JHipster info:

_Welcome to JHipster v7.8.1

Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
[email protected] xxxxxxxxxxxxxxxxxxx
└── [email protected]

JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "test",
    "blueprints": [],
    "buildTool": "maven",
    "cacheProvider": "no",
    "clientFramework": "react",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1663778902672,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 9060,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": false,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.8.1",
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "languages": ["en", "fr"],
    "messageBroker": false,
    "nativeLanguage": "en",
    "otherModules": [],
    "packageName": "com.test",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": true,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": [],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Environment and Tools

openjdk version "11.0.13" 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.18.04) OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)

git version 2.17.1

node: v16.14.2

npm: 8.5.0

Docker version 20.10.17, build 100c701

docker-compose version 1.17.1, build unknown

No change to package.json was detected. No package manager install will be executed._

TheRealHaui avatar Sep 22 '22 13:09 TheRealHaui