0

I have launched a new site www.example.com (real name hidden). i had upload basic web project which will have a index.html file, css, js, images and WEB-INF folder with web.xml file inside.

I named project as simpleProject, i placed the project folder in /opt/myapps/, I did necessary configurations like
1. adding IP & domainname in /etc/hosts file
2. adding <HOST>...</HOST> in /etc/tomcat7/server.xml file and
3. placed ROOT.xml file with one line <context docBase="/opt/myapps/simpleProject" path="" ......... /> in /var/lib/tomcat7/conf/Catalina/www.example.com/.

when i hit www.example.com the index.html page is getting served but the css and images defined in the page is not coming, throwing 404 error for those. I used even the context path like "http://www.example.com/css/style.css".

TylerH
  • 20,799
  • 66
  • 75
  • 101
user2679721
  • 49
  • 3
  • 7
  • check the server error log and maybe it will say where it's trying to find the missing files – Joe T Sep 21 '13 at 14:43
  • where could i find the logs, it is a basic web application i didn't configured log4j logger to it. Could you plz help me in finding the logging files – user2679721 Sep 21 '13 at 16:18
  • you should look at the catalina.out files. As for where to find it, that depends on how tomcat got installed. I would simply search for all files named catalina*out – The Governor Sep 21 '13 at 16:45
  • Hi, i checked into the logs. There is no error shown. I think there could be two cases, one is improper context definitions and second could be firewall. In root.xml i had defined context only till the root structure . will this server for css and js files too? – user2679721 Sep 21 '13 at 18:27
  • Issue is fixed, the reason is file access permissions. i changed the chmod to 777 to all static files. It is working good now. Thanks alot everyone – user2679721 Sep 21 '13 at 19:10

0 Answers0