Glassfish Server File Location

We can put our file in the t.txt file in the tomcat-> webapp folder. Now we can access this file in the browser using the URL as shown below:

http://localhost:8080/txt/one.txt 

I am new to Glassfish server. Can someone tell me how to do the same in glssfish server as in tomcat server?

+6
source share
2 answers

By definition, a ROOT application is an application available under the root URL (for example, http: // locahost: 8080 / ) of a server.

The only thing you need to do is determine the application that needs to be deployed in the root context. How to do it in a glass fish can be found here .

0
source

GlassFish has very similar features.

There is a default application that serves static content from the docroot domain defined with Glassfish.

You can do the following to see how it works.

Suppose you installed GlassFish 3.1.2 in a directory named / foo (or C: \ FOO) by unzipping one of the distributions.

You can create the directory / foo / glassfish 3 / glassfish / domains / domain1 / docroot / txt and place the one.txt file in this directory.

Run domain1 with the command asadmin start-domain domain1

Then you can access one.txt via the url http: // localhost: 8080 / txt / one.txt .

+10
source

Source: https://habr.com/ru/post/912587/


All Articles