0

Is there a way to specify a virtual server in the web application deployment descriptor, like web.xml or glassfish-web.xml? In the application deployment guide i found the information:

Virtual Servers. If you deploy a web application and do not specify any assigned virtual servers, the web application is assigned to all currently-defined virtual servers with the exception of the virtual server with ID __asadmin, which is reserved for administrative purposes. If you then create additional virtual servers and want to assign existing web applications to them, you must redeploy the web applications. https://javaee.github.io/glassfish/doc/4.0/application-deployment-guide.pdf

It's true. After deployment the application is assigned to all virtual servers and I can go to the Admin Console -> Applications -> MyApplication -> check only one virtual server and click Save to achive the point. But during the development process, when some glassfish restarts is needed, it is really irritating. Is it possible to set the virtual server name, like "server", in the application deployment descriptor?

I'm using the latest promoted glassfish version, at this moment it's Glassfish 5 build 22.

kojot
  • 1,634
  • 2
  • 16
  • 32
  • Why do you need to deploy to a specific virtual server during development? – Mike Aug 25 '17 at 10:21
  • In our application we access to the images with subdomain, like img.domain.com, that's why we need virtual server to this. In my development environment I need the same, virtual server for img.localhost, to have ability for testing image uploads etc. Context root of application is set to '/', so when application is deployed on all virtual servers I have no access to img.localhost. – kojot Aug 28 '17 at 05:46

0 Answers0