tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Plamen Petkov <plame...@bgstore.com>
Subject Re: Help: Tomcat 3.2.3 and Apache on FreeBSD **Java newbie**
Date Wed, 12 Sep 2001 22:00:46 GMT
nbd95 wrote:
> 
> The details:
> 
> FreeBSD 4.1
> Jakarta-Tomcat 3.2.3
> JDK-1.1.8
> Apache 1.3.20 (DSO)
> mod_jk
> 
> I've been around the block with PHP, Perl, Bash, Apache, Unix, Linux,
> Postfix, BIND, Netatalk, Samba, Kernels. Building, configuring, patching,
> set-up, custom compiling, all no problem. I am *new* to Java.
> 
> I've installed Tomcat-Apache and it appears to work.
> http://localhost/examples accessed through Apache, the Tomcat examples all
> function. http://localhost:8080/ accesses the Tomcat main page, the examples
> work here as well.
> 
> I have returned my configuration to the beginning, removing my muddled
> attempts at setup. Currently I have this line added to my httpd.conf,
> 
> Include /usr/local/tomcat/conf/mod_jk.conf
> 
> mod_jk.conf has been changed *only* to correct the path to mod_jk.so and the
> path to the mod_jk.log file. At this point Apache starts, loads mod_jk.so,
> and the examples can be accessed and run successfully.
> 
> Thhhhpppppppppppppp! Phooey.
> 
> My problem is I am trying to get examples of *.jsp code to work
> unsuccessfully. I have example code from a book (Core JSP) that I cannot
> run. Can anyone step me through creating a directory where I might store
> *.jsp files for experimenting? I'm simply trying to eval JSP and explore
> it's environment.
> 
> I've read the book, Core JSP, and the "Working with mod_jk" - "Tomcat-Apache
> HOWTO" papers. I still don't get which *.conf files I need to modify to send
> *.jsp files to Tomcat from the Apache directory structure.
> 
> I thank you for your indulgence.
> 
> DAve


Here is my directory structure for testing all "Core JSP" book examples.
I gave this Application a "core" name. All dirs are relative to tomcat's
"webapps" directory, wich is /usr/local/tomcat/webapps.

[/usr/local/tomcat/webapps/]core   <-- HTMLs, JSPs
core/jsp <-- HTMLs, JSPs
core/WEB-INF       
core/WEB-INF/classes   <-- non-packaged servlets
core/WEB-INF/classes/coreservlets  <-- coreservlets's package servlets

As for your last question: use symlinks. The "core" application may
reside anywhere. Just symlink /usr/local/tomcat/webapps/core to the
place where it is.
Apache directory structure and Tomcat's one are not related at all.


http://mylocalhost/core/jsp/some.jsp
http://mylocalhost/core/servlet/SomeServletInClassesDirectory
http://mylocalhost/core/servlet/coreservlets.SomeServletFromCoreservletsPackage


have a nice day.

p.s. I am new to Java/JSP/Servlets/Beans/etc/etc too :-)  But I like it.
Coming from PHP world, it is a bit hard to get the point at once.. but..
try :-)

Just split your mind into many pieces: one for Apache, one for Tomcat,
one for this container, one for the other one..  :-)




Regards,
-- 
Plamen D. Petkov ICQ#2214327
plamendp@bgstore.com
http://www.bgstore.com

Mime
View raw message