Spring mvc test support in 3.1

http://rstoyanchev.github.com/spring-31-and-mvc-test/#1

https://github.com/SpringSource/spring-test-mvc/blob/master/src/test/java/org/springframework/test/web/server/samples/context/TestContextTests.java

https://github.com/SpringSource/spring-test-mvc

 

samples:

https://github.com/SpringSource/spring-test-mvc/tree/master/src/test/java/org/springframework/test/web/server/samples

Posted in junit, Spring Framework | Leave a comment

Websphere resource(js, css, images) loading problem and solution

There is one mapping in websphere, this mapping fetches js, css, images from different port like 60001, and normal jsp are fetched from normal port like 8000.

There is one resource fetcher plugin inside websphere that does this mapping task.

For mapping to 60001 port you need to do these steps in websphere admin console.

1. Log in to “Admin Console”.
2. Click on “Environment” from the left navigation menu.
3. Click on “Update global Web server plug-in configuration”.
4. Click on Ok.

On click of OK button this plugin will be re-run and it will map your application resources to 60001 port number.

 

| Leave a comment

java best practices

Posted in java | Leave a comment

Java formatters best practices

Posted in java | Leave a comment

JNDI resource configuration in tomcat

JNDI datasource with Tomcat 6.0.32 that worked for me :

Click here for configuration

| Leave a comment

a good spring mvc tutorial link

http://maestric.com/doc/java/spring

Posted in Spring Framework | Leave a comment

How to include java source files in the war file using maven2?

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.1</version>
	<configuration>
		<webResources>
			<resource>
				<directory>src/main/java</directory>
				<targetPath>WEB-INF/classes</targetPath>
				<includes>
					<include>**/*.java</include>
				</includes>
			</resource>
			<resource>
				<directory>src/test/java</directory>
				<targetPath>WEB-INF/classes</targetPath>
				<includes>
					<include>**/*.java</include>
				</includes>
				</resource>
		</webResources>
	</configuration>
</plugin>

Posted in Maven | Leave a comment