Hello,
I am running my Java Servlet based application on 64bit Amazon Linux
2014.03 v1.0.3 running Tomcat 7 Java 7.
The webpage is displaying code rather than content. The code shows my
HTML has sent content type ="text/html". When I do function f12 click on
Network and the domain, the left panel shows Content Type="text/plain".
This is happening on all browsers that I tried with.
I have been running this application on my local machine with Window and
Apache Tomcat 7.0.50 for a long time and haven't had this problem ever.
AWS asked me to include the attached config in .ebextensions. The
problem got fixed for a few days, then it reverted back to display as
"text/plain".
Then AWS asked me to include the following mime-mapping lines in my web.xml:
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>body</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
this worked for a few days, then it reverted back to display as "text/plain"
Can someone have an explanation as to why this is happening and suggest
a solution for this please.
Thanks.
container_commands:
00replace_plain:
command: sed -i '/DefaultType text\/plain/c\DefaultType text\/html'
/etc/httpd/conf/httpd.conf
01restart_httpd:
command: /etc/init.d/httpd restart
files:
"/opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf":
content: |
/tmp/sample-app*
"/opt/elasticbeanstalk/tasks/publishlogs.d/01-sample-app.conf":
content: |
/tmp/sample-app*gz
"/opt/elasticbeanstalk/tasks/systemtaillogs.d/01-sample-app.conf":
content: |
/tmp/sample-app.log
"/opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf":
content: |
/tmp/sample-app.log
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org