Useful Registry Locations
I’ve come across these keys by searching on the Internet. I use these keys for detecting viruses, troubleshooting stuff, and other geeky things. The convention I’m using in writing out the keys is MainKey\SubKey1\SubKey2\SubKeyEtc > Value (I’m not stating the data)
1. Windows Shell – This is the place where the OS sets its shell “explorer.exe”. Viruses often target this and inject other files to start up
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon > Shell
2. Run on Startup – The place programs use to start with the OS. There are two places in the registry that hold this, one for the system generally, and one specific to the logged in user.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
3. Default Wallpaper – Sets the default wallpaper of your desktop (the one that shows when no one is logged in yet)
HKEY_USERS\.DEFAULT\Control Panel\Desktop
4. My Computer Context Menu – Things that show up when you right-click the My Computer icon on the desktop (not sure if the CLSID number value will be the same)
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell
5. System Services – Listing of all system services. Useful for removing them manually
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
Copy Path
Copy Path Shell Extension by Vertigo Software is one of those software that I would call essential. It lets you get the path or directory location of any file on your Windows system by right-cliclking on the file. Here’s the site link.
In addition, if you need to copy UNIX-like paths, you can try out ClipPath, another super software, with similar functionality of appearing in your context menu. I think these kinds of utilities should be in-built in modern operating systems. Windows 7 guys, are you listening?!
Cool AckerPack
Another good software for moi! Great for packaging presentations with dependant files into one executable. Works like a compression software, but has the ability to set a default file to launch from the packed file.
I found this so useful and necessary just a while ago. There was a presentation I had to provide, and it had an additional file with it with a link on the slide. So I needed to provide everything in one place. Zipping was an option, but I also needed to provide a simple way for the user to run the presentation. Unzipping the file, then selecting the presentation file (and remembering its name) wasn’t a failsafe plan. Much better if the user could just click on one file and everything starts working. And AckerPack did just that!
Here’s the author’s description:
AckerPack instantly compresses any folder into a self-extracting executable! Unlike old ZIP-based tools such as WinZIP, with AckerPack you choose where the files should be unpacked and which compressed file to open after installation. Because you have complete control over the process, AckerPack makes an ideal tool for building eBooks or simple software installations.
Believe it or not, packaging up an entire folder for delivery over the internet only takes three clicks!! Just right-click on any folder and select AckerPack Folder. AckerPack compresses up to 30% better than WinZip and produces a much smarter executable which doesn’t confuse the end-user.
Unfortunately, the developer site has been down for some time now, but here’s the URL just in case: AvatarSoft.com. Here’s an alternate download for it: Softpedia.com
Thanks to Softpedia for keeping a mirror of AvatarSoft
Wax Movie Editor
This post is more of a memory note for me than anything else. I often find cool and free software, but don’t have any use for them at that moment. Later on when I do need them, I’ve already forgotten their names or the URL to get them from. So this is my series on free software.
I gave Wax Movie Editor a try and it certainly looks good. Sort of like the familiar Windows Movie Maker, but with extra functions. Here’s the link: http://www.debugmode.com/wax/
Using SQLPlus
Prelude – Have begun learning Oracle as part of my Databases course.
I found a lot of tutorials on writing SQL in Oracle, and getting info about the tables, but there’s a few tutorials that explain how to actually type in the commands into the SQLPlus editor. This is for those of us who do not have access to the web-driven version. The thing I was searching for was how to delete a mistake!
As stupid and wierd as that sounds, if you’ve typed in it and pressed the BACKSPACE key, you’ll know what I mean, i.e. on the server I have access to, the BACKSPACE key does not erase things I type into SQLPlus. Instead it prints out ‘funny’ characters: H^
Actually, neither does the DELETE key because of two reasons:
-
Pressing the BACK arrow key will print up more funny characters: [[D^
-
Pressing the DELETE key itself will give you more of those: [[3~
So all I was looking for was what to press to erase characters in SQLPlus. By trial-and-error, I found the following stuff:
-
To erase entire words, press CTRL + W
-
To erase single characters, press CTRL + BACKSPACE
Catching radio signals on a computer
It was 2AM in the morning (night?). I had just woken up and had a glass of water (can’t remember very well). Then my room-mate (Andrew’s his name) told me about this strange noise he had heard in his headset while playing on his XBox. As he focused on it more, he had found that it was actually a local radio station! How did Andrew manage to get the signals of a radio station on his headset?…
This is more of a documentation than a tutorial, because there are so many factors that led to this strange incident with my room-mate: he was able to catch local radio channels on his headset connected to his desktop. It was so scientific (there were various technical details), yet so social (his lifestyle contributed). First of all, here’s a list of devices I suspect were involved:
-
An old-model IBM metal-based keyboard
-
A ”Turtle Beach” headset
-
The headset wire connecting to the desktop
-
The ViewSonic desktop
-
A close-by radio mast transmitting signals
And here are the attributes of the room and other social factors that may have contributed:
-
My room-mate’s bed had a considerable metal frame
-
There were coins behind the keyboard
-
It was during the night, around 2AM
-
It was very cold (location Washington DC)
From some research Andrew did on the Internet, it seems that because of the cold and the night, the signals coming from the mast of the radio station nearby travelled lower than normal. Another contributing factor would be the IBM keyboard which has an internal metal frame for pressing the keys.
This incident was fascinating to me moreso because of all the varying factors that came into play: if the keyboard had been an ordinary one with a plastic depression frame, or maybe if his bed had not been raised above his desktop (see picture), or etc., this might not have happened.
win32:rontokbr-I2 Worm Infection
Symptoms
- Your registry is disabled
- Your system might be performing less than usual
Epilogue
I haven’t researched very well on this worm. It seems simple and is handled by just 2 files:
C:\WINDOWS\eksplorasi.exe
C:\WINDOWS\shellnew\sempalong.exe
Please note that I am not affiliated with any brands or software mentioned in this article.
Infection
The basic infection method is the worm adds itself to the “Shell” launch key for the system. This key in the registry is responsible for loading “explorer.exe” which is the parent of many other software that run on the PC.
Cure
The cure (as far as I can tell) for the strand that I encountered is simple. However, before trying it, I suggest you try out a-Squared Free. I find this software pretty reliable in detecting and removing ordinary trojans and worms (a feature lacking in most anti-virus I have tried).
We need the following tools for it (most of this is just to get to the registry, which this worm disables):
- ID System Optimizer (to enable the registry again)
- KillBox (to completely and safely delete the executables of the worm)
- Process Explorer (to detect and kill the worm’s processes)
Step 1. Run Process Explorer and try and locate the above named files running. If found, kill them.
Step 2. Use KillBox to delete the above files (I assume you have read their manual). If you have to, select the “Delete on ReBoot” option.
Step 3. Use ID System Optimizer to re-enable the Registry:
a. Navigate through “APPLICATIONS>Regedit>Disable Regedit”
b. When you click on “Disable Regedit”, a setting called “Enable Regedit” will appear on the right side. This will be turned to “No”. Click on it to make it “Yes”.
c. Click the “Apply Settings” button.
Step 4. Remove the infected key of the worm in the registry
a. Click “Run” from the Start Menu and type “regedit”. The registry opens. Now navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon
b. Right-click on the “Shell” and select “Modify”. In the window that opens, you would see a text box called “Value Data” reading something like:
Explorer.exe “C:\WINDOWS\eksplorasi.exe”
c. Modify it to read ONLY “explorer.exe”. That is, delete the whole “C:\WINDOWS\eksplorasi.exe” part.
d. Also note the capital “E” in “explorer”. This usually gives an indication of an infection because the correct entry has a small “e”. If your value doesn’t include “C:\WINDOWS\eksplorasi.exe” but has a capital “E”, there is a possibility that the “explorer.exe” file might have been infected internally! [I could not verify this completely]
Step 5. Restart your PC
Prologue
These were the steps I took to remove the worm. I had discovered it by accident one day when the system gave a “File not found” error message showing this strangely named file “eksplorasi.exe”. [There's probably a bug in the worm itself!] After some research on the Internet, I was able to find the name of the worm, but not much else. So I decided to document this, just for reference
Cleaning the LSASS worm : Part 2
This is a follow-up to an earlier post: Cleaning the LSASS worm : Part 1 Please note that I am not affiliated with any of the software or brands mentioned below, and have found out this method by trial-and-error.
Goals
To remove a specific strand of the LSASS worm manually (with the help of automated software)
Outcomes
We shall remove the worm from the PC, and also attempt to repair the damage it may have caused. You will also get to know a little about how viruses operate.
Tools
Download these tools (we’ll use them):
What you need to know
You will need to know how to download and install software, and edit the Windows registry without crashing your PC
Not too difficult.
Getting Started
First of all, we need to stop the worm from running so that it does not affect our work of removing it. The “lsass” worm operates by infecting various folders and locations on the PC [see below for list]. It then runs continuously in the background, checking if its being tampered with, and carrying out its “purpose”. That’s from the Matrix movie
There are two problems we have to tackle: first, we have to stop the worm from running. But that won’t get rid of it! Because of how it infects the system, even if you successfully end a process called “lsass.exe” [caution here! see below why], the worm will re-launch the next time you re-boot! So secondly, we have to clean the system of all of the worm’s “launch sites”; places where it gets back into the system.
We Begin!
1. Run Process Explorer and kill the task “lsass.exe”. Wait! Be careful not to kill this task that is showing somewhere under the “System Idle Process”. Kill the one under the “explorer.exe” by right-clicking and choosing “Kill Task”. [see image below to clarify the positions of "System Idle Process" and "explorer.exe"]
In addition, if you spot a process called “dllhost.exe” end it also.
2. Go to “Add/Remove Programs” and find anything similar to “MyWebSearch” and uninstall it.
3. Also uninstall Yahoo! messenger for the time being. Don’t worry, once we are done, you may reinstall it.
Careful!
This is the first of the “Careful!” warnings. When you are killing the “lsass.exe” task/process, you will most probably see 2 of these: one is a safe, system process, while the other is the worm. The only thing you have to be careful about is not to end the system process. Just follow the step 1 carefully [don't do what's shown below!].
Even if you end the wrong one, don’t worry, its not that serious. The system will re-boot automatically and we will have lost some time, that’s all.
Disinfection
We shall now start removing the worm.
4. Start Hijackthis and run a scan by clicking on “Do a system scan only”. After the scan is done, you will need to select some entries by clicking on the check-box. They won’t have the exact names as below, but if you see a resemblance, select t:
- F3HTTPCT.dll
- M3IDKE.dll
- M3PLUGIN.dll
- MWSSRCAS.dll
- Anything to do with the Home page of Internet Explorer
- Anything showing “MyWebSearch”
- Anything with “lsass.exe”
- Anything with “dllhost.exe”
After you have selected all the suspicious candidates, click on the “Fix checked” button.
5. We now delete all the related files of the worm in the PC. Run KillBox and browse to the “C:\WINDOWS\System” folder (in Windows XP). Select the “system” folder and click “OK”. [see below if its not clear]
Now type in “lsass.exe” in the “Full path of File to Delete” drop-down box. Click the red “X” button. NB: If you get an error, select the “Delete on reboot” option and reclick the “X” button.
For good measure, type in “dllhost.exe” in the “Full path of File to Delete” drop-down box and click the “X” button (same as above).
Careful!
Again, the warning has to do with the safe “lsass.exe” file. You should be very careful not to select “system32″ instead of “system”
At this point, your PC is hopefully free from all infections of the worm [see below for exceptions]. So the next obvious thing to do after an infection is healing.
Healing
6. We tackle the registry infections now. Start ID System Optimizer. Now navigate through “APPLICATIONS>Regedit>Disable Regedit” [see below for how this will look]
When you click on “Disable Regedit”, a setting called “Enable Regedit” will appear on the right side. This will be turned to “No”. Click on it to make it “Yes” and then click the “Apply Settings” button.
Now that the registry is OK, we need to get into it. So we use ID System Optimizer again, this time to enable the “Run” option and the task manager.
7. Now we navigate to “WINDOWS SYSTEM>System Other Options>Ctrl-Alt-Del Options” and change the “Allow user to run Task Manager” option. Click on it so that it reads “Yes”, and then click on the “Apply Settings” button.
8. Now navigate to “WINDOWS INTERFACE>Start Menu>Show/Hide Items in Start Menu” and set the “Show ‘Run…’ command” setting to “Yes” as shown above. If you see two such settings (a small bug in the version of ID System Optimizer I used), just set both to “Yes”.
9. We also correct the “Folder Options” setting. Navigate to “WINDOWS INTERFACE>Explorer Interface Settings>Explorer Menu Options” and make the “Show ‘Folder options’ command” setting to “Yes” as above.
We now have to restart the system for some of these changes to take effect.
Careful!
If there’s some step done wrongfully, the whole infection will come back! I found this the hard way and had to re-do many of the above steps till I got it right. If there’s any undeleted files related to the worm [see below why this can be] or if you skipped a step, get ready to re-do all of the above after reboot
Destroying the Launch Site
10. We can get to the registry now via the “Run”option. Go to the Start menu and select “Run”. Type in the window that appears, “regedit” and click “OK”.
The registry shall open.
11. Navigate to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon
We shall modify 2 values on this key. These values shall be showing on the right side of the two panels of the registry: The “Shell”value and the “UserInit” value.
12. Right-click on the “Shell” and select “Modify”. In the window that opens, you would see a text box called “Value Data” reading “explorer.exe C:\WINDOWS\system\lsass.exe”. Modify it to read ONLY “explorer.exe”. That is, delete the whole “C:\WINDOWS\system\lsass.exe” part.
13. Right-click on the “UserInit” and select “Modify”. In the window that opens, you would see a text box called “Value Data” reading “C:\WINDOWS\system\lsass.exe”. Modify it to read “C:\WINDOWS\system32\userinit.exe“.
Careful!
This is the most important of the cautions! Modifying the registry improperly can cause your PC to become unbootable! With regards to the above keys, if the “Shell” has something missing or incorrect typed in like “explore.exe”, your PC may not boot! So be very careful and follow instruction, checking and double-checking your selections.
Other Strands
Hope this doesn’t confuse anyone, but by strands I mean different versions of the worm. I don’t have the version numbers, hence”strands”. I have encountered another LSASS on a different PC that behaved differently than stated above. In addition to the “lsass.exe” process, it had an additional infected processes showing in the Process Explorer:
- “YMWorm.exe”
- “SVCHOST” from a file in “C:\WINDOWS\System” was tagged as the Task manager
- “svchost” process startup in registry under “all users\run”
- “svchost32″ also from “C:\WINDOWS\System” was tagged as Yahoo! Messenger
Thankfully, these processes can be handled by simply killing them and then using KillBox to type in their names from “C:\WINDOWS\System” and deleting them [see above to refresh your memory on how].
However, there were also these infections:
- In the auto-start folder, there was a short-cut tagged as “msconfig” [The location of the auto-start folder is “C:\Documents and Settings\All Users\Start Menu\Programs\Startup”). So just find this shortcut and delete it.
Because the deletion of these additional processes will (in theory) make all the other infections redundant, so I won’t describe the other infection locations for the sake of tiredness
Unresolved Issues
This tutorial doesn’t solve all the problems (my sister’s PC still has some of its settings wrong). This was just to share my experience with this problem because at that time there was no concise help on removing LSASS, just disjoint information on various forums. However, I believe this tutorial will help get rid of most of the infection and its effects.
Now if you were paying attention, you might have noticed that we have come to the end of the tutorial, and we didn’t even use one of the tools we downloaded! Which one? a-Squared Free. The reason is that I didn’t actually use this software when I first did this. I had some success with a-Squared on another PC that had a similar infection (a different strand of LSASS). Now I can’t tell if it will be successful on this particular strand because was taken care of and my sister didn’t want to re-infect her PC to test out a-Squared!
But try it out. Install it, scan your system, and follows its instructions if it finds anything.
Needless to say, a-Squared will only, at most, help in removing the worm, but won’t help in “healing” the infections. That’s where ID System Optimizer is very useful.
Hope this helps, its the best I could do.
Summary of Symptoms
- Internet Explorer’s homepage changed; link to obscene sites
- Your Yahoo! messenger status changed (the message you show beside your name to your friends); link to obscene sites
- The Folder options menu item will not show
- The Registry gets disabled (you can’t open it manually, but other software will still work OK)
- The task manager gets disabled, so if you right-click on the task bar, “Task Manager” will be grayed out. Same if you press “CRTL-ALT-DEL”. The button will be grayed out.
- Later on, when the task manager is working, we shall see that the “New Task” button is also disabled
- The “Run” showing on the Start menu will also disappear.
HOWTO: Demo CDs of Dynamic JSP Websites
Updates
I was able to try this procedure on a completely uninitiated PC, and found some alterations in the steps. I have highlighted them below [Updated August 30, 2007].
Goals
This tutorial describes the basic steps in putting your dynamic JSP website with a MySQL database onto a CD and make it run purely from the CD without installing anything on the PC. Please note that I am not affiliated with DWebPro or any other brands mentioned in this tutorial.
Outcomes
By putting your site on a CD, you shall be able to demonstrate the site on any PC without having to install Tomcat, Java, MySQL, or even a browser. Everything will run from the CD.
Requirements
The container for your JSP site needs to be Apache Tomcat in stand-alone mode. I have done this method successfully with Tomcat 5.5 and JRE 1.5.0_06. There’s some footnotes for other versions at the end of the tutorial. I am using MySQL as the back-end in this tutorial, but you can equally use other DBMS [see below]. Also, this works only on Windows PCs.
Getting started
We shall simplify everything by using a nifty software to do most of the technical stuff: DWebPro. Download it and install from here. I recommend using the defaults while installing. You will be required to register for free by filling out some info about yourself, and the download link will be sent to your email, after which you shall have 14 days to download or re-register. Note that this software can be used freely for non-commercial use.
Next steps
Next, we download the Java pre-package from here. After you finish installing it, then we download the Tomcat pre-package from here. Now install this and it will start working with DWebPro. Also download the MySQL pre-package here and install. I am using MySQL 5.0.15 here.
Setting up JDK
Now we are ready to get everything working. Because DWebPro uses Java 1.4, we will need to do a little upgrading. I shall assume you already have Java installed in “C:\Program Files\Java” and that you know how to download and install the JDK version 1.5.0_06 (or any version higher than 1.4 but closer to 1.5) You can use this page to get JDK. Choose the “JDK 5.0 Update XX” download button. ["XX" was 12 when I visited]Install it into your Java folder [as assumed above], then continue.
You will next need to locate the installation directory of DWebPro (I shall assume “C:\DWebPro” by default). In this directory, go to “\deploy\engine”, and first delete the “java” folder [see why later on]. Then copy-paste the JDK folder from the Java directory into the “C:\DWebPro\deploy\engine” folder.
Now rename the JDK folder in the DWebPro folder to “java”. At the end of this exercise, your “C:\DWebPro\deploy\engine” folder should look like this:
C:\
DWebPro
deploy
engine
java
tomcat
mysql
aspclassic
Deploying your site
Now that everything is set up (almost), you will need to copy your site into DWebPro. To do this, copy your site folder from your Tomcat directory (I assume you have it in “C:\apache-tomcat-x.x\webapps\”). Let’s call your site folder “my-web-site”. So you copy “my-web-site” to “C:\DWebPro\deploy\engine\tomcat\webapps\”. The Tomcat directory structure should look something like this:
C:\
DWebPro
deploy
engine
tomcat
webapps
my-web-site
WEB-INF
Next, copy your database as well. I assume you have MySQL installed in “C:\mysql” . So go there and open the “data” folder. If your database is named “my-db” then there should be a folder there with the same name. Copy this folder and paste it in “C:\DWebPro\deploy\engine\mysql\data\”. Your DWebPro’s MySQL directory should look like this:
C:\
DWebPro
deploy
engine
mysql
data
my-db
And with that we are nearly ready to Go Live! To test, run DWebPro from “Start > All Programs > DWebPro > Start DWebPro”. DWebPro shall take some time copying files (no need to get into technical details). When its done, Internet Explorer 6 shall open pointing to the Tomcat homepage [see below for why IE 6].
Now append “my-web-site” (the folder name of your site) to the URL when DWebPro launches the browser. For instance, the if the URL reads “http://127.0.0.1:8082″ add “/my-web-site” to make it read: “http://127.0.0.1:8082/my-web-site” and press “ENTER” or click “Go”. If everything is OK, your site will open.
Configuring Your Site to run JSTL and EL
This configuration is necessary if your website contains Expression Language or JSTL. More details are also available below in addressing different Java and Tomcat versions.
To configure Tomcat, locate your WEB-INF folder from “C:\DWebPro\deploy\engine\tomcat\webapps\my-web-site\” and open the “web.xml” file for editing. Now you will replace the “web-app” header of the file with this:
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd” version=”2.4″>
If you had problems with the site when you opened it before, look at the task bar and locate the DWebPro icon. Right-click it and select close to stop the server. Now restart DWebPro and all the EL and JSTL should be working fine.
Pointing to your site automatically
When DWebPro opened “my-web-site” in IE6, we had to modify the URL to get to our site. It turns out that you can configure DWebPro to automatically launch your site without this extra work.
Go to “Start > All Programs > DWebPro > Configure DWebPro” and go to the “Browser” tab (in the top bunch of tabs). In the “Url” text box, you will probably see something like:
“http://127.0.0.1:##DWEBPRO_TOMCAT_PORT##”.
To this, add “/my-web-site/” so that the text box now looks like:
“http://127.0.0.1:##DWEBPRO_TOMCAT_PORT##/my-web-site”.
Lastly, click “File > Save”, and you’re done. Just to test, re-launch DWebPro, and your site will open by itself after everything loads up!
Burning to CD
Up till now, this might all be seeming pointless. So the site runs on my PC, but it did so before too with Tomcat and MySQL. Now things get interesting! I shall assume you have a CD burning software and know how to use it
. Go again to the “C:\DWebPro” folder but this time we are going to burn the “deploy” folder to CD.
Just point your CD burner to the whole of the “deploy” folder and burn away. Really easy! Now just find some non-geeky friend who won’t have Apache Tomcat with MySQL installed on their PC and pop in the CD. After a 5-10 minutes wait (sorry, takes that long for DWebPro to initialize), your site will open on their PC with all the data showing from the DB, as well as all the code running! Cool!!! Pssst… the friend will probably not be that impressed, its just some text and images showing after all
And its probably advisable not going into the thing about “stand-alone server-side web site without installing any server software”!
Needless to say, your database shall open as “Read-only” from the CD.
Version Issues
Up to this point, I have been throwing out explicit version numbers for most of the stuff used. That’s because all this can fall apart if the right versions aren’t used. This has nothing to do with DWebPro, but how the Java developers upgrade and downgrade their things. I won’t be explaining the permutations because this one worked best for me. But if you want to read more, go to the Sun Java forums.
Only IE 6?
On a side note, you might have noticed that DWebPro launches IE6, but you probably have Firefox installed
(or have upgraded to IE7). So how does DWebPro do it? The IE comes built into DWebPro, do you don’t need to worry about where it detects the browser to open your site. But if you want to use Firefox as the built-in browser, DWebPro also allows you do this. Just download the Firefox pre-package! It comes in version 2.0.
Only Tomcat?
Yes, right now with DWebPro, you can use only Tomcat for JSP and servlet development. If you use Jetty, checkout this super tutorial on how to make JSP CDs.
Em, What is DWebPro anyway?
DWebPro is, first of all, “The Best Free Stand Alone Server On The Market!!!”. Here’s an excerpt from their site:
DWebPro is a stand alone web server developed specifically for distributing dynamic web sites (for example PHP/MySQL, ASP.Net/Ms Access) on CD or DVD without needing to rewrite the web site code. With DWebPro, your company can easily create CDs or DVDs demonstrating the amazing capabilities of your web site, all while never being connected to the Internet.
I am using JSP and MySQL because that was what I used and needed help with. But DWebPro is simply huge when it comes to the number of server-side languages and DBMS it supports. Check out their site for the complete list. All you need to do is download the appropriate pre-package. They have extensive documentation on using each of these pre-packages as well.
If you need help from the DWebPro guys, they have a huge and super support system: Forum, e-mail, IM, phone, mobile, and fax.
Now I also need to make it clear that I wrote this tutorial because although DWebPro is extremely well-documented and has a great support system, there are some steps in making JSP CDs that have Java-specific issues.
Using other DBMS
I have used MySQL here, but I’m sure you can use any other DBMS just as well with JSP and DWebPro. You will only need to download the appropriate pre-package from their site and then follow similar steps for copying the data into “C:\DWebPro\deploy\engine\other-dbms” folder. This may be very specific to how the different DBMS store their data, so I’m not giving any instructions on it.
Credits
- DWebPro Support (I was about to give up when these great guys contacted me and helped me out!)
- DWebPro Help
- evnafets from the Sun Java Forums
The Alterations
When I tried this method on my PC, I took some of the steps for granted. But on another PC, the procedure wasn’t successful till I explicitly took certain steps. So I updated this tutorial to include these steps:
- The Java pre-package needs to be installed before anything else because it sets up DWebPro’s internal variables so that Tomcat and the default browser are aware of Java. Just pasting JDK, it seems, does not do the trick.
- We need to delete the “java” folder from DWebPro because its version is 1.4 and it will not allow EL and JSTL to execute within your JSP pages.
- The order of installing the pre-packages matters. The one written here is optimal. When I installed Tomcat before Java, the default browser did not configure properly for the JSP port in the URL [see above].
- I included a link to downloading the JDK.
Assumptions Made
I assumed that you installed Java in “C:\Program Files\Java\”
I assumed that you installed DWebPro in “C:\DWebPro\”
I assumed that you installed MySQL in “C:\MySQL\”
I assumed that you installed Tomcat in “C:\apache-tomcat-x.x\”
I assumed you installed the following DWebPro pre-packages: Tomcat, MySQL 5.
I assumed that your JSP website folder is called “my-web-site”, and your MySQL database is named “my-db”.
I assumed that you installed JDK 1.5.0_06 somewhere and can copy it.
I assume that you are fairly fluent in Java and JSP, and have had some experience with creating web applications.
I assume I remembered all the things I assumed and have written them here
Now predictably, most of these assumptions will be wrong. I only use them as guides. So if, for example, your database is not called “my-db”, just follow the steps with your real database name in mind and everything will be fine and simple
Google Search on your site
I want a search box
Want to have a cool search box on your site for users to surf the web? How about your visitors searching your site? Its all possible for free, just use Google’s AdSense (I’ll assume that everyone knows what this is).

AdSense
If you have a Google account, you could now use Google’s AdSense directly from it. Once you’ve logged into your AdSense account, here’s what you need to do to get a free search box.
Firstly, locate and click on the “AdSense Setup”. Then goto the “AdSense for Search” page by clicking on its link.
On this page, you will find lots of options on how users can search from the box. You can also customize the look and feel of your box.
Web and site search
You can make your search box available for searching your site, or the whole web. To be able to do this, under “Search Type” select the “Google Search + Site Search” option and type in your site URL. I won’t go into the details of setting the other options because they are self-explainatory.
The “results” page
When you’re done, click the “Continue” button hiding at the bottom of the page, and you will be taken to the next page where you can customize how the results returned by the visitor’s search are returned. Again, the options are mostly self-explainatory except perhaps the “Custom channel” option. According to Google’s help, “channels are used to track ad performance across an entire domain, across a subdomain, within directories and for individual pages. They can help you answer questions like ‘which of my domains is generating the most revenue?’ [or] ‘on what sections of my site are ads performing best? Articles? Forums? Blog?’”
The Search box finally!
When you click the “Continue” button again, you get the HTML code for inserting Google’s search box on your site. Just copy and paste it on an appropriate area of your page. This may be more helpful if you use a <table> or <div> to layout your page. For those of us who like W3C-valid pages, you might need to remove the following for XHTML Strict:
- All formatting such as bgcolor, nowrap
- The target attribute of the form
- The <center> tag
If you’re using XHTML Transitional, you won’t need to do anything apart from copy-paste. Now load up your page, and search away from Google!
Leave a Comment
Leave a Comment
Leave a Comment