Posts

Showing posts from March, 2015

Call by value in JAVA

public class Test
{
    public void callByValue(int x)
    {
        x=100;
    }
    public static void main(String[] args)
    {
       int x=50;
        Test t = new Test();
        t.callByValue(x);
        System.out.println(x);
    }    
}

Output is: 50

In the above example, even though the value of X is 100, we are setting local variable as 50 and then calling the "callByValue()" method. So, it will reset the value of x from 100 to 50.

Thus the output is: 50

For more reference: http://www.studytonight.com/java/method-and-overloaded-method.php

SSMI Logo

Image
The logo design requirement came from my Friend Dharaneetharan who loves marathon for his friend Mr.Sankaranarayanan.

I thank them for such a great opportunity to show my creativity in the Match works industry.


About www.fiverr.com

Image
The website www.fiverr.com connects the Skilled person to the needed person. Anyone can be register in fiverr and they can showcase their existing works and also they can mention their charges.

The service finder can find the skilled person easily through fiverr.com.


Handling Snapshot error in ATG BCC

Image
If you face any error regarding Snapshot, copy the recent snapshot id and paste to the snapshot table.

Situation when you can apply is: "Deployed projects in queue for long time"

Query:
Select * from epub_PRJ_TG_SNSHT ORDER BY to_number(SNAPSHOT_ID) DESC

Goto: http://localhost:8180/dyn/admin and follow the following link

The detail information is in:
http://atgwebcommerce.blogspot.in/2013/07/how-to-resolve-snapshot-mismatch-error.html


Strategic Brand war between Housing.com and Commonfloor.com

Image
"LOOKUP" the tagline of Housing.com and which came up with good branding strategy last 10 days.

