Thursday, June 29, 2006

How can i prevent Browser from Caching the Page content?

Before sending the data to the browser, use the following code:

response.setHeader("Cache-Control","no-store");
response.setHeader ("Pragma","no-cache");
response.setDateHeader ("Expires", 0);

This also helps in case, when user should not be able to see previous pages by clicking the Back button in the browser.

Can an icon be published on the left side of the URL in the address bar?

Create an icon called favicon.ico and place that in the root of the website.
You can also link to it using this:
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
Source: JGuru.com

Friday, June 23, 2006

JBoss - The Basics

This is not for the experienced JBoss application server user. It is meant to give the JBoss beginner the basics to running and deploying applications to JBoss 4.0.3 SP1.

JBoss Layout

JBoss is easy to understand if you know the way the directories are setup and how to work with them. First everything you will do to JBoss is in the install directory.

bin directory

The most important one here is the run.bat or run.sh. This will run the application server and display debug and information messages to the user in the session it is started in. To start JBoss simply use the run command from this directory. To stop the server do a CTRL-C in the session it was started in. There are also some other files there but this is the basics only so I will not discuss them.

lib directory

This is the "root" server lib directory. You don't usually have to nor want to do anything with these libs.

server directory

This is where the directories for the server instances are. This is where you will do most of your work.

default directory

The default directory is the directory for the default instance. This is the instance which is started if you do not specify an instance. If you are in need of multiple instances then you will need to duplicate this directory. So if you think that you will need more instances do yourself a favor and make a backup of this directory before doing anything else.

I will go through this directory and tell you a little about it and give you a little information which may come in handy in the future.

conf

This is where all the configuration files for the paticular instance reside. These are more or less needed but you don't need to do much with them to work with the server. The only one I have changed in this directory is the log4j.xml because I wanted to add some different appenders to keep more concise logs.

data

This directory I have never done anything in and never even navigated to tell I decided to write this. The only think I could see of any interest is the wsdl directory which will hold a sub directory for each archive which holds a web service which holds the wsdl and wsdd files for each service.

deploy

This is the most important directory. It contains all the deployed applications archive files and the jbossweb-tomcat55.sar directory. The most important thing in the jbossweb-tomcat55.sar directory is the server.xml. This is the file which will need to be modified if you are going to have multiple instances running. If you do run multiple instances make sure you change the listening ports in the server.xml, refeer to the JBoss site for information on changing ports. To run a server with a different name use this command run -c instance_name. The next important directory is lib. It is where the archive files need to be put for the instance to find them. For instance if you are going to be using databases the database lib goes here. The log directory is next, it is where the logs for the instance get put. The temp and work are where the applications get expanded to and run from.

others

There are other directories but these are all you really need to worry about when getting started.

JBoss Deployment

Since JBoss hot deploys new applications it works very will for me. I simply build the project and then use a script to deploy it from a command prompt.


Source: Dru Devore's Blog

Thursday, June 1, 2006

[Humor] Compensation

How are you compensated in the Organization for the good work? Is it one of these forms ;)



Total Pageviews

Diving into the Controversial World of IPL with Lalit Modi

Lalit Modi, the mastermind behind the Indian Premier League (IPL), recently had a candid interview with Raj Shamani. The interview delved d...