DeveloperSide.NET Forums
November 24, 2014, 08:55:23 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Web-Developer Server Suite v2.00 Released on SourceForge.NET!!!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Run jsp pages in apache root directory ???  (Read 4683 times)
0 Members and 1 Guest are viewing this topic.
vsgill
Member
*
Posts: 7


View Profile
« on: December 30, 2006, 08:52:30 PM »

Hi
i just intalled the WAMP server and have a few questions..
I have always use IIS and just moved to apache so dont really know alot about it.

1: I was able to install tomcat 5 by following the instructions provided but the jsp pages run only in the webapps directory under tomcat
I want to run the jsp pages from the appache root directory...
is it possible... if yes can someone please provide some information of tutorial on it.

2: Is it recomended to use to WAMP server as a professional server or is it just for developers to test things?

Thanx in advance.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: December 30, 2006, 09:27:01 PM »

1) Take a look under C:\www\Apache22\conf\Suite-extra\mod_jk.conf...

Quote

# Uncomment the following lines to server ALL *.jsp and *.jspx files under webroot...
#JkMount /*.jsp ajp13worker1
#JkMount /*.jspx ajp13worker1


2) Yes. Apache runs 2/3rds of the net, this package is Apache + integration with other components + security measures.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
vsgill
Member
*
Posts: 7


View Profile
« Reply #2 on: December 30, 2006, 11:54:03 PM »

Hi there
Thanx alot for the reply.
I uncommeted the above and and it seems to be working too but i realized that the pages have to be in the tomcat5 root folder..
C:\www\tomcat5\webapps\ROOT

is there a way i can put all my pages in the
C:\www\webroot
or
C:\www\webroot\newDir1
C:\www\webroot\newDir2

is it possible to put the jsp pages anywhere under
C:\www\webroot\
and rediredt them to tomcat5 (if jsp let tomcat process it)
that way i can manage all the files at one place..(images css html jsp and all other stuff)

thanx again
Vik
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: December 31, 2006, 01:39:45 AM »

With those lines it should be possible to serve \www\webroot\file.jsp [just not under some other dir of webroot]

You need to restart Apache after config changes.

Is that not working for you? What are the errors displayed in the window and in error.log ?

Its been a while for me with Tomcat so I might be a bit off.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
vsgill
Member
*
Posts: 7


View Profile
« Reply #4 on: December 31, 2006, 01:56:22 AM »

no it doesnt work from
\www\webroot\test2.jsp

the page shows the following error.

Quote
Not Found

The requested URL /test2.jsp was not found on this server.
Apache/2.2.3 (Win32) PHP/5.2.0 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_jk/1.2.19 mod_perl/2.0.3-dev Perl/v5.8.8 Server at (myiphere) Port 80


but if i cut and paste the page in
C:\www\tomcat5\webapps\ROOT\test2.jsp

then it works on as http://localhost/test2.jsp
thanks agin
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: December 31, 2006, 02:33:08 AM »

Its coming back to me...

You can do what you are asking, but it is not recommended. You can input a webroot under Tomcat's server.xml file as \www\webroot... Something along those lines.

Though it would be best to keep everything jsp under Tomcat's webapps...

http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
vsgill
Member
*
Posts: 7


View Profile
« Reply #6 on: February 08, 2007, 05:33:10 PM »


Hi there
I am using tomcat write mod_jk and have the it all working...
my jsp pages are served in the
C:\www\tomcat5\webapps\ROOT\admin

this is what i did in mod_jk.conf

Code:
Alias /admin "/www/tomcat5/webapps/ROOT/admin/"

<Directory "/www/tomcat5/webapps/ROOT/admin/">
Options Indexes FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>

on the other hand my main web root for apache is still

C:\www\webroot
all the html pages and css and other conent is placed here...

i want to consolidate bothe the directories ......

so that the admin forlder holding all the jsp files is physically under the apche root.... its kinda easy to keep

track of the changes this way...

HOW CAN I DO THIS?
whoul it be easy to move tomcat root under the www forder... or  to move the www to work with the actual tomcat

webapps/ROOT forlber...

or is there any other way to do this ...
thanks
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!