<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techie-Gyan</title>
	<atom:link href="http://www.techiegyan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.techiegyan.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Aug 2010 12:37:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Unix Command Line Productivity Tips</title>
		<link>http://www.techiegyan.com/2010/08/30/unix-command-line-productivity-tips/</link>
		<comments>http://www.techiegyan.com/2010/08/30/unix-command-line-productivity-tips/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 10:57:10 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[editing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1503</guid>
		<description><![CDATA[Unix Command Line Productivity Tips View more presentations from Keith Bennett.]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_429509"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/keithrbennett/unix-command-line-productivity-tips" title="Unix Command Line Productivity Tips">Unix Command Line Productivity Tips</a></strong><object id="__sse429509" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=unixcommandlineproductivitytips-1211839754515159-9&#038;stripped_title=unix-command-line-productivity-tips" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse429509" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=unixcommandlineproductivitytips-1211839754515159-9&#038;stripped_title=unix-command-line-productivity-tips" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/keithrbennett">Keith Bennett</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/30/unix-command-line-productivity-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String</title>
		<link>http://www.techiegyan.com/2010/08/30/java-lang-classcastexception-ljava-lang-string-cannot-be-cast-to-java-lang-string/</link>
		<comments>http://www.techiegyan.com/2010/08/30/java-lang-classcastexception-ljava-lang-string-cannot-be-cast-to-java-lang-string/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 08:00:24 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[debug]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[servlet]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1468</guid>
		<description><![CDATA[It happened with me while i was trying to extract a HTTPRequest parameter from an ActionInvocation object. I was writing an interceptor in Struts2 and was trying to check a request parameter. This is how you do it when you are in an interceptor: public String intercept(ActionInvocation invocation) throws Exception { Map&#60;String,Object&#62; params = invocation.getInvocationContext().getParameters(); [...]]]></description>
			<content:encoded><![CDATA[<p>It happened with me while i was trying to extract a HTTPRequest parameter from an ActionInvocation object. I was writing an interceptor in Struts2 and was trying to check a request parameter. This is how you do it when you are in an interceptor:</p>
<pre class="brush: java;">
public String intercept(ActionInvocation invocation) throws Exception {
    Map&lt;String,Object&gt; params  = invocation.getInvocationContext().getParameters();
    String param_var= params.get(&quot;parameter_name&quot;);
    /*
        Other stuff
    */
}
</pre>
<p>And it gave me following error:</p>
<pre class="brush: java;"> java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String</pre>
<p>According to the Java Doc it should return an Object and when i tried to debug it. I found that it is actually returning an array object. In some cases it may be correct because a request can contain an array against a key. HttpRequest gives two separate function for this but in this case it was only returning an array. Done following modifications to run the code : </p>
<pre class="brush: java;">
public String intercept(ActionInvocation invocation) throws Exception {
    Map&lt;String,Object&gt; params  = invocation.getInvocationContext().getParameters();
    String[] paramArr_var= (String[])params.get(&quot;parameter_name&quot;);
    /*
        Other stuff
    */
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/30/java-lang-classcastexception-ljava-lang-string-cannot-be-cast-to-java-lang-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Maven Project in Eclipse</title>
		<link>http://www.techiegyan.com/2010/08/24/working-with-maven-project-in-eclipse/</link>
		<comments>http://www.techiegyan.com/2010/08/24/working-with-maven-project-in-eclipse/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:59:12 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[addon]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1466</guid>
		<description><![CDATA[Maven helps the software project life cycle in many ways. One of the many attributes if it is that it integrates well with IDEs such as eclipse, Net beans and IntelliJ. I am trying to list certain things here which you can do while working with Maven managed project in Eclipse. 1. You definitely need [...]]]></description>
			<content:encoded><![CDATA[<p>Maven helps the software project life cycle in many ways. One of the many attributes if it is that it integrates well with IDEs such as eclipse, Net beans and IntelliJ. I am trying to list certain things here which you can do while working with Maven managed project in Eclipse. </p>
<p>1. You definitely need to build your projects correctly in Eclipse and Maven can help you resolving the dependencies correctly so that you project can reference to its repository for building the project. You need to run following two commands:  </p>
<ul>
<li>Setting a classpath variable for maven repository i.e. M2_REPO, You can run this command from any directory
<pre class="brush: java;">C:\&gt;mvn -Declipse.workspace=&quot;eclipse_workspace_location&quot; eclipse :add-maven-repo</pre>
</li>
<li>Setting the project&#8217;s  .classpath files according to the dependencies specified in pom.xml, You need to run this command at project build folder so that it can check all the dependencies accordingly. In case your pom.xml has child projects it will also set .classpath file for all those as well.
<pre class="brush: java;">C:\project_build_folder&gt;mvn eclipse:eclipse -o</pre>
</li>
</ul>
<p>2. Use m2eclipse plugin for managing for project. Visit <a href="http://m2eclipse.sonatype.org/index.html">m2eclipse.sonatype.org</a> for more details related to installation, features etc. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/24/working-with-maven-project-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven 2 &#8211; An overview</title>
		<link>http://www.techiegyan.com/2010/08/24/maven-2-an-overview/</link>
		<comments>http://www.techiegyan.com/2010/08/24/maven-2-an-overview/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 08:18:13 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[addon]]></category>
		<category><![CDATA[basics]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1490</guid>
		<description><![CDATA[Maven 2 features View more presentations from Angel Ruiz. Maven 2 in the real world View more presentations from carlo.bonamico.]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_816032"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/pakin318/Maven2-816032" title="Maven 2 features">Maven 2 features</a></strong><object id="__sse816032" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=Maven2-122835746311-phpapp02&#038;stripped_title=Maven2-816032" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse816032" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=Maven2-122835746311-phpapp02&#038;stripped_title=Maven2-816032" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/pakin318">Angel Ruiz</a>.</div>
</div>
<div style="width:425px" id="__ss_952797"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/carlo.bonamico/maven-2-in-the-real-world-presentation" title="Maven 2 in the real world">Maven 2 in the real world</a></strong><object id="__sse952797" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=javaday2009carlobonamicomaven203-1232952925826657-2&#038;stripped_title=maven-2-in-the-real-world-presentation" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse952797" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=javaday2009carlobonamicomaven203-1232952925826657-2&#038;stripped_title=maven-2-in-the-real-world-presentation" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/carlo.bonamico">carlo.bonamico</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/24/maven-2-an-overview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding values to Apache Logging &#8211; httpd</title>
		<link>http://www.techiegyan.com/2010/08/23/adding-values-to-apache-logging-httpd/</link>
		<comments>http://www.techiegyan.com/2010/08/23/adding-values-to-apache-logging-httpd/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:10:31 +0000</pubDate>
		<dc:creator>Aditya</dc:creator>
				<category><![CDATA[basics]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.techiegyan.com/?p=1485</guid>
		<description><![CDATA[Apache HTTP server logs are source of very valuable information. Many trends, usage analysis can be extracted from these logs. Some times you may not get the information you require in the logs as it is not logged by the server like time taken by the request or port of the server serving the request. [...]]]></description>
			<content:encoded><![CDATA[<p>Apache HTTP server logs are source of very valuable information. Many trends, usage analysis can be extracted from these logs. Some times you may not get the information you require in the logs as it is not logged by the server like time taken by the request or port of the server serving the request. httpd made it quite simple to change its format of logging. </p>
<p>You can just go to the httpd configuration file and search for LogFormat and you will be able to see some c printf like code there. Generally it is like :  </p>
<pre class="brush: java;">LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combined </pre>
<p>It is the part of configuration of mod_log_config which is responsible for httpd logging. You can change the Log format to get the desired fields printed in log files. use following table to add more fields in your log file or check <a href="http://httpd.apache.org/docs/1.3/mod/mod_log_config.html">http://httpd.apache.org/docs/1.3/mod/mod_log_config.html</a>:</p>
<pre class="brush: plain;">
%...a:          Remote IP-address
%...A:          Local IP-address
%...B:          Bytes sent, excluding HTTP headers.
%...b:          Bytes sent, excluding HTTP headers. In CLF format
        i.e. a '-' rather than a 0 when no bytes are sent.
%...c:          Connection status when response was completed.
                'X' = connection aborted before the response completed.
                '+' = connection may be kept alive after the response is sent.
                '-' = connection will be closed after the response is sent.
%...{FOOBAR}e:  The contents of the environment variable FOOBAR
%...f:          Filename
%...h:          Remote host
%...H       The request protocol
%...{Foobar}i:  The contents of Foobar: header line(s) in the request
                sent to the server.
%...l:          Remote logname (from identd, if supplied)
%...m       The request method
%...{Foobar}n:  The contents of note &quot;Foobar&quot; from another module.
%...{Foobar}o:  The contents of Foobar: header line(s) in the reply.
%...p:          The canonical Port of the server serving the request
%...P:          The process ID of the child that serviced the request.
%...q       The query string (prepended with a ? if a query string exists,
        otherwise an empty string)
%...r:          First line of request
%...s:          Status.  For requests that got internally redirected, this is
                the status of the *original* request --- %...&gt;s for the last.
%...t:          Time, in common log format time format (standard english format)
%...{format}t:  The time, in the form given by format, which should
                be in strftime(3) format. (potentially localized)
%...T:          The time taken to serve the request, in seconds.
%...u:          Remote user (from auth; may be bogus if return status (%s) is 401)
%...U:          The URL path requested, not including any query string.
%...v:          The canonical ServerName of the server serving the request.
%...V:          The server name according to the UseCanonicalName setting.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techiegyan.com/2010/08/23/adding-values-to-apache-logging-httpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
