cannot execute a jsp from a subdomain

Hello

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 http://training.idguild.com/jsptest.jsp.

If I access the jsp from this url it works http://idguild.com/training/jsptest.jsp

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

Ken


kwwellsAsked:
Who is Participating?
 
colr__Commented:
Hi, Ive been checking your URLs above and it seems to be working, Is this problem resolved?

colr__
0
 
Ryan ChongCommented:
I think you need to check for DNS server instead, as you need to add a subdomain entry that points training.idguild.com to your Server's IP.
0
 
kwwellsAuthor Commented:
Hi

DNS resolves correctly to http://training.idguild.com/

If I access the jsp from this url http://training.idguild.com/jsptest.jsp  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.

Ken



0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
colr__Commented:
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.

colr__
0
 
kwwellsAuthor Commented:
Hello

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.

http://training.idguild.com/jsptest.jsp 

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.

http://idguild.com/training/jsptest.jsp

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

Regards

Ken
0
 
colr__Commented:
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?

colr__
0
 
kwwellsAuthor Commented:
Hello

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>

<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>


Ken
0
 
kwwellsAuthor Commented:
Hello

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
</IfModule>

thanks fo the help

ken
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.