Previously, i was working with an web application which allows me to upload a certificate into a keystore. Unfortunately, it only accept certificate in Base64/PEM format but not binary. So i have to convert the certificate into Base64/PEM and this could be done by Portecle.
Portecle is a very useful Java program with User Interface which make keystore and certificate management a piece of cake. The following screenshots show you how to get the Base64/PEM encoding from a binary certificate. Continue reading Portecle – Keystore and Certification Manager→
In UILabel, there is an adjustsFontSizeToFitWidth property which will automatically adjust the text font size to fit the UILabel width.
UILabel *aLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 20.0)];
aLabel.adjustsFontSizetoWidth = YES; // This is a must
aLabel.minimumFontSize = 8.0f;
aLabel.numberOfLines = 1; // This is a must too =.=
Normally, the maven-jetty-plugin should be configured in the pom of your Maven webapp project/module. But the project i am working is a legacy Java project with many modules and the webapp module depends on others. so i cannot simply start it due to the build sequence.
If you are a Tapestry user, the pom.xml in the above article may not work as the webapp cannot be started in the Embedded Jetty (404 Not Found). I am not sure the reason behind but i find a work around to solve the problem. The tricky thing is in the Embedded Jetty configuration in the cargo2-maven-plugin. Continue reading Run Selenium in Tapestry Maven Project→
In this article, i will show you how to integrate the Selenium tests into a Maven webapp project using the selenium-maven-plugin and cargo-maven2-plugin.
In this example, i used JUnit as the testing framework. There is no problem if you use TestNG to replace JUnit. This example is a simple Java webapp Maven project which only shows a simple html page (index.jsp). During the build, a Selenium Server is started with the webapp deployed in the Embedded Jetty. It then runs an Unit Test (Selenium Test) during the Maven integration-test life cycle. Here comes to the code. Continue reading Selenium – Integrate the Selenium Tests into Maven Build→