Tuesday, May 7, 2013
W3C DOM Parser
Saturday, May 4, 2013
Struts2 Application developemnt with Jquery
Struts2 Application developemnt with Jquery
It is very easy to integrate Struts2 applicaiton with Jqery. There are many existing solution that can be used to solve it. No need to start from scratch.
http://struts.jgeppert.com/struts2-jquery-showcase
Which is popular among the jquery plugin. This site is having nice tutorial.
Other Sites :
http://malsup.com/jquery/form/#fields
http://struts.jgeppert.com is also having struts2-bootstap plugin, which contains bootstarp theme that can be integrated with struts2. Instead of struts2 default theme. We can use bootstarp theme.
--
Thank you.
Regards,
Kaleeswaran.S
It is very easy to integrate Struts2 applicaiton with Jqery. There are many existing solution that can be used to solve it. No need to start from scratch.
http://struts.jgeppert.com/struts2-jquery-showcase
Which is popular among the jquery plugin. This site is having nice tutorial.
Other Sites :
http://malsup.com/jquery/form/#fields
http://struts.jgeppert.com is also having struts2-bootstap plugin, which contains bootstarp theme that can be integrated with struts2. Instead of struts2 default theme. We can use bootstarp theme.
--
Thank you.
Regards,
Kaleeswaran.S
Thursday, April 18, 2013
Send JSON data to struts2
Send JSON data to struts2

I found a nice article which points out how the struts2 receives json data from UI and returns the json data as response.
We need to add a dependency in pom.xml
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${struts2-json-plugin.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>${struts2-json-plugin.version}</version>
</dependency>
In action class just add the interceptor which maps the json data to the actions class.
<action name="jsonTest" class="com.blah.action.JsonTestAction"> <interceptor-ref name="json"> <param name="contentType">application/json</param> </interceptor-ref> <result type="json"/> </action>
Json data can be returned from strust2 action to View in the form of
<action name="jsonTest" method="jsonTest" class="com.blah.action.JsonTestAction">
<result type="json"/>
</action>
<action name="jsonTest" method="jsonTest" class="com.blah.action.JsonTestAction">
<result type="json"/>
</action>
Happy Coding.
--
Thank you.
Regards,
Kaleeswaran.S
Thank you.
Regards,
Kaleeswaran.S
Wednesday, April 17, 2013
Confluence Publisher Plugin with Jenkins
Confluence Publisher Plugin with Jenkins
I integrated confluence publisher plugin with Jenkins. Here are the steps, it may be helpful to some one.
I followed the doxumentation at
https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin
1) First I installed the confluence publisher plugin in jenkins. https://wiki.jenkins-ci.org/display/JENKINS/Confluence+Publisher+Plugin
Tuesday, April 16, 2013
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure on Mysql, MAMP and MAC OS
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure on Mysql, MAMP and MAC OS
<!-- MySQL database driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
</dependency>
<!-- MySQL database driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.24</version>
</dependency>
public void testTheApp() throws Exception {
Connection conn = null;
try {
// WARNING: Could not obtain connection metadata
// java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:
System.out.println("AppTest started.... ");
Class.forName("com.mysql.jdbc.Driver");
Properties connectionProperties = new Properties();
connectionProperties.put("user", "java");
connectionProperties.put("password", "java");
conn = DriverManager.getConnection("jdbc:mysql://0.0.0.0:8889/java", connectionProperties);
System.out.println("Connection success ...... ");
} catch (Exception e) {
e.printStackTrace();
} finally
{
if (conn != null)
{
try
{
conn.close ();
System.out.println ("Database connection terminated");
}
catch (Exception e) { /* ignore close errors */ }
}
}
}
jdbc:mysql://0.0.0.0:8889/java (Works)jdbc:mysql://172.16.23.59:8889/java (Works)
jdbc:mysql://172.0.0.1:8889/java (Wont work)
Happy Coding :)
Subscribe to:
Posts (Atom)