Archive

Archive for September, 2007

Linksys WRT54G wireless unable to connect to internet

September 15th, 2007 Arun Manivannan No comments

Strange but i had to face this. I was using my wireless Intel 3945 with Vista and Kubuntu to connect to internet.  Fed up with Vista and wanting to install my “old Vista-unsupported” games, i installed Windows XP SP2. I was able to connect to my other desktop using my Wireless but it doesnt connect to internet. At last I found this wonderful page and here is the solution that gave me results. I am now working on my wireless happily.

For these commands click on Start. Run….. type in…CMD ….to open a command prompt box

Reset WINSOCK entries to installation defaults…type in … netsh winsock reset catalog …. press …enter

Reset TCP/IP stack to installation defaults…type in…… netsh int ip reset reset.log … press …enter

__________________

Categories: windows xp, wrt54g Tags: ,

Session Timeout – A difference

September 14th, 2007 Arun Manivannan 1 comment

The number of MINUTES after which a web app times out is defined in the web.xml this way.

<web-app>
….
<session-config>
<session-timeout>60</session-timeout>
</session-config>
….
</web-app>

The WebLogic Server waits TimeoutSecs (in SECONDS) before timing out a session as shown below:
The default value, if not specified, is 3600 secs.

<weblogic-web-app>
….
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>7200</param-value>
</session-param>
</session-descriptor>
….
</weblogic-web-app>

When timeout is set in both the deployment descriptors, the web.xml entry OVERRIDES the one defined in the weblogic.xml. This preference can be changed by a special value.

<session-config>
<session-timeout>-2</session-timeout>
</session-config>

This will let the app use the TimeoutSecs defined in the weblogic.xml for session time out.
There is yet another special value -1, in which case the session never times out. Of course, the weblogic entry is overriden in this case too.

Categories: web.xml, weblogic.xml Tags:

Filter filenames in a directory using FilenameFilter

September 11th, 2007 Arun Manivannan No comments

Old code but thought this would be useful

package com.ml;

import java.io.File;
import java.io.FilenameFilter;

public class FileFilterTest {

public static void main(String[] args) {

FilenameFilter filter=new FilenameFilter(){
public boolean accept(File dir, String fileName) {
return fileName.endsWith("java");
}
};

File f=new File("D:/Programs/Code");
String [] fileList=f.list(filter);
for (int i=0;i<fileList.length;i++){
System.out.println(fileList[i]);
}
}

}

Categories: Uncategorized Tags: , , ,