cannot execute a jsp from a subdomain


I created a subdomain called training.  I am trying to execute a jsp from this subdomain and the jsp does not execute.  The url is

If I access the jsp from this url it works

I added host entries in the server.xml file for and restarted the server.  The entries did not correct the problem.
any ideas?


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I think you need to check for DNS server instead, as you need to add a subdomain entry that points to your Server's IP.
kwwellsAuthor Commented:

DNS resolves correctly to

If I access the jsp from this url  it displays the text in the jsp, but does not execute the jsp.

Since it displays the jsp text, it found the jsp so the url is resolving correctly.


You are saying that the JSP doesnt execute, but also that 'it displays the test in the JSP' which are contradicting staements.

What exactly do you see when you try and access the JSP? You would only see the JSP text if it was executing.

If on the other hand, you are seeing partial info from the JSP - check your proxy settings. Is your testing server on your LAN? Do you use a proxy for web access? If so, check that your browser is set to bypass the proxy for the sub domain.

Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

kwwellsAuthor Commented:

1)The statements above are not contradicting, Try executing the two url's below.

The first is the url accessing the jsptest.jsp by the subdomain.  See that it displays the html text but not the results of the jsp code. 

The second URL is accessing the jsptest.jsp by the domain / directory.  Notice that it prints the same text as the url above but it also returns results of the jsp code. This url works but it is not being accessed by the subdomain.

2)There are no proxy being used to access the web.


Your server is not setup correctly, it is processing JSP pages as html, so its just dumping it onto the screen.

What application server are you using? Is it definetaly a java enabled server?

kwwellsAuthor Commented:

Yes the server is java enabled.  Servlets are installed for our domain.  JSP is definetly working.

The jsp we are using to test this is called jsptest.jsp which is a very simple jsp that will tell you if tomcat is working properly.

If tomcat  is working then the Request Method:  will print GET   and the Servlet path: will print /training/jsptest.jsp

If jsp is not working then these values will be blank.

This is the code.

html><head><title>Test JSP page</title></head><body bgcolor=white>

<table border="0"><tr><td><h1>Sample Application JSP Page</h1>
This is the output of a JSP page that is part of the Hello, World application.
It displays several useful values from the requestwe are currently processing.</td></tr>

<table border="0" border="100%"><tr>
<th align="right">Request Method:</th>
<td align="left"><%= request.getMethod() %></td></tr><tr>
<th align="right">Servlet Path:</th>
<td align="left"><%= request.getServletPath() %></td></tr></table></body></html>

Hi, Ive been checking your URLs above and it seems to be working, Is this problem resolved?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kwwellsAuthor Commented:

I figured it out.

I added the following to the httpd.conf for the subdomain and it worked

<IfModule mod_jk.c>
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /servlets/* ajp13

thanks fo the help

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.