LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-20-2006, 02:27 AM   #16
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30

I just created a dummy folder and a jsp
http://127.0.0.1:8080/WEB/index.jsp
here is what I got: description The requested resource (/WEB/index.jsp) is not available.
interesting since WEB folder is there
 
Old 04-20-2006, 02:35 AM   #17
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I got it working! hoooray!
I should've put WEB inside ROOT folder
I guess now I need to make it work so I can direct to it from url.
Seems like I need to forward port 8080, right?

oh by the way there is a compilation error... but well at least there is some progress

thanks!
 
Old 04-20-2006, 10:01 AM   #18
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
Here is what I have:

1. ping localhost -> ping: unknown host localhost
2. http://127.0.0.1:8080 works fine. I see Tomcat default page
Great! Tomcat is now up and running in standalone mode!

Quote:
my /etc/hosts file:
127.0.0.1 localhost.localdomain www.mydomain.net
71.142.79.209 mydomain.net mydomain
Ok, change the first entry to:

127.0.0.1 localhost.localdomain localhost

Then add this entry:

127.0.0.1 www.mydomain.net

Then when all is working fine, change the last entry to:

71.142.79.209 mydomain.net mydomain www.mydomain.net

Just out of curiosity, why do you have mydomain.net defined in your local host file with a "real" IP instead of using DNS to resolve it?

Quote:
Thanks for your help
No problemo. Once you get your JSPs running, I'm done.

Peace...
 
Old 04-20-2006, 10:03 AM   #19
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
oh by the way there is a compilation error... but well at least there is some progress
If you're getting compilation errors for your Java code, that's for you to work out. The Tomcat mailing list would be a more useful resource for you when getting your JSPs running in Tomcat.

Good luck!

Peace...
 
Old 04-20-2006, 11:21 AM   #20
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Thank you!
The reason why I have mydomain.net defined in my localhost is because I wanted to be able to access my site on my server using www.mydomain.net.
if I did not have that entry I would have had to type 127.0.0.1 instead of my domain name.

Yeah, Java stuff...
 
Old 04-20-2006, 12:06 PM   #21
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I need to make the site to work so I can direct to it from url.
Seems like I need to forward port 8080, right?

thanks
 
Old 04-20-2006, 03:52 PM   #22
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
I need to make the site to work so I can direct to it from url.
Seems like I need to forward port 8080, right?
Nope, no port forwarding is needed. Your URL will be:

www.mydomain.net:8080/blah

Now, if you're saying you need to be able to connect to Tomcat using a URL like:

www.mydomain.net/blah

then you have one of two choices:
  1. Change Tomcat standalone to listen on port 80. This means your Apache server can't listen on that port.
  2. Use Apache as your front-end to Tomcat.
If you haven't done so already, read on mod_jk and mod_jk2 as I've advised above.

Peace...
 
Old 04-20-2006, 06:04 PM   #23
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I actually want to access the page by www.mydomain.net. Seems like I need to use Apache as my front-end and, therefore, I will have to use mod_jk2.
If I do configure Tomcat to work together with Apache. Where would I place jsp pages? In tomcat folder or public_html folder? if tomcat, how do I tell to a server to point to that location?

Thanks.
 
Old 04-20-2006, 06:15 PM   #24
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
I actually want to access the page by www.mydomain.net. Seems like I need to use Apache as my front-end and, therefore, I will have to use mod_jk2.
If I do configure Tomcat to work together with Apache. Where would I place jsp pages? In tomcat folder or public_html folder? if tomcat, how do I tell to a server to point to that location?
Nothing should change on the Tomcat side from what you have now. Setting up mod_jk2 should be rather straight forward and once you get into the actual configuration of it, it should be clear where to put your files.

If your JSP content is being served right now by Tomcat in standalone mode, they should be served up when you attach Apache as the front-end.

One thing I found when playing with mod_jk is if I had to restart Tomcat, I had to restart Apache since mod_jk would no longer connect to Tomcat. I found I had to restart Tomcat when defining datasources for databases our webapp used. This was back in the Tomcat 4.1 days. Things might be different with Tomcat 5.5.

Peace...
 
Old 04-20-2006, 06:39 PM   #25
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
OK, thanks a lot. mod_jk2 I am coming ...
 
Old 04-20-2006, 06:49 PM   #26
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Here is a mod_jk howto that should remove some of the mystery. I'm sure a similar one applies to mod_jk2.

Good luck!

Peace...
 
Old 04-20-2006, 11:33 PM   #27
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Hi again,

I followed this example: http://mikepalmer.net/howto/tomcat/mod_jk2.html

and I got this error message:

Quote:
[root@mydomain native]# ./configure --with-apxs2=/usr/local/apache/bin/apxs
checking build system type... i686-pc-linux
checking host system type... i686-pc-linux
checking target system type... i686-pc-linux
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for test... /usr/bin/test
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
checking for uint32_t... yes
checking size of uint32_t... 4
checking for u_int32_t... yes
checking size of u_int32_t... 4
checking for unsigned long... yes
checking size of unsigned long... 4
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long long... yes
checking size of unsigned long long... 8
checking for unsigned longlong... no
checking size of unsigned longlong... 0
checking for snprintf... yes
checking for vsnprintf... yes
checking for flock... yes
checking for setsockopt in -lsocket... no
checking whether to use SO_RCVTIMEO with setsockopt()... yes
checking whether to use SO_SNDTIMEO with setsockopt()... yes
no apxs given
checking for target platform... unix
no apache given
configure: error: Cannot find the WebServer
prior to this command: ./configure --with-apxs2=/usr/local/apache/bin/apxs
everything was fine but after executing it I got that message

Sorry I have no idea what it is all about.

Thanks
 
Old 04-20-2006, 11:50 PM   #28
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I think somebody in the past mentioned that I am missing apxs
To get it I got this package: httpd-2.2.0-6.i386.rpm
When I try to install it I get this error message:

Quote:
Error resolving dependencies

Unable to resolve dependencies for some packages selected for installation

Details:
Missing Dependency: httpd = 2.2.0-5.1.2 is needed by package httpd-manual
Missing Dependency: httpd = 0:2.2.0-5.1.2 is needed by package mod
Thanks
 
Old 04-21-2006, 12:08 AM   #29
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Seems like I need to install package: httpd-2.2.0-5.1.2.i386.rpm
I tried to install it but got another error saying that this package is already installed.

I am in the loop...

what should I do?

thanks
 
Old 04-21-2006, 12:30 AM   #30
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Slow down a minute. First, do you have Apache running on your system? If you do, which version of Apache are you running?

Run this command:

$ find / -name apxs

Please post the results of that command here.

Peace...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running jsps in user home directory doesn't work (Apache Tomcat and mod_userdir) jimieee Linux - Networking 0 03-23-2005 10:12 AM
how to get apache and tomcat work together chinaundead Programming 7 12-06-2004 10:33 PM
Tomcat 5.5.1 and Apache 2 kpmaddenuk Linux - Software 2 10-30-2004 05:55 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM
Apache,Tomcat prowzen Linux - Software 0 05-09-2001 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration