tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Astghik <mkrtch....@mail.ru>
Subject Re: DB connection error and broken images while changing webapp context path
Date Fri, 13 Aug 2010 12:10:51 GMT

And to create virtual host and to set my webapp as root dir. I've done both
of them. But now I have db access problems and images on site don't display.


Estanislao Gonzalez-2 wrote:
> 
> Hi Astghik,
> 
> I don't really have a clue on your problem as I think you are creating a 
> virtual host within your tomcat installation.
> 
> What I do when I want to have myapp at the root directory of server (so 
> you access it with http://myip:8080) is to install your application in 
> webapps/ROOT instead of webaps/myapp.
> 
> But maybe you wanted to achieve something else... In any case I think 
> you should check your images are being properly accessed (use firebug or 
> something alike) and see if the path being resolved for them make sense 
> (note you have set www.myip.com as host pointing to myapp, localhost 
> won't work as expected as it still points at webapps)
> 
> Hope this helps... a little mabe :-)
> 
> Cheers,
> Estani
> 
> Astghik wrote:
>> Hello All.
>>
>> I have Apache Tomcat 6 server running on Ubuntu 9.10. . I've changed my
>> application context path http://myip:8080/myapp to http://myip:8080 by
>> making changes in server.xml.
>>
>> <Engine name="Catalina" defaultHost="localhost">
>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>> resourceName="UserDatabase"/>
>> <Host name="localhost" appBase="webapps" unpackWARs="true"
>> autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>> <Context path="" docBase="myapp" debug="0"/>
>> </Host>
>> <Host name="www.myip.com" appBase="/var/lib/tomcat6/webapps">
>> <Context path="" docBase="myapp"/>
>> </Host>
>> </Engine>
>>
>> But I got another problem, all images (there are in
>> /var/lib/tomcat6/webapps/myapp/img dir) are broken and "An error
>> occurred:
>> org.springframework.dao.DataAccessResourceFailureE xception: could not
>> execute query; nested exception is
>> org.hibernate.exception.JDBCConnectionException: could not execute query"
>> exception is throwing.
>>
>> How to fix those problems?
>>
>> Regards,
>> Astghik
>>   
> 
> 
> -- 
> Estanislao Gonzalez
> 
> Max-Planck-Institut für Meteorologie (MPI-M)
> Deutsches Klimarechenzentrum (DKRZ) - German Climate Computing Centre
> Room 108 - Bundesstrasse 45a, D-20146 Hamburg, Germany
> 
> Phone:   +49 (40) 46 00 94-126
> E-Mail:  estanislao.gonzalez@zmaw.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/DB-connection-error-and-broken-images-while-changing-webapp-context-path-tp29427611p29428028.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message