NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Run Tomcat from your USB drive! Rashan Shrestha shows how to organize everything you need, including Java, so you can click & run Tomcat from your keychain.
Roshan I have a mildy modified version of jsmooth. Two big changes is the app config is in a separate file that the exe reads on startup. E.g. tomcat.exe looks for tomcat.conf. This allows one to switch debugging without having to recompile the exe. The other change (which is optional) is it removes the single exe into a dll and an exe. The reason for this is I have 45 jsmooth exe's so sharing a dll is much better use of resources (dll is 350K and the exe is 6K)...
Anyway let me know if you are interested. I have been waiting to hear back from the JSmooth developer to see if he wants my "new" skeleton or not. If not I will likely put it up on sourceforge on its own.
HI,
i am really impressed with your tomcat on the go. I am trying to get my application in tomcat to work from a cd-rom, and I find your way of starting up the engine and going to the openingpage the most elegant I've seen.
With my limited java knowledge I've managed to change the log dir to the temp dir on the c drive, but to get it to work properly I would also need to change tomcat's work dir and the temp dir to that same temp dir on the c, so tomcat can write all the temporary files it needs to run on the hard drive instead of trying to write them on the Cd itself.
could you help me with this?
thanks in advance.
In brief, to specify the "
work
" dir, add the "
workDir
" attribute to the "
Host
" element:
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false" workDir="c:\temp">
To specify the "
log
" directory, add the full path in the "
directory
" attribute:
Hi All....
I have a question....
You have to put together jre and tomcat in order to use JSP and servlet on fly.....
The question is: I used this tool with a version of tomcat that doesn't provide tools.jar....(the embedded Tomcat for example).
Therefore I'm not able to compile JSP and to use the tool unless I have JDK installed on my machine (javac is needed to compile JSP)...
The embedded tomcat doesn't provide tools.jar....
I believe you can use the compiler that is included with Eclipse - I do not have much detail, you will have to read the release notes of Tomcat. You can always use the free Jikes compiler, instead of javacc.
Thanks for the article, this solution works like a charm (even for a Java-illiterate like me)!
Since I use some applications that come shipped with their own Jetty server, I wonder if your approach is portable to the Jetty server. How difficult would it be to 'Take your Jetty on the road'?
I don't think MySql would be suitable, unless the host computer happens to be running MySql. The reason is that mysql is not an "embedded" database, but requires a server to be running.
I do not have experience with Jetty, but I believe Jetty was designed to be embedable, and so would be even easier than Tomcat to embed it into your application.
I have managed to get around this, and have it running entirely from a CD with an in-memory pure java database. Essentially just put the cd in and it runs entirely from it including runtime, tomcat and database server. All I needed to do was to precompile the jsp's, and just wrote a batch file to do this, prior to burning to the CD
Take Your Tomcat on the Road
At 10:57 AM on May 9, 2005, Matthew Schmidt wrote:
Fresh Jobs for Developers Post a job opportunity
Read the full article now!
16 replies so far (
Post your own)
Re: Take Your Tomcat on the Road
Roshan I have a mildy modified version of jsmooth. Two big changes is the app config is in a separate file that the exe reads on startup. E.g. tomcat.exe looks for tomcat.conf. This allows one to switch debugging without having to recompile the exe. The other change (which is optional) is it removes the single exe into a dll and an exe. The reason for this is I have 45 jsmooth exe's so sharing a dll is much better use of resources (dll is 350K and the exe is 6K)...Anyway let me know if you are interested. I have been waiting to hear back from the JSmooth developer to see if he wants my "new" skeleton or not. If not I will likely put it up on sourceforge on its own.
cheers,
Glen
Re: Take Your Tomcat on the Road
Your resources link (src.zip) don't work. Regards,Re: Take Your Tomcat on the Road
HI,i am really impressed with your tomcat on the go. I am trying to get my application in tomcat to work from a cd-rom, and I find your way of starting up the engine and going to the openingpage the most elegant I've seen.
With my limited java knowledge I've managed to change the log dir to the temp dir on the c drive, but to get it to work properly I would also need to change tomcat's work dir and the temp dir to that same temp dir on the c, so tomcat can write all the temporary files it needs to run on the hard drive instead of trying to write them on the Cd itself.
could you help me with this?
thanks in advance.
vincent
Re: Take Your Tomcat on the Road
I believe you can specify these in the " server.xml " under " conf ". Read the documentation herehttp://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/index.html
In brief, to specify the " work " dir, add the " workDir " attribute to the " Host " element:
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false" workDir="c:\temp">
To specify the " log " directory, add the full path in the " directory " attribute:
<Logger className="org.apache.catalina.logger.FileLogger"
directory="c:\temp\logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
There may be a hierarchy of loggers, so you may need to specify the directory in all of them.
Roshan
Re: Take Your Tomcat on the Road
Hi All....I have a question....
You have to put together jre and tomcat in order to use JSP and servlet on fly.....
The question is: I used this tool with a version of tomcat that doesn't provide tools.jar....(the embedded Tomcat for example).
Therefore I'm not able to compile JSP and to use the tool unless I have JDK installed on my machine (javac is needed to compile JSP)...
The embedded tomcat doesn't provide tools.jar....
Is it right??? Any workaround for this problem???
Bye
Re: Take Your Tomcat on the Road
I believe you can use the compiler that is included with Eclipse - I do not have much detail, you will have to read the release notes of Tomcat. You can always use the free Jikes compiler, instead of javacc.Re: Take Your Tomcat on the Road
hi there,i'm very interested in this topic.
would you discuss abit about using the database. I'm using mysql. how to include it in the system?
Re: Take Your Tomcat on the Road
Hi,Thanks for the article, this solution works like a charm (even for a Java-illiterate like me)!
Since I use some applications that come shipped with their own Jetty server, I wonder if your approach is portable to the Jetty server. How difficult would it be to 'Take your Jetty on the road'?
Thanks,
Ron Van den Branden
Re: Take Your Tomcat on the Road
I don't think MySql would be suitable, unless the host computer happens to be running MySql. The reason is that mysql is not an "embedded" database, but requires a server to be running.Re: Take Your Tomcat on the Road
I do not have experience with Jetty, but I believe Jetty was designed to be embedable, and so would be even easier than Tomcat to embed it into your application.Re: Take Your Tomcat on the Road
Great. Worked first time..cheers.Re: Take Your Tomcat on the Road
this is excellent, very useful. Is there a way of getting around the requirement for Tomcat needing write access to the hard drive?Regards
Darren
Re: Take Your Tomcat on the Road
Yes, it's very useful to get around the requirement for Tomcat needing write access to the hard drive.Waiting the answer.
Thanks.
Java Swing
Re: Take Your Tomcat on the Road
I have managed to get around this, and have it running entirely from a CD with an in-memory pure java database. Essentially just put the cd in and it runs entirely from it including runtime, tomcat and database server. All I needed to do was to precompile the jsp's, and just wrote a batch file to do this, prior to burning to the CDRegards
Darren