IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: I'm struggling with this Java lark...
1) I'm personally a big fan of Use What Works. In the IDE realm, for me, this is NetBeans. I haven't tried IntelliJ in probably 8-10 years, so I have nothing to say there. I can say, however, that the Uber-IDE-of-Everyone, Eclipse, simply doesn't work for me. I could go into detail, but let's just leave it as "it's not for me."

2) If you hot-swap your .war file often enough, Tomcat will run out of memory (OutOfMemoryException in the logs), and you'll need to restart.

3) Sometimes if you hot-swap, it won't always pick up the changes (as you've seen.) To get around this, in the past, I've simply stopped and restarted Tomcat in between each build (of, say, JIWT.) You might also want to consider completely removing the temp/ and work/ directories. There's no harm in doing so, and it will force a recompilation of all JSP pages, and get a new working copy of your Java classes.

4) Yep, Tomcat will sometimes lose the context.xml file. Make a backup, and a quickie /home/static/bin/moveback type of command to copy it from its backup spot to where it goes.

5) Consider not doing a full .war-file deployment each time. If it's possible, you might be able to just run a "compile" step, and with the deployment of a warname.xml file (see below) inside your $TOMCAT_HOME/conf/Catalina/localhost directory, you can get your process down to "edit files, mvn compile, reload in browser" (uber-thanks to AdminiScott for reminding me how to do this in Tomcat.) Your warname.xml file should look something like:

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/Users/mike/Work/jiwt/trunk/build" path="/forums" reloadable="true">
</Context>


Thus, I can go to http://localhost/forums and pull up JIWT locally.
-Mike

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, 1759 Historical Review of Pennsylvania
New Well at least I'm heading in the same direction...
And I was about 1-1/2 steps away from that trick on #5. I was just starting to get frustrated at doing the whole war file generation and was wondering if I could get Tomcat to look at before Maven bundles it all up... Or even after IntelliJ does it's own build.

I'm only using IntelliJ because that's what everyone else uses for Java. And we've got licenses. I'm tempted to go back to vi (which I use for the older PHP app) but I still need the raw Java help (I like the auto-import, for instance). I coudn't make Eclipse see an existing SVN checkout, but that was before I started learning Java. I hadn't heard of NetBeans.

You'd think Tomcat's predilection to throw away a configuration file that it didn't even create would be a reported bug. (Now that might be entertaining.) Glad I'm not the only one struck by that one!

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New Netbeans... (not exactly answering any questions here)
I started out with Netbeans for Java IDE (~2000). One session on the uber-IDE and I never went back. It may have changed a lot since then, but at the time, Netbeans took longer to start up than it took Eclipse to launch, compile and execute a program... (and it had that funky Metal Swing UI where Eclipse used SWT. Ick...)
     I'm struggling with this Java lark... - (static) - (4)
         welcome to java :-) -NT - (boxley)
         Re: I'm struggling with this Java lark... - (mvitale) - (2)
             Well at least I'm heading in the same direction... - (static) - (1)
                 Netbeans... (not exactly answering any questions here) - (scoenye)

Nature has its own cure for stupidity.
42 ms