Wednesday, February 20, 2008

Can I have more than one struts-config.xml file

Yes we can have more than one struts-config.xml files for a single struts
application in condition.1. If we have more than one module in our application.
These are new features in Struts1.1



..............

.............





config





/WEB-INF/struts-config.xml









config/login







/WEB-INF/struts-config-login.xml





.............

.........



where default and login our two module.2. If we want to use more than one
struts-config.xml files to make our application simple .



..............

.............





config





/WEB-INF/struts-config.xml,/WEB-INF/struts-config-login.xml





.............

.........

Monday, February 18, 2008

Compare ActionErrors and ActionMessages

What is the difference between ActionErrors and ActionMessages

ActionMessages is the super class of ActionErrors.

n struts 1.0 to dispaly the errors, ActionError was used but struts1.1 that feature depricated by ActionMessage tag.

it will be generated like

main advantage of ActionMmessage tag is it does not force to write html tags in properties file .but ActionError object forces to write html tags.


Action Message :
Encapsulate the collection of message,these message are global, each message specified the particular bean property, these contain the key, which refers the resource bundle in database.

Action Error :Â This is a return type of the validate(),contain the collection of error messages, these message are reported by the validate() of the Action form
these message are global and represent the particular bean property,


Wednesday, February 6, 2008

Enable "Pin to Start Menu" for Folders in Windows Vista / XP

Manual Registry Hack

Open up regedit.exe through the start menu search box, and then browse down to the following key:

HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\

Once there, you'll need to create a new key called {a2a9545d-a0c2-42b4-9708-a0b2badd77c8} with no value.

If you want to disable this, just delete the key.



Add "Open with Notepad" to the Context Menu for All Files

Whenever u try to open a file of unknown extension, a pop up comes which makes u scroll down the list of applications and select one(which most of the times is notepad)So y not have the option jst on 1 single right click.Follow the steps n u'll have 1!!!

Manual Registry Hack

Open regedit.exe through the start menu search or run box, and then browse down to the following key:

HKEY_CLASSES_ROOT\*\shell


Right-click on "shell" and choose to create a new key, calling it "Open with Notepad". Create a new key below that one called "command". Double-click on the (Default) value in the right-hand pane and enter in the following:

notepad.exe %1

Now right-click on any file and you'll see the new entry.

Sunday, February 3, 2008

Remove applications from Start-up

Applications that start as soon as the pc boots up makes the boot process really slow.To remove applications from start up,Follow the given steps:
1.Type"msconfig" in run window
2.Click on start-up tab
3.Uncheck the checkbox against applications which you dont want to get started at boot time.

Thursday, January 31, 2008

Change the port on which Microsoft Sql Server Express Edition

When I was trying database connectivity with java..
In the connection string I used the default port number 1433 since i had not changed anty default settings while installing the server.But that gave me theexception:

Exception:"DataSource Not found"

So i tried to find out on which port server was running but since i donno why on earth ,netstat was not showing sqlserver.exe as an active process even when it was visible in task manager.

Therefore the need to change the port arised....

Steps to change the port:

1.First make sure that TCP is enabled for the server(read my earlier post)
2.Open programs>SQLServer 2005>SQLServerConfigurationManager.
3.On the left pane click network configurations>protocols
4.on the right pane ,right click on Tcp
5.Select properties
6.Select IpAddress tab.
7.In IPAll pane enter any port no in the textbox next to TCP Port.

Java Home not found | javac not found

This exception should not occur if JAVA_HOME environment variable is properly set,
But If even then ,it is coming ,Here is the work-around to get your code working:

Copy the the file"Tools.jar" present in C:\Program Files\Java\jdk1.5.0_04\lib folder to
C:\Program Files\Apache Software Foundation\Tomcat 5.0\server\lib folder.

This should make your code work!!!!