Page 1 of 1

Xampp on Mojopac

PostPosted: 18. November 2007 07:27
by kmnair
I am setting up Xampp on Mojopac.

Works okay, including MySql. I am so happy I can carry my web projects around for demo.

But when I try to set up Tomcat, it fails.

Tomcat _start.bat gives an error "path should point to a jdk not jre.

But I have installed the JDK and the path is set correctly in the environment variables in both Mojo and the host.

Xampp latest and Mojopac 1.8 (latest).

Is these some location inside Xampp tomcat config where this is hard coded and needs change?

Any help will be greatly appreciated.

Thanks and regards

kmnair

PostPosted: 18. November 2007 07:48
by Izzy
Did you run this:
IMPORTANT: Then start the "setup_xampp.bat" to configure XAMPP with Java.

Also you may like to do a forum search in the XAMPP for Windows, Category Apache Friends in English for tomcat and use Izzy in the author field as I seem to remember I did a hack that fixed this issue some time back.

Perhaps it was this post I was think of:
http://community.apachefriends.org/f/viewtopi ... 9628#89628


===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 18. November 2007 14:25
by kmnair
Thanks Izzy.

I am using Mojopac, which is a portable application system, installed on a removable device.

I had set up Xampp (non-installer version) after unpacking the Tomcat addon. It did not return any errors then. But the problem arose when I invoked Tomcat through Tomcat_start.bat.

I checked the files you mentioned. The apache conf httpd is okay. But it seems that the mod_jk conf may have some errors. I am giving below the mode_jk file.

<IfModule mod_jk.c>
JkWorkersFile "C:/xampp/tomcat/conf/workers.properties"
JkLogFile "C:/xampp/tomcat/logs/mod_jk.log"
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# Alias /examples "C:/xampp/tomcat/webapps/examples"

#<Directory "C:/xampp/tomcat/webapps/examples">
# Options All
# </Directory>

JkMount /*.jsp ajp13
JkMount /examples/* ajp13

#<VirtualHost 127.0.0.1:80>
# DocumentRoot C:/xampp/tomcat/webapps/examples
# ServerName test
# JkMount /*.jsp ajp13
# JkMount /servlet/* ajp13
# Alias /examples "C:/xampp/tomcat/webapps/examples"

# <Directory "C:/xampp/tomcat/webapps/examples/">
# Options All
# Order allow,deny
# Allow from all
# </Directory>
# </VirtualHost>
</IfModule>


Three lines: JkMount /java, /jsp-examples and /servlets-examples are missing. Eventhough examples and servlets examples may not be of any serious consequence, I suspect that Mount /java may have some effect.

Could you kindly advise.

I tried to set up tomcat as a service through the tomcat_service_install.bat file in xampp\tomcat\bin folder, but failed. But executing the service.bat file in the same folder started my tomcat session.

Operations on the Mojo device are quite slow and so testing takes quite some time.

Thanks and regards

kmnair

PostPosted: 18. November 2007 23:56
by Izzy
I had set up Xampp (non-installer version) after unpacking the Tomcat addon. It did not return any errors then. But the problem arose when I invoked Tomcat through Tomcat_start.bat.

Did you run setup_xampp.bat after installing the Tomcat addon, I am sure you did but it is not clear in the above quote? - this sets up XAMPP for Java and has nothing to do with running it after you install XAMPP and needs some questions answered when you run it.

I know nothing (a Sgt. Schulz quote) ;) about Mojopac, but you do, so you may be able to adapt what I post here to be relevant to it.

When using a USB or any portable device the path statements contained in the portable device should be relative not absolute as each time you insert the drive it may not always have the same drive letter you have specified in your absolute path - thus it will break.

For example:
C:\xampp\tomcat - may not always be so - your USB drive would not be C:\ anyway, would it?
\xampp\tomcat - will always be the case if you install XAMPP to the portable device's root directory.

There is a previous post USB Tips and Tricks (xampp using relative path) that contains a hack that will do this job for you provided by patrick_yi_82 who had trouble with absolute paths on a portable device (I located this using keyword usb in a forum search):
http://community.apachefriends.org/f/viewtopi ... 4289#84289

Will the Java SDK always be in a fixed location or will it be placed on the portable device? - if not and whilst moving between PCs then you may have issues - perhaps including the Java SDK in the portable device may alleviate these issues, or at least making sure it is installed on each PC you insert the portable device in includes the correct Java SDK in the location path specified.

This is from my mod_jk.conf file so you may want to edit yours - jforum would not apply if you don't have it installed but is a clue for you if you install any java apps - also note the paths are relative.
Code: Select all
JkMount /*.jsp ajp13
JkMount /java/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13
JkMount /jforum/* ajp13


I tried to set up tomcat as a service through the tomcat_service_install.bat file in xampp\tomcat\bin folder, but failed. But executing the service.bat file in the same folder started my tomcat session.

Running the tomcat_service_install.bat only runs the service.bat file anyway and the code can be read if you look at the bat files in your text editor - again absolute paths may be significant in not being able to run a bat file.



===========================================
1. The new DeskTopXampp Launch Control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Rich AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================

PostPosted: 19. November 2007 04:57
by kmnair
Thanks Izzy.

Yes, I did run setup_xampp AFTER unzipping the addon. It asked for the option 5 and reported that it was done successfully.

Mojo is a very handy application. Why dont you try it. It can be installed on a 4 GB (or even less) USB2 drive, eventhough I am carrying it around on an IPod video. The peculiar feature of the package is that it creates a sort of virtual desktop on the PC, including its own wallpaper and all. You can install in it whatever applications you need to carry around, so no need to worry whether your favourite application will be available in the PC you are going to use at some remote location. All it needs is XP SP2. The applications run in the C: root partition, since there is this pseudo-virtualization. My only complaint is that it is painfully slow for my use. So I am looking at other alternatives like PortableApps.com.

So the issue about relative positions/paths do not arise, since the applications always run in C:. But if I start using Portable Apps, this will be relevant.

I will try editing my mod_jk file and get back to you.

Best regards.

kmnair