Preventing Cross Site Scripting (XSS) Attacks
I came across very nice & informative article by Greg Murray on his blog here.
He had explained the XSS attacks & how to prevent them very nicely. Really worth reading :)
I came across very nice & informative article by Greg Murray on his blog here.
He had explained the XSS attacks & how to prevent them very nicely. Really worth reading :)
Posted by
Atul Shinkar
at
6:11 PM
2
comments
Labels: A J A X, Java, JavaScript
<CONCEPT>
Casting String to Boolean in Java:
We can achieve this using the Boolean class' static method:
Boolean.parseBoolean(String s) - returns a boolean value
Sample code:
String str = "true";
if( Boolean.parseBoolean(str) ){
System.out.println("Value is true");
} else{
System.out.println("Value is false");
}
Casting Boolean to String in Java:
We can achieve this using the String class' static method:
String.valueOf(boolean b) - returns the string representation of the boolean argument
Sample code:
boolean blnFlag = true;
String strVal = String.valueOf(blnFlag);
</CONCEPT>
Posted by
Atul Shinkar
at
12:02 PM
2
comments
Labels: -C-O-N-C-E-P-T- Series, Java
Hello Friends,
It have been a very long time since I've posted my last blog. I have came up with a new idea of posting blogs on any kind of CONCEPT related to programming(any language), design patterns or any technical stuff. Please feel free to correct me at appropriate points.
Thanks.
Keep visiting... :)
Posted by
Atul Shinkar
at
11:26 AM
2
comments
Labels: -C-O-N-C-E-P-T- Series
Struts2 has in-built functionality of ajax enabled date-time picker control. But it has got one bug, which I've locked on Apache JIRA [here]
Bug Details:
Struts Version: 2.0.11
Description:
Suppose, I am currently on date Jan, 2008. When I click on the the dates 30, 31 on the topmost left corner, it takes the date as 1/3/2008 & 2/3/2008 [dd-mm-yyyy].
Same thing happens when I go to the month of Dec & click on the Jan dates. This problem is there while changing the year. I was dealing with the default view of the control.
Hope it gets fixed in the future releases of Struts2.
Posted by
Atul Shinkar
at
12:39 PM
0
comments
Labels: Struts
In-built monitoring and management support:
The J2SE 5.0 release provides built-in comprehensive monitoring and management support. It not only defines the management interfaces for the Java virtual machine, but also provides out-of-the-box remote monitoring and management on the Java platform and of applications that are running on it.
Also the JDK 5.0 includes the Java Monitoring and Management Console (JConsole) tool. It uses the extensive instrumentation of the Java virtual machine to provide information on performance and resource consumption of applications running on the Java platform using Java Management Extension (JMX) technology.
What is JConsole?
It's a JMX-compliant graphical tool for monitoring a Java virtual machine. It can monitor both local and remote JVMs.
I tried monitoring both local & remote JVMs. Really it's a very useful tool that helps user know the memory used by their application & many other important things. It is useful for both, a developer & a tester.
I've started exploring more on this tool as it'll be very much helpful in our Projects which will make them more efficient. I'll regularly post my experiences regarding my future explorations. Keep visiting :)
Posted by
Atul Shinkar
at
1:48 PM
0
comments
The event BarCamp4 is going to held on 16th February 2008 in Pune. Venue will be at ThoughtWorks Pune.
Please register yourself here.
Posted by
Atul Shinkar
at
1:32 PM
0
comments
Labels: Events
I was trying to set the connection pooling on Tomcat 5.0.x using normal way, but it was giving the error while connecting to the oracle database. One of my coleague suggested the following way, & it worked.
Added following entry to the server.xml present in the conf directory:
Posted by
Atul Shinkar
at
2:49 PM
1 comments
Labels: Tomcat
My article on "AJAX: Redefining Web Applications" was published on javajazzup.com
It is present here.
Please give it a view and let me know your comments.
Posted by
Atul Shinkar
at
11:07 AM
0
comments
I just came across the article written by Geertjan Wielenga (here) & it was worth reading it. Maybe I'll start to implement some sort of a pet project in Java which I'll open source it later. I am really very passionate for contributing to Open Source :)
Posted by
Atul Shinkar
at
7:41 PM
2
comments
Labels: Java, Open Source
Yesterday my friend Neeraj came across the concept (?) called "Fluent Interface". He told that he successfully implemented it in Java. Today I read lot of articles on it, and finally I was too successful to implement it in Java using a very-very simple program.
About Fluent Interface:
Fluent Interface is used to create a readable model i.e. to convert APIs to English-like sentences. It is slightly harder to write but much easier to read.
"Martin Fowler coined the term "FluentInterface" to describe objects that expose an interface that flows, and is designed to be readable and concise. The cost of this fluency is additional effort required to design the interface for your object and the slight increase in complexity. These types of interfaces are often utilized to create configurations for your objects but can progress into an internal Domain Specific Language or DSL." [Excerpt from Randy Patterson's blog post ]
Some useful pointers:
http://www.martinfowler.com/bliki/FluentInterface.html
http://www.bofh.org.uk/articles/2005/12/21/fluent-interfaces
Posted by
Atul Shinkar
at
4:51 PM
0
comments
Labels: Java, My Explorations
"Two scientists whose work made possible the development of the iPod and powerful laptop computers were rewarded with the Nobel Prize for Physics.
Albert Fert, a Frenchman, and Peter Grünberg, a German, have been jointly honoured for creating the technology used to read data on hard disks."
From the article on Timesonline: here
Posted by
Atul Shinkar
at
5:58 PM
0
comments
Labels: New innovations around
The Google Singleton Detector, or GSD, is a tool which analyzes Java bytecode and detects the use of four different types of global state, including singletons, hingletons, mingletons and fingletons. Then it outputs a graph with all these different types of static state highlighted, and shows all the classes that are directly dependent on them. The point of this tool is to allow you to see all of the uses of global state inside a project, as well as how they are all interrelated.
Worth to give a look here.
Posted by
Atul Shinkar
at
12:45 PM
0
comments
Labels: New innovations around
"Readily available frameworks and APIs can make developers very productive. However, they can also limit developers' imagination".
Summary from the article on Artima Developer => here
Posted by
Atul Shinkar
at
11:21 AM
0
comments
Labels: Technical Talks
A very good & step by step article to do connection pooling in JBoss AS for various types of datasources. It is available here.
I configured for the Oracle datasource. After you've successfully done the configuration, then the following message will be displayed on the JBoss console:
12:30:24,217 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=OracleDS' to JNDI name 'java:OracleDS'
Posted by
Atul Shinkar
at
12:25 PM
0
comments
Labels: JBoss
I've created my own web page using Google Pages. You just need to have a Google account for the same. It's quite interesting. I'll beautify the current page and will add some more pages from time to time, sharing my experiences 'n' views.
My first Google page is: http://atul.shinkar.googlepages.com
Thanks to Google :)
Posted by
Atul Shinkar
at
3:41 PM
0
comments
Labels: General