xampp and tomcat 7

Problems with the Linux version of XAMPP, questions, comments, and anything related.

xampp and tomcat 7

Postby andybrookestar » 24. January 2012 16:11

hi

let me set the scene first.

I have xampp installed in /opt directory on slackware 13.37 everything is working as it should, have set up a database and table and populated with data. I can see html files or php by going to http://localhost/anyfile.html

Also I have installed tomcat so a java server page in /var/lib/tomcat/webapps/ROOT can be seen at http://loclahost:8080/anyjsp.jsp

Now the interesting thing is a jsp in tomcat can connect to the MySQl in xampp and return data. This means tomcat and xampp can therefore communicate with each other once both are running.

My question and what I want to do is this:Can I configure xammp somehow, that I put a jsp file into /opt/lampp/htdocs and get get tomcat handle it , by xampp requesting that tomcat handles it , but still display the file at http://localhost/file.jsp ?

In other words if tomcat can connect to xampp and pass data, can it do it the otherway around. They do this with apache
and tomcat but I find xampp easier to use.
andybrookestar
 
Posts: 3
Joined: 24. January 2012 15:50
XAMPP Version: 1.8.3-2
Operating System: slackware 13.37

Re: xampp and tomcat 7

Postby JonB » 24. January 2012 20:09

Lets not get things mixed up - XAMPP for Linux (LAMPP) is a distribution-agnostic Server suite, its a bash script (not a LAMP stack) and it doesn't actually install components (like an RPM with a setup tool would). BUT all the pieces are identical and are compiled from the same project sources. It is different from LAMP in how it is all configured.

Apache is Apache whether it was installed via apt-get, yum, YaST or as part of XAMPP, ditto mySQL, PHP, Perl (or Tomcat). What is different is that Linux itself is unaware that XAMPP has provided Apache, Perl, PHP and MySQL. This means that may install tools will not be aware of the location of the services that XAMPP, this makes it very hard to configure 'outside applications' as you have to edit all the paths (and know the configuration routines). Everything else from a functional point of view works the same.

There is one further difference, as LAMPP is driven by a bash script that has to be executed, the 'services' are actaully executables in this case, and they will not auto-start unless you modify your system's startup. I have covered this in another topic - viewtopic.php?f=17&t=48730&p=187507#p187507

I hope I have not confused the issue even more, but what I say is accurate.

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: xampp and tomcat 7

Postby andybrookestar » 24. January 2012 20:44

JonB

Thanks

xammp is working fine. I always start it manually from a command line :
/opt/lampp/lampp start
and also start tomcat manually /etc/rc.d/rc.tomcat start

you have clarified that on my box tomcat7 is actually installed (got it from slackbuilds) as an sbo package, and xampp is
not installed as a package- yes I agree. Basically your saying if I know or figure out how to integrate apache2 and tomcat7, I should be able to configure xammp and tomcat7 ? probably way beyond me . Interestingly as i mentioned jsp files from tomcat
do know that MySQL in xammp is running since I can get a jsp to connect to MySQl in xammp


I did a bit of searching and there are references on the forum of the new version and for windows "tomcat add on" .Is it possible that tomcat and xampp integration will be easier in the future?
andybrookestar
 
Posts: 3
Joined: 24. January 2012 15:50
XAMPP Version: 1.8.3-2
Operating System: slackware 13.37

Re: xampp and tomcat 7

Postby JonB » 24. January 2012 23:12

Basically your saying if I know or figure out how to integrate apache2 and tomcat7, I should be able to configure xammp and tomcat7 ?


As some would say "That is a Roger, Andy" :lol:

XAMPP's Apache is no different than the same 'minor version' Apache released through any of the various repositories. It uses the same sources, and works identically. What IS different is all the configuration files and the modules that are 'complied in' AKA hard-linked (that means the mod does not need to be added to a configuration file). The Apache core is identical. In a package installation, the setup tools read other configuration files (all of linux is based on text configuration files) in locations that are known to them. (and that is the big difference in distributions really). So, in the end its 'all configuration'.

As to how Tomcat 'knew' MySQL was there - Likely a call to port 3306 and possibly an installer that used a grep/regex to search for configuration files or mysql.sock. Was LAMPP already installed when you installed Tomcat??

As for Tomcat support, it's really a totally separate (as you learned or knew) application server. There's a fair amount of debate if XAMPP should include it in future releases. Its inclusion with the Windows version of XAMPP, is a by-product of team changes at XAMPP and the use of pre-compiled Windows binaries, so XAMPP for Linux was unaffected.and thus -- no Tomcat.
Its much like the matter of 'how much' do we support PHP or Perl questions -- at some point (once things work) -- those questions belong on a language/framework oriented forum or mailing list. Should we teach folks how to compile when needed? I spend a lot of time explaining the workings of Linux or how to use the command line...

The XAMPP forums are here to get things working, and to offer some insight into why things are the way they are.

Good Luck and thanks for the inquiry. I hope I helped clarify things.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests