Tuesday, December 21, 2010

OCPJP preps resources and links

http://www.whizlabs.com/scjp/scjp.html

http://scjptest.com/

http://www.coderanch.com/forums
http://www.coderanch.com/how-to/java/SCJP-FAQ#writeOn
http://www.coderanch.com/how-to/java/ScjpMockTests
http://www.coderanch.com/forums/f-24/java-programmer-SCJP
http://www.javachamp.com/public/bookshelf.xhtml

http://www.pass4sure.com/310-065.html

http://www.javacertificationexams.com/scjp-mock-exams.php


Books:
Sybex - Richard F. Raposa - SCJP Sun Certified Programmer for Java Platform, SE6

wicket + unit testing

https://cwiki.apache.org/WICKET/unit-test.html

https://cwiki.apache.org/WICKET/testing-pages.html

http://paulszulc.wordpress.com/category/wicket/

http://www.devx.com/Java/Article/35620/1954

http://apache-wicket.1842946.n4.nabble.com/how-to-pass-initial-request-parameters-with-WicketTester-td3023595.html

http://www.mail-archive.com/users@wicket.apache.org/msg02958.html

http://mail-archives.apache.org/mod_mbox/wicket-users/201011.mbox/%3C6AE6F5755F903843B12F4EC91377888D014115FF2D@ba-srv-exchange%3E

Monday, December 20, 2010

JDBC Connection Pool org.apache.tomcat.jdbc.pool

Injecting JNDI datasources for JUnit Tests outside of a container:
http://blogs.sun.com/randystuph/entry/injecting_jndi_datasources_for_junit

http://ascendant76.blogspot.com/2010/02/upcoming-jdbc-pool.html


http://people.apache.org/~fhanik/tomcat/jdbc-pool.html

Wednesday, December 15, 2010

wicket - bookmarkable pages

https://cwiki.apache.org/WICKET/bookmarkable-pages-and-links.html

http://www.javalobby.org/java/forums/t61556.html

http://www.mkyong.com/wicket/how-do-change-wicket-url-bookmarkablepage-structure-url-mounting/

moving to the cloud ebook

http://mkyong.tradepub.com/free/w_goog20/

Friday, December 10, 2010

notes on fop migration till fop 1.0

besides fop.jar needed libs:
xmlgraphics-commons-1.4.jar (because of MimeConstants.PDF)
commons-io-1.3.1.jar

other exceptions because of the changed implementation:
Element "fo:page-sequence-master" is missing required property "master-name"!

javax.xml.transform.TransformerException: org.xml.sax.SAXException: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs. root (http://www.w3.org/1999/XSL/Format) -> solved by
<fo:table table-layout="fixed" width="100%" border-collapse="separate">
and removing any empty table cells - using number-columns-spanned property of table-cell instead

design tools
1) http://www.ecrion.com/Products/XFDesigner/Overview.aspx - great tool
2) http://www.java4less.com/fopdesigner/fodesigner.php - I didn't manage to do anything meaningful with the trial version

Thursday, December 9, 2010

links on hibernate migration

http://community.jboss.org/wiki/HibernateCoreMigrationGuide30

http://community.jboss.org/wiki/HibernateCoreMigrationGuide31

http://community.jboss.org/wiki/HibernateCoreMigrationGuide32

http://community.jboss.org/wiki/HibernateCoreMigrationGuide33

http://community.jboss.org/wiki/HibernateCoreMigrationGuide36

Wednesday, December 1, 2010

notes on struts2

1) passing parameters to an action
--- in struts.xml
<action name="login" class="at.kds.epb5.epbback.action.LoginAction" method="execute">
<result name="success" type="redirectAction">
<param name="actionName">list</param>
<param name="stickerBundleStatus">1</param>
</result>
<result name="input">/login.jsp</result>
<result name="error">/login.jsp</result>
</action>
since the default stack is used, there is no need to specify an interceptor

--- Action bean class has to implement ParameterAware interface and hence to implement its setParameters method
e.g.
@Override
public void setParameters(Map parameters) {
try {
if ( parameters == null ) return;
String[] tmp = (String[])parameters.get("stickerBundleStatus");
if(tmp != null && tmp[0] != null
) {
stickerBundleStatus = Integer.valueOf(tmp[0]);
}
} catch (Exception ex) {
stickerBundleStatus = StickerBundle.STATUS_OPEN;
}

}


2) Parameters saved to the session
the action bean has to implement SessionAware interface and its method setSession()
e.g.
Map session = null;

@Override
public void setSession(Map session) {
this.session = session;
}
and when needed to use session.put() and session.get() methods

3) Preparable interface - with the default stack when the action bean implements Prepare interface, prepare() and prepareXXX() are called before XXX() action method