Skip to main content

Embedded Glassfish: Set custom error page via CommandRunner

No replies
Wasomumba
Offline
Joined: 2011-08-05

Hi,

I try to set a custom 404-error page via the command-runner-api for an embedded glassfish, but it doesn't work. Can anybody help me with this problem?

Here is my actual code:

CommandRunner commandRunner = glassfish.getCommandRunner();

CommandResult result = commandRunner.run(
"set",
"server.http-service.virtual-server.server.property.send-error_1=\"code=404 path=/404.html reason=Resource_not_found\""
);

The Result-Status ist "success".

Thanks for any suggestions.

W.