LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2003, 12:33 AM   #1
vvandam
Member
 
Registered: Jul 2003
Location: South Africa
Distribution: RedHat 9
Posts: 34

Rep: Reputation: 15
Javascript problems on Apache


HI All

My Javascript that was working from an IIS web server is not working from the Apache web server.

Does IIS and Apache host Javascript files differently?


-----------
vvandam

 
Old 07-17-2003, 03:07 AM   #2
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
When you say "Javascript" do you mean ones that are parsed on the Server Side? or are they run by Internet explorer? (i.e. within the HTML)
 
Old 07-17-2003, 03:21 AM   #3
vvandam
Member
 
Registered: Jul 2003
Location: South Africa
Distribution: RedHat 9
Posts: 34

Original Poster
Rep: Reputation: 15
The Javascript is passed on the server side.
 
Old 07-17-2003, 06:36 AM   #4
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Lightbulb

I have just found this, and I think it may help you. You need to use some software called Tomcat. Here are some instructions I found to install and configure it:

(Obtained from http://forums.devshed.com/archive/9/2001/06/3/16972)

Quote:
OK, here is how you do it - be sure you have the lastest versions of both:

1.) Install Apache that is is able to laod modules dynamically. mod_so needs to be built in.

2.) Install Tomcat.

3.) Load mod_jk into apache. You can get it from jakarta.apache.org. In your httpd.conf:
Code:
LoadModule jk_module libexec/mod_jk.so
4.) edit your httpd.conf, append this text:
Code:
 
<IfModule mod_jk.c> 
JkWorkersFile *PATH-TO-TOMCAT*/conf/workers.properties 
JkLogFile *PATH-TO-APACHE*/logs/mod_jk.log 
JkLogLevel error 
JkMount /*.jsp ajp13 
JkMount /servlet/* ajp13 
</IfModule>
5.) Edit server.xml of Tomcat. Create a new Context:
Code:
 
<Context path="" 
docBase="*PATH-TO-APACHE*/htdocs" 
crossContext="true" 
debug="0" 
reloadable="true" 
trusted="false" > 
</Context>
This is the most important Part! You Context's docbase points to the same directory as Apache's document-root.

6. ) Still server.xml: uncomment these lines:
Code:
 
<Connector className="org.apache.tomcat.service.PoolTcpConnector"> 
<Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/> 
<Parameter name="port" value="8009"/> 
</Connector>
7.) Start Tomcat first, then Apache

For test-purposes, put a file test.jsp into the htdocs-folder:

Code:
 
<%= new java.util.Date() %>
HTH

Paul
 
Old 07-17-2003, 06:50 AM   #5
vvandam
Member
 
Registered: Jul 2003
Location: South Africa
Distribution: RedHat 9
Posts: 34

Original Poster
Rep: Reputation: 15
Thanx

I have tried it and it does not seem to be doing anything.

It also looks like one of the files on my web server was refering to another Javascript on another web server wich was not availlable until now. I have contacted that administrator to request a copy of the Javascript that my server is referncing. Once I have it, I can modify all my pages to refer to the correct locations.

Thanx again for all the help.


------------
vvandam
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to run a server-side Javascript in Apache Linh Programming 2 07-15-2004 09:36 AM
Javascript maseby Programming 1 04-09-2004 05:16 PM
javascript in <td>? akaash Programming 0 03-18-2004 12:22 AM
Apache virtualhost problems, apache install problems nyroc Linux - Software 2 06-09-2003 11:16 PM
javascript?? Marci Sarwan Programming 1 01-18-2001 09:18 AM


All times are GMT -5. The time now is 01:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration