from http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
All interactive programs provide two basic functions: obtaining user input and displaying the results. Web applications implement this behavior using two HTTP methods: POST and GET respectively. This simple protocol gets broken when application returns web page in response to POST request. Peculiarities of POST method combined with idiosyncrasies of different [...]
from http://www.scottmurphy.info/spring_framework_annotation_based_controller_interceptors
In order to use interceptors with Annotation-based controllers, you need to configure the DefaultAnnotationHandlerMapping used by the Spring container.
<bean id=”annotationMapper” class=”org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping”> <property name=”interceptors”> <list> <ref bean=”myInterceptor1″/> <ref bean=”myInterceptor2″/> <ref bean=”myInterceptor3″/> </list> </property> </bean> URL Specific Interceptors for Annotation-based controllers
Unfortunately, using the DefaultAnnotationHandlerMapping for interceptors configures the interceptors for all defined [...]
from http://www.mularien.com/blog/2008/04/24/how-to-reference-and-use-jstl-in-your-web-application/
As a frequent contributor to the Spring Framework user forums, I have noticed a common trend among people new to Spring MVC – they really don’t understand how to use JSTL and EL in their Spring-driven JSPs.
Although Spring MVC supports flexibility in choosing a view technology, in my [back [...]
It could not just simply remove the session attribute by using invocation removeAttribute.
You have to remove it by setting it to null.
For no properties:
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }
For properties:
public enum Planet { MERCURY (3.303e+23, 2.4397e6), VENUS (4.869e+24, 6.0518e6), EARTH (5.976e+24, 6.37814e6), MARS (6.421e+23, 3.3972e6), JUPITER (1.9e+27, 7.1492e7), SATURN (5.688e+26, 6.0268e7), URANUS (8.686e+25, 2.5559e7), NEPTUNE (1.024e+26, 2.4746e7); private final double mass; // in kilograms private final double [...]
from http://ondra.zizka.cz/stranky/programovani/java/index.texy
When working with MySQL over JDBC and the driver encounters a zero DATE, TIME, or DATETIME value (that is, e.g, ‚0000–00–00‘ for DATE), an exception is thrown:
java.sql.SQLException: Cannot convert value ’0000-00-00 00:00:00′ from column 4 to TIMESTAMP.
In this case, using SQL commands like
SET GLOBAL sql_mode = ‘NO_ZERO_DATE’;
does [...]
#
# for servlet
#
You can find the error page from web.xml as following:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/WEB-INF/view/error/uncaughtException.jsp</location>
</error-page>
#
# for spring
#
You can find the error page handler in applicationContext.xml
<bean id=”defaultExceptionHandlerTemplate” class=”org.springframework.web.servlet.handler.SimpleMappingExceptionResolver” abstract=”true”>
[...]
To install and configure SSL support on Tomcat 5, you need to follow these simple steps. For more information, read the rest of this HOW-TO.
Create a certificate keystore by executing the following command:Windows: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
Unix:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
and specify a password value of “changeit”. Uncomment [...]
from jboss wiki
OutOfMemoryExceptions
This section attempts to cover some of the most common reasons why you may see an OutOfMemoryError from your JBoss application server. Interestingly, there are several cases where the JVM may report an OutOfMemoryError even if it is not really out of [...]
-
Articles
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
-
Meta