jack wenttohill

+ Follow
since Apr 26, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jack wenttohill

Its easy to do but difficult to maintain.

one applet handler

When you develop just think of a simple scenario:

Some body likes to compile and run a java file with infinity loop.
Or inside it using some Runtime.exec('System critical command'), how you are going to handle them.


13 years ago

This will solve your problem and use mouse listener to fire event on coord..
13 years ago
1. Out of Box - no container

if you are using Spring in your application you can use spring mock where you dont need a container it will mock every thing that requires to run an web application environment including dao layer.

if you are using maven you can use this in pom.xml to download mock

And for datasource initialization there another way to do it. Use apache DBCP
if you are using maven you can use this in pom.xml to download dbcp

And in your mock applicationContext.xml put this

2. Using container
Use cactus instead of Junit
cactus is just superset of junit.

One more thing to give you a very clear picture follow the blog of The Arsenalist, very nice article. I adapted his ideas when i was developing junit test case for Struts2 + spring base application.


13 years ago

Then in servlet use

And please study the scope of jsp/servlet you will better understand more.
13 years ago
Lots people get confused with this.

Windows OS Shipped with default JRE not JDK
If your system does not have JRE, Any site which has applet can prompt you to download JRE automatically to your system. And you might have JRE in that scenario.

JRE: Runtime environment.
JDK: Development kit

So you can not develop java application without a JDK, what it names speaks a lot.

So in JRE you will not find java compiler which is javac.

Do not confuse yourself. Java is an open standard as per the rule every OS must have JRE.

So do not consider using JRE you can develop java program. You can run though, but to develop you must download JDK from sun site

And after download and install point your path till bin directory.

Simply for Windows
Prompt:> set path=%path%;JDK_INSTALLED DIR_HOME_PATH/bin;
e.g, set path=%path%;C:\Program Files\Java\jdk1.6.0_06\bin;

Simply for Linux
e.g, export PATH=$PATH:/usr/java/jdk1.6.0_06/bin

13 years ago
13 years ago

I know you get it using doGet, but still my curiosity is the URL patern in form action tag, it shouldn't contains a slash /
The code above will work fine for doPost(..)

13 years ago
Message[] unreadMessages = folder.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false));
13 years ago