I have spring contoller, also apache + mod_jk + tomcat. So after making an requesto to my controller in the response I am getting jsp source code
mod_jk config:
<VirtualHost <some ip>:8000>
ServerName <host>
ServerAlias <alias>
DocumentRoot <path>
JkMountCopy On
</VirtualHost>
JkWorkersFile <path>/workers.properties
JkMount /app* worker1
workers.properties
worker.list=worker1
worker.worker1.port=18001
worker.worker1.secret=some_secret
worker.worker1.host=localhost
How I understand apache sucessefully receives request => mod_jk redirects it to spring controller. Question is what happens next? Does spring converts response body to the jsp page, and forward it to apache? How can i fix this issue?
Here is a working configuration, maybe you can find anyting thats missing in yours:
httpd.conf (Mod_jk module must be activated in httpd.conf):
LoadModule jk_module modules/mod_jk.so
#### JK CONFIG
JkWorkersFile D:\Server\jk\workers.properties
JkLogFile D:\Server\jk\mod_jk.log
JkShmFile D:\Server\jk\jk-runtime-status
JkLogLevel warning
JkMount /modjkstatus stats
workers.properties:
worker.list=stats,node1
worker.node1.type=ajp13
worker.node1.host=localhost
worker.node1.port=8009
#status information (optional)
worker.stats.type=status
Virtual Host Config
JkMount /myapp node1
JkMount /myapp/* node1
Restart Apache and check error.log and mod_jk.log