db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanczak Group <jus...@stanczakgroup.com>
Subject Re: Embedded in Servlet on Tomcat?
Date Fri, 21 Jul 2006 17:46:24 GMT
On mine I'm using Toplink and I set the connection string with absolute 
path.

Paul J DeCoursey wrote:
> Stanczak Group wrote:
>> How does one get Derby embedded in a servlet under Tomcat. In my 
>> development environment I'm using Netbeans and Tomcat. Tomcat install 
>> is under root so I can't write to is, just my web modules 
>> directories. I can connect to a path with Netbeans's database tool, 
>> but when I launch the app on Tomcat I get errors that it can't create 
>> files like createDD.jdbc and derby.log. I'm guessing this is because 
>> Derby is showing it's home as the root of the Tomcat server.  The 
>> question is why and how can I fix this? I have an absolute path set, 
>> but it still does it. Shouldn't it write everything to that path and 
>> not just start writing to where ever it decides home is?
>>
> I have encountered similar issues.  I also develop with Tomcat and 
> Netbeans. I do not have issues with absolute paths however.  I let the 
> servlet get me the path however, on the servlet init I get the 
> ServletContext and call getRealPath("WEB-INF") to get my base 
> directory for my database. I have init-params setup as well so I can 
> reset this to a directory outside of the servlet context altogether.  
> Hope this gets you set in the right direction.
>
> Paul
>
>

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke

..________...............__.................
./  _____/..____..._____/..|_..____...____....
/...\..____/.__.\./....\...__\/.._.\./._..\....
\....\_\..\..___/|...|..\..|.(..<_>.|.<_>..)....
.\______../\___.._\__|../__|..\____/.\____/......
........\/.....\/.....\/..........................


Mime
View raw message