Struts2Action with Tomcat and Eclipse

Tomcat

You will need to add the following XML entry in order to use Tomcat Manager
/conf/tomcat-users.xml
<tomcat-users>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="manager"/>

You can use the XAMPP MySQL engine by making the following changes.
/WEB-INF/applicationContext.xml
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.gjt.mm.mysql.Driver" />
<property name="url" value="jdbc:mysql://127.0.0.1:3306/manning" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>

Point to a JDK of your choice and use the JAVA_OPTS variable to allow debugging in Eclipse.
/bin/startup.bat
SET JAVA_HOME=C:\java\jdk1.6.0_17
SET JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

Eclipse

Add jar files for build from the following:

  • C:\tomcat\lib
  • C:\tomcat\webapps\Struts2InAction\WEB-INF\lib

Picasa Database Location

Looking for a network drive solution because Picasa keeps its thumbnail database and meta data local. Does not work great with a network drive.

Here is the location of the database:
In Windows /Users/%USERNAME%/AppData/Local/Google/Picasa2/db3/

Backing up the photos within Picasa will preserver the meta data. A better solution needs to be found, but none exists at this point.

How to disable dumprep.exe

When a program crashes in windows this program normally is what causes things to hang and it keeps opening multiple copies of itself if you attempt multiple close attemps.

How to disable dumprep.exe:

1. Right click on "My Computer," choose "Properties" from that menu.
2. Click on "Advanced tab,"
3. Click the "Error Reporting" button.
4. Check the "Disable error reporting" box. You may choose to uncheck the the box below it, "But notify me when an error occurs," if desired.

Delete File on Reboot

SysInternals has a utility to delete files upon reboot just in case the files are locked. See the notes below:

There are several applications, such as service packs and hotfixes, that must replace a file that's in use and is unable to. Windows therefore provides the MoveFileEx API to rename or delete a file and allows the caller to specify that they want the operation to take place the next time the system boots, before the files are referenced. Session Manager performs this task by reading the registered rename and delete commands from the HKLM\System\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations value.

This applet dumps the contents of the pending rename/delete value and also reports an error when the source file is not accessible. Here is example output that shows a temporary installation file is schedule for deletion at the next reboot:

C:\>pendmovesPendMove v1.02
Copyright (C) 2004 Mark Russinovich
Sysinternals - wwww.sysinternals.com

Source: C:\Config.Msi\3ec7bbbf.rbf
Target: DELETE

The included MoveFile utililty allows you to schedule move and delete commands for the next reboot:

usage: movefile [source] [dest]Specifying an empty
destination ("") deletes the source at boot.

An example that deletes test.exe is:

movefile test.exe ""

Turn off Plug-in Compatibility Check for Firefox

You need to install a plug-in you know is compatible, but is failing the check. Create and/or modify the following key in the "about:config" section.

extensions.checkCompatibility

After you have installed and used the plug-in you can turn this back off again; however, the plug-in will become disabled. Just turn off the check again whenever you want to use the failing plug-in.