Search code examples
javajspapache2mod-jk

is a .jsp file intended to be rendered in a browser like a .html file?


I have a hello.war file (an example file from GlassFish website), and I'm trying to access it from a browser. (this file can be downloaded from HERE)

I can deploy this war file to GlassFish server, and access it fine from:

www.mydomain.com:8080/hello/

However, I want to access it from:

www.mydomain.com/glassfish-test/hello/

So to do that I modified the httpd.conf file (VirtualHost section) with this line (and restart Apache):

JkMount /glassfish-test/* worker1

And placed the hello.war file into ~/public_html/glassfish-test/ directory. Then I unzipped it using tar xvf and I see an index.jsp file among other things (located in the glassfish-test directory). If I set up GlassFish with Apache and mod_jk correctly, what is the URL I would need to set the browser to in order to view the hello.war application?

Would it be...

www.mydomain.com/glassfish-test/hello/
www.mydomain.com/glassfish-test/index.jsp
www.mydomain.com/glassfish-test/WEB-INF/???

I never worked with a .jsp or war file before. Any comments much appreciated.


Solution

  • Your Apache application server is listening on port 8080. Since you want to access the page by omitting the ":8080" in the hostname, then you need to configure Apache to listen on the default HTTP port, which is port 80.