You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Laberge <jl...@redboxstudios.com> on 2003/05/06 18:57:03 UTC

Little problem running .java scripts.

Hello to all,

First off let me say what type of machine I have:
-I have Tomcat 4.1.24 with Apache 2.0.43.

I have installed Tomcat, or so it seems to be ok, since I go to
http://localhost:8080 and I get a page saying that it has been installed.

Next up I went and downloaded some .so for the Apache connectors.
(mod_jk2-2.0.43) and the jni.

I put them in the modules directory and use :

LoadModule jk2_module modules/mod_jk2-2.0.43.so

I restarted Apache with no problems shown.

This is where I am at.

When I go to http://localhost/helloworld.java
I get my source code shown in my browser without executing it.
Can someone please help?

-- 

Art visuel, communication, multimédia et internet

Jonathan Laberge
jlaberge@redboxstudios.com

Les Studios RedBox inc.
9643 boul. LaSalle
LaSalle (Québec)
Canada H8R 2N7

www.redboxstudios.com

514 368 3962 bur/off
514 368 9212 tel/fax
514 865 2554 cell/mob


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Little problem running .java scripts.

Posted by Tim Funk <fu...@joedog.org>.
java files are not run, java classes are. More information on integrating 
java into a webserver (like tomcat):

http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html

-Tim

Jonathan Laberge wrote:
> Hello to all,
> 
> First off let me say what type of machine I have:
> -I have Tomcat 4.1.24 with Apache 2.0.43.
> 
> I have installed Tomcat, or so it seems to be ok, since I go to
> http://localhost:8080 and I get a page saying that it has been installed.
> 
> Next up I went and downloaded some .so for the Apache connectors.
> (mod_jk2-2.0.43) and the jni.
> 
> I put them in the modules directory and use :
> 
> LoadModule jk2_module modules/mod_jk2-2.0.43.so
> 
> I restarted Apache with no problems shown.
> 
> This is where I am at.
> 
> When I go to http://localhost/helloworld.java
> I get my source code shown in my browser without executing it.
> Can someone please help?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mod_jk

Posted by Beau Hebert <bh...@c-quential.com>.
Hello-

I have recently installed mod_jk for use with Tomcat 4.0.1 and Apache
1.3.27. I am a new to Tomcat administration so please forgive if this
post belongs on the Apache list (plus I'm more akin to the TC crowd). I
am deploying a commerce application and have successfully installed
mod_jk and am seemingly able to send the proper requests to the
respective containers. My problem is that the application is lacking
it's functionality, and doesn't seem to be accessing the classes
properly (i.e. when I submit to the database on the login the page, it
simply refreshes.). The App works flawlessly in standalone mode, and is
able to pull dynamic data from the database in it's current mode using
mod_jk. I have combed through both catalina.out and mod_jk.log but
didn't find any error messages. My suspicion is that my problem is die
to the fact I have not Aliased or Contextualized my directories
properly, or that because I have blocked access to the WEB-INF dir. Do I
need to specifically allow access to the classes in mod_jk.conf? Any
assistance is appreciated. I have copied my mod_jk.conf below. 

Thanks in advance or any insights.
Beau Hebert


## eP3 is the root directory in Tomcat for the App ##

# Load mod_jk
LoadModule jk_module modules/mod_jk.so

# Configure mod_jk
JkWorkersFile /var/tomcat4/conf/jk/workers.properties
JkLogFile /var/tomcat4/logs/mod_jk.log
JkLogLevel info

#Virtual Host
<VirtualHost mydomain.net>
ServerName mydomain.net>
JkMount /eP3/*.jsp Worker1
</VirtualHost>

# Create an eP3 Alias
Alias /eP3/ "/var/tomcat4/webapps/eP3/"

#eP3 Home Directory
<Directory "/var/tomcat4/webapps/eP3/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# Prevent any unauthoized access to WEB-INF
<Location /*/WEB-INF/*>
AllowOverride None
Deny From All
</Location>





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Little problem running .java scripts.

Posted by Sjoerd van Leent <sv...@wanadoo.nl>.
First, Java is a programming language, not a scripting language!

Second, Java files need to be compiled into .class files, you probably
want to use .jsp files, which is automatically handled by tomcat

Greetz
Sjoerd van Leent

-----Original Message-----
From: Jonathan Laberge [mailto:jlaberge@redboxstudios.com] 
Sent: dinsdag 6 mei 2003 18:57
To: tomcat-user@jakarta.apache.org
Subject: Little problem running .java scripts.

Hello to all,

First off let me say what type of machine I have:
-I have Tomcat 4.1.24 with Apache 2.0.43.

I have installed Tomcat, or so it seems to be ok, since I go to
http://localhost:8080 and I get a page saying that it has been
installed.

Next up I went and downloaded some .so for the Apache connectors.
(mod_jk2-2.0.43) and the jni.

I put them in the modules directory and use :

LoadModule jk2_module modules/mod_jk2-2.0.43.so

I restarted Apache with no problems shown.

This is where I am at.

When I go to http://localhost/helloworld.java
I get my source code shown in my browser without executing it.
Can someone please help?

-- 

Art visuel, communication, multimédia et internet

Jonathan Laberge
jlaberge@redboxstudios.com

Les Studios RedBox inc.
9643 boul. LaSalle
LaSalle (Québec)
Canada H8R 2N7

www.redboxstudios.com

514 368 3962 bur/off
514 368 9212 tel/fax
514 865 2554 cell/mob


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org