tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Problems with a web application running a PHP script
Date Tue, 06 Nov 2007 05:31:31 GMT

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message ----- 
From: "Rocco Scappatura" <Rocco.Scappatura@sttspa.it>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, November 06, 2007 2:37 AM
Subject: Re: Problems with a web application running a PHP script


>
>> As Chuck mentioned , this script class is in 1.6 so you need to either
>> change the environment variable or if from service set it to 1.6.
>> Then there is just one other thing, in NB right
>> click->properties->source...
>> Check the source level...
>> ie you can be running on 1.6 but still tell NB to make it 1.5... which
>> will
>> also snooker you ;)
>
> OK, even if NB doesn't show me the choice to use 1.6 script class. I ve
> set the 1.5.

That, to me seems to be the problem, if Netbeans is not giving you the 
choice of 1.6
it can only see JRE 1.5

Scripting is a new feature in JRE 1.6!
So you need to tell TC and NB to use the JRE 1.6
If TC running as a service if you double click on the feather in the task 
bar, and go to the JAVA
tab, in the JVM setting you will see something like
C:\jdk1.5.0_06\jre\bin\server\jvm.dll
must be (find it on your machine)
C:\jdk1.6\jre\bin\server\jvm.dll

In NB, you go to TOOLS->PLATFORM MANAGER and show it where you have Java 
JRE/JDK 1.6 installed

Then just make sure you existing project uses it at source level, ie it will 
still give you the option of compiling it as 1.5, but thats no good it must 
be 1.6.

> Other that this, I would like to know how I could solve my initial 
> problem.

As we understand it, your application is looking for a class that only comes 
in 1.6
It can find that class because the Java engine you running is 1.5.

But as we understood it, it was working in the embedded TC that comes with 
NB, so that implies that it was working on JRE 1.6
and that the new TC was not...
We THINK the problem is that you have things working on different JRE's on 
your machine... they must all work on the the same 1.6 one, then your DEV 
environment and various TC's will work together.

>
> Moreover I have another question. When I create a new project in NB, do I
> set the 'Project folder' as the folder where I put webapps (i.e.: suppose
> that I put every webapps in "C:\tomcat", then I have to set "Project
> Folder" to "C:\tomcat")?.

NO... create a convenient projects folder on your machine and NB will put 
the files there.
When you compile, and run, NB creates a build folder, and then ASKS the TC 
that you have SET, to run it.
So it actually runs in that new TC you installed.

When its all debugged... and I imagine now its taking you to a functions 
that it cant find (because the class is in JRE6), then you stop NB from 
running that Tomcat.... compile it and just drop the WAR into any TC the 
USES JRE 1.6

>
> Infact, otherwise (in particular, I have defined a different engine, host,
> connector and so on) I can't start the web application after deployment
> with NB.

NO, in the DEV environment you do nat have to deploy, just compile and run 
it or debug it.
When you done you can deploy... but I prefer actually copying the WAR file 
from the project to WEBAPPS, that what other people will do.

If you deploy it.... the TC wants to use the file now in TC webapps... but 
while you testing you still want it to use the files in NB BUILD (your test 
project) because you can debug that easily.

Get the JRE the same for everything....

You may be collecting JRE's automatically on windows... it does that....
What I always to is get the actual JDK for java, stick that in a special 
folder, and tell the DEV environment to use it... then everytime browser JRE 
prompt for updates, it doesnt matter if the user on the machine installs all 
this stuff.

If you install the JDK1.6
Then install TC (on windows its setup)... point at that JDK6
Then install NB (on windows its setup)... point at that JDK6

Then just show NB where the new TC is.
You done!

Good luck ;)

>
> Thanks,
>
> rocsca
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message