jack wenttohill

Greenhorn
+ Follow
since Apr 26, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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
http://www.innovation.ch/java/java_compile.html

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.

Thanks
Jack


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
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2</version>
</dependency>

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.

http://arsenalist.com/2007/06/18/unit-testing-struts-2-actions-spring-junit/

Thanks
Jack
13 years ago


Then in servlet use


And please study the scope of jsp/servlet you will better understand more.
13 years ago
JSP
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
http://java.sun.com/javase/downloads/index.jsp

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
Prompt:> export PATH=$PATH:/JDK_INSTALLED DIR_HOME_PATH/bin
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(..)

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