From the source (http://www.indiatimes.com/news/weird/these-brands-trolling-each-other-is-nothing-short-of-epic-231092.html), it is very clear that, there will be a tough competition between www.housing.com and www.commonfloor.com to capture the market.

Now, paint industry big boss Asian paint also taking advantage of the particular hoarding with the quote "Once you are done! call us".


Logo for the Technology Business

Image
The next generation organisation named "BILSN Technologies" comeup with new logo.


The old company comeup with new brand MAXBEN - Logo meaning

Image
I am so happy to design this logo for my friend Suresh Mahalingam to boost his paint business to the next level. The first step in his process is logo design.

He had a clear idea about his business, processes, pricing and target audience. I just collect all those information from him and created the logo with some appropriate meanings.

Check out the logo here


Game on www.tracknext.com

Image
The India based social media www.tracknext.com come up with new feature "Game Hub" where the user can play games.
Right now the following games are available:

Magic Well
Space War
Arrow Bow
Chain For Web


What is ANT in ATG?

Ant is a platform-independent scripting tool that lets you construct your build scripts in much the same fashion as the "make" tool in C or C++. You can use a large number of built-in tasks in Ant without any customization.

How to write shell script in linux?

Step: 1Open VI editor or GEDIT
Step: 2Copy paste the following lines in that file (example: filename-  myscript.sh)
#!/bin/bash # My first script echo "Hello World!"
Step: 3Change the permission
sudo chmod -R 777 myscript.sh
Step: 4Run the script
./myscript.sh

Print screen using Javascript

Image
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
html2canvas(document.body,{
onrendered:function(canvas){
document.body.appendChild(canvas);
}
});

The above code will take the printscreen of the webpage.


For real time example: http://html2canvas.hertzen.com/examples.html


How to create an array and display it using Expression Language in JSP?

<dsp:page>
<c:set var="alphabet" value="${fn:split('A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z', ',')}" scope="application" />
<c:forEach var="fruit" items="${alphabet}">
<c:out value="${fruit}" />
</c:forEach>
</dsp:page>


Output:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

How to send URL Parameter to Droplet to fetch data, in ATG?

URL is
http://<project>/blog/single.jsp?postid=20
Here postid is URL Parameter. We've to retrieve the post which id is 20.

Method #1: In JSP
<dsp:setvalue bean="/its/blog/DisplayBlogDroplet.postId" value="${param.postid}"/>

In DropletClass (JAVA)

private Integer postId;

public Integer getPostId() {
return postId;
}

public void setPostId(Integer postId) {
this.postId = postId;
}

public void service(DynamoHttpServletRequest req,
DynamoHttpServletResponse res) throws ServletException, IOException{
RepositoryView singlepostView = getBlogRepository().getView("post");
RqlStatement singlepostStatement = RqlStatement.parseRqlStatement("post_id = ?0");
Object singlePostParams[] =new Object[1];
singlePostParams[0]=new Integer(getPostId());

Method: #2 In JSP
<dsp:droplet name="/its/blog/DisplayBlogDroplet"> <dsp:param name="postIdParam" value="${param.postid}"/>
In DropletClass (JAVA)
public void service(DynamoHttpS…

Different patterns of Business card

Image
Designed different patterns of business cards for MAXBEN Paints


Mutable & Immutable Repositories

Image
Basic repository given by ATG is immutable means we cannot write or update on the repository items we can only read the properties.Thus to facilitate things operations like create , update , remove etc mutable repository is being used.


DSP Display value methods - ATG

Student_01.properties$class=<student class path>
name="Name of the student"

Display.jsp Method #1 Name: <dsp:valueof bean="Student_01.name"/><p>
Method #2 <dsp:getvalueof value="/samples/Student_01" var="student"> </dsp:getvalueof> Name: <dsp:valueof value="${student.name}">No Name</dsp:valueof>
Method #3<dsp:importbean bean="/samples/Student_01" var="student"/>
Name: <c:out value="${student.name}"/>

Output The output for the methods are same:

Name: Name of the student


DSP Import bean - ATG

Student_01.properties $class=<student class path>
name="Name of the student"

Display.jsp <dsp:importbean bean="/samples/Student_01" var="student"/>
My name is <c:out value="${student.name}"/>
Output is: My name is Name of the student
Explanation We can call the name parameter from properties file "name" parameter. To import all the bean values, use <dsp:importbean> tag, then store the bean to the local variable "student". Now we can access all the values through the local variable "student". Example: ${student.name}

Currency Formatting in ATG using FMT tag.

<fmt:formatNumber type="currency" maxFractionDigits="2" value="5000" />

The output will be:

$5,000.00

Where the build files are located in ATG?

Image
After build and deployment, the .ear file will be generated and posted to jboss server in the following location:

/opt/<dev_server>/jboss-eap-6.1/standalone/deployments/<your production folder>/


New feature Call to Action in Facebook page

Image
Facebook added a new "Call to Action" for Facebook pages.
Through this, the page admin can redirect to their website. Options in this features are:
1. Shop now
2. Book now
3. Contact us
4. Use app
5. Signup
6. Watch video



Dynamo Application Framework - ATG Module

Image
The Dynamo Application Framework sits on the top of our application server and supplies essential features to our application. It includes:

NucleusRepositoriesTag LibrariesDroplets and Form Handlers


The basic operation of Nucleus. - ATG

Image
Nucleus lets you assemble applications through simple configuration files that specify what components are used by the application, what parameters are used to initialize those components, and how those components hook up to each other.
Nucleus by itself provides no application-specific functions. The JavaBean components implement all of an application’s functionality. Nucleus is the mechanism that gives those components a place to live, and a way for those components to find each other.

What are EAR, JAR and WAR files in J2EE?

Image
In J2EE application modules are packaged as EAR, JAR and WAR based on their functionality JAR: (Java ARchieve) EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extenstion WAR: (Web application ARchive)Web modules which contains Servlet class files,JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war (web archive) extension EAR: (Enterprise ARchive)All above files (.jar and .war) are packaged as JAR file with .ear (enterprise archive) extension and deployed into Application Server.

FollowMe247.com Logo Creation

Image
The great product from Vatsana Technologies, www.followme247.com which was the great startup initialized in SRM University in the year 2013. I am so happy to say that, the logo for this startup created by me.

Created on: May,2013
Created by: #MuthuPandian

Vatsana Technologies logo

Image
I am so proud to be a part of Vatsana Technologies on logo creation. Its a startup company, started by SRM University, Chennai Students. It was a wonderful occasion while creating this logo.

Created on: April, 2013.
Created by: #MuthuPandian

Passing parameter through URL - ATG

in any jsp file

<a href="/success.jsp?success=123">Click here</a>
in the output jsp

Success
<c:out value="${param.success}"/>

How to redirect to Success URL on form submission in ATG

In JSP file


<dsp:getvalueof bean="/its/blog/BlogFormHandler" var="welcome"></dsp:getvalueof>
<dsp:form action="/muthu/muthu1.jsp" method="POST" name="regForm">
<p>User ID: <dsp:input bean="/its/blog/BlogFormHandler.userId" type="text" required="<%=true%>"/>
    <p>Post Title: <dsp:input bean="/its/blog/BlogFormHandler.postTitle" type="text" required="<%=true%>"/>
     <p>Post Content: <dsp:input bean="/its/blog/BlogFormHandler.postContent" type="text" required="<%=true%>"/>
     <dsp:input type="hidden" bean="/its/blog/BlogFormHandler.successURL"
value="/muthu/success.jsp"></dsp:input>
<dsp:input type="hidden" bean="/its/blog/BlogFormHandler.FailureURL"
value="/muthu/fail.jsp"></dsp:input>
     <p&g…

Sample Blog Project in ATG

Image
Download Sample Blog Project

It covers
1.DB Creation
2.Repository
3.Form handler
4.Droplet

[ATG ERROR] On form submission the response page shows “Session Expires”.

Solution: Run [DEPLOY] /opt/dev_server/ITS/build-files/dev-deployment-specific-files/store-deploy-ear.sh

Then [RUN JBOSS]
/opt/dev_server/ITS/build-files/dev-deployment-specific-files/startStoreServerOnJBoss.sh

Display DB Content - ATG

In ORACLE (CORE SCHEMA) SQL> create table blog_registration(id NUMBER(5) PRIMARY KEY, username VARCHAR2(40), email VARCHAR2(30), password VARCHAR2(40));

SQL> insert into blog_registration values(1,'Muthu pandian','base.muthupandian@gmail.com','12345');

/ATG/ITSStore/j2ee-apps/ITS/its.war/blog/repoTest.jsp

<dsp:page>     <dsp:droplet name="/its/blog/DisplayBlogDroplet"> <dsp:oparam name="ousername"> <dsp:droplet name="/atg/dynamo/droplet/ForEach"> <dsp:param name="array" param="items" /> <dsp:oparam name="output">            FullName :  <dsp:valueof param="element.username"></dsp:valueof><br> </dsp:oparam> </dsp:droplet> </dsp:oparam> </dsp:droplet> </dsp:page>

/ITS/config/its/blog/DisplayBlogDroplet.properties

$class=com.its.blog.droplet.DisplayBlogDroplet $scope=global blogRepository=/its/blog/BlogRepository userRepositor…