How to make unit test of servlets which uses jndi for lookup of datasource (JDBC) ?
+1
A:
Setup the JNDI context in your @Before
(or @BeforeClass
) methods, by manually creating the datasource.
(The answer is only guiding, but I can't provide anything concrete, since you haven't provided anything concrete)
Bozho
2010-01-06 07:32:27
A:
If the problem is that you need JNDI then there is a simple standalone implementation which Can be used in applications and Unit tests scenarios.
Thorbjørn Ravn Andersen
2010-01-06 08:09:12