You have 2 problems
Separate them out.
1)
"Also I still can't connect, at all, to the native server through anything other than localhost:8080. It's not a network or router issue, they are configured correctly. Even my-computer-name:8080 won't connect to the native server. Any ideas what's up with that? "

This is purely a Tomcat, router, firewall issue
Start a new question in the forum about this with some log details. When it won't connect, what are the symptoms? Can you see the attempt (destination port:8080) in the firewall logs? Is Tomcat seeing anything trying to talk to it? What if you telnet to my-computer-name 8080; do you get a connection that looks the same as telnet to localhost:8080.


2) Once you get 1) working, you can start on the httpd=>jk=>Tomcat.
Start a new thread with this once you have 1) solved.
Look in the httpd logs to see if the httpd server is passing it on. You can also use the Tomcat manager and logs to see if its AJP connector is getting hit.
Depending on what the logs show, you may have questions for the httpd forum.
You may want to check to be sure that the 8009 (AJP) port is set up in Tomcat (server.xml) and that this is the port used by jk on the httpd side. 8080 is for browsers; 8009 is for AJP which is a whole different set of messages.
Is jk trying to connect to localhost or my-computer-name?

By putting two unrelated questions in the same forum thread, you are making it more confusing than it needs to be.



Wayne Bragg wrote:
After all this, and with a new understanding of how httpd and tomcat work together, I was reading the documentation I have on my installation of Tomcat, again. It is setup so the "native server" is on port 8080 and the "jk connector" is through httpd 80 or however you'd say that. All the example apps that came with the Tomcat installation work through both the native server (8080) and the jk connector (80).

So I installed DWR, using it's defaults, to be able to use the AJAX calls. All of DWR's examples only work through the native server localhost:8080/dwr/. If I try to run them using the tk connector localhost:80/dwr/ anytime they need to call the supporting jar and class files they get the "[$variable] is not defined" error. Any idea what is causing this? Is it something to do with the paths to these supporting files?

Also I still can't connect, at all, to the native server through anything other than localhost:8080. It's not a network or router issue, they are configured correctly. Even my-computer-name:8080 won't connect to the native server. Any ideas what's up with that?

I apologize for not asking these questions this way from the start.


----- Original Message ----- From: "Wayne Bragg" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Saturday, March 03, 2007 6:13 PM
Subject: Re: DWR using WAN vs LAN


You may want to limit your question to one topic at a time.

Sorry for any confusion.

Tomcat/Apache/PHP can all work together depending on how
you send up your application. Apache's mod_jk is how you make Apache and
tomcat work together.

< Tomcat is configured to run on 8080 by default
you can change that to 80 by editing the server.xml file. All http traffic that doesn't specify a port automatically go to 80. To access your computer
from the Internet you'll need to first open the port on your router or
remove the computer you want to access from the router's DMZ (not
recommended). Make sure you use your actual IP which you can determine by
typing "what's my IP "  on google and following the first link.

I am aware of all this! Thanks for the reply.

All the explanation I have given was to help avoid these unnecessary emails, but I guess that didn't work.

I have two topics and I need answers to both. I thought they were related but I can now see they are independent from one another. One topic led me to the second one or vice versa.

Topic or question 1 -

This is not a router or network question. I know how to configure the router and network. My Tomcat server doesn't recognize any requests that are not coming specifically from "localhost:8080". Not even from "my-computer-name:8080" which I thought was the same thing. Is it suppose to do that? If not does anyone have a clue as to why it isn't or how to fix it? If this is not an appropriate question for this list then I guess I need the admin to let me know that. I don't see how it's not. But apologies if it is.

Topic or question 2 -

Starting with the Devside.net Web[Developer] Server Suite 1.94
standard default installation, does anyone know the steps needed to configure "HTTPD" to handle the PHP and "TOMCAT" to handle the Java all at the same time, from the same page and the same directories? Is so how?

If you create an app that uses both Tomcat(jsp) and
PHP then you'll have to manage two separate sessions, though that shouldn't
be terribly difficult to do.

This relates to the second question and is what I need help with. I could use the steps necessary to accomplish this. I know the code below is part of it.

<VirtualHost *:80>
     DocumentRoot /www/webapps/ROOT
     SetEnvIf Request_URI \.php no-jk
     SetEnvIf Request_URI \.cgi no-jk
     JkMount /* ajp13worker1
</VirtualHost>

"try putting quotes around the URI itself, I believe
that's your problem with this rule.  E.g. :
SetEnvIfNoCase Request_URI "/*.php" no-jk
..also, i may advise you to use the "no case" rule..."

Mike, thank you for your reply. I haven't tried that yet but will work the second question as soon as I can get Tomcat to recognize something other than localhost. I appreciate it.

I assume you've already been informed, doesn't belong to the mailing list.
If these questions are not appropriate for this list then I guess I need the admin to let me know that. I don't see how it's not. But apologies if it is.



----- Original Message ----- From: "EDMOND KEMOKAI" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Saturday, March 03, 2007 4:41 PM
Subject: Re: DWR using WAN vs LAN


I've read
through your post and it is difficult to tell what your real problem is. The networking issue, I assume you've already been informed, doesn't belong to the mailing list. Tomcat/Apache/PHP can all work together depending on how you send up your application. Apache's mod_jk is how you make Apache and tomcat work together. If you create an app that uses both Tomcat(jsp) and PHP then you'll have to manage two separate sessions, though that shouldn't be terribly difficult to do. Tomcat is configured to run on 8080 by default you can change that to 80 by editing the server.xml file. All http traffic that doesn't specify a port automatically go to 80. To access your computer
from the Internet you'll need to first open the port on your router or
remove the computer you want to access from the router's DMZ (not
recommended). Make sure you use your actual IP which you can determine by
typing "what's my IP "  on google and following the first link.

Hope this helps.

On 3/3/07, Wayne Bragg <[EMAIL PROTECTED]> wrote:

Chuck, I can't begin to thank you enough for you reply. I know some of
these questions are borderline inappropriate for this mailing-list subject
but they, at least loosely, apply. My newbism is defiantly showing.

First, the idiot I am I didn't realize port 80 was 80 and 8080 was 8080. I thought they somehow referred to the same port, du! That explains allot of
my confusion!

With that said

>What happens if you try http://wan-ip:8080/chat-demo? Without the port
>number, you're sending the URL to something other than Tomcat that's
>listening on port 80.

this is where the confusion starts.

Your telling me to send the URL to
"http://wan-ip:8080/chat-demo";
but then you say
"you're sending the URL to something other than Tomcat that's listening on
port 80"
Here I go getting confused again, what is it 80 or 8080? Or was that just
a slip on your part? I'm going to assume the latter unless you tell me
otherwise.

Either way, I get "page not found" if I use anything other than
http://localhost:8080/chat-demo which works perfectly or I can get to it
at least run the page with  http://wan-ip/chat-demo because I have an
"Alias /chat-demo" in Apache config serving on port 80, but that's when I
get the "Chat is not defined" error.

I though maybe my provider was blocking port 8080 so I even tried
http://localhost:7077/chat-demo which my router is redirecting to 8080. That is what I have to do for Apache and that's what I was talking about
when I said
> A couple of things worth noting. I'm pretty sure my (cable)
> access provider is blocking 80 so I am forwarding ext. 7075
ext. =  web browser pointing to port 7075 and
> to int. 80 with Apache still running on 80.
int = router redirect to port 80.
I was referring to my router redirecting port 7075 to port 80.

So if I am understanding this correctly I am not getting through to the
Tomcat server from the WAN. I also can't get through to Tomcat using
http://computer-name:8080/
I can only get through using localhost:8080. I checked XP firewall and
have 7077 port (redirected to 8080) opened. Any idea why I cant get to it?

><script type='text/javascript' src='/chat-demo/dwr/engine.js'></script>
><script type='text/javascript'
src='/chat-demo/dwr/interface/Chat.js'></script>
><script type='text/javascript' src='/chat-demo/dwr/util.js'></script>
> Also, where are these files?
"They're part of the app, nothing to do with Tomcat itself."

I realize that they are part of the app. This question was because I
though maybe something to do with the paths to them was causing the error.
That's because I am not to familiar (yet) with the file/directory
structure regarding Tomcat apps directory and was able to find
><script type='text/javascript' src='/chat-demo/dwr/engine.js'></script>
><script type='text/javascript' src='/chat-demo/dwr/util.js'></script>
but not
><script type='text/javascript'
src='/chat-demo/dwr/interface/Chat.js'></script>
which is why I said
>If they are in the dwr.jar file then I am beginning to understand the
organization
>except the "src='/chat-demo/dwr/interface/Chat.js'" file isn't in that
jar.
>If it is in the chat.class file then I think I am really beginning to
understand the organization.

If this is correct then it still leads me back to I'm not getting through
to Tomcat from WAN or for some reason using my computer-name either.

> My Configuration:
> Windows XP Pro
> devside.net Web[Developer] Server Suite 1.94
> standard installation
> ASP,MYSQL,PHP (not cgi) and Tomcat5
> All are working correctly.

"If that were really true, would you be asking questions here?"

What I meant is they are all working correctly independently so to speak. They may even be working perfectly but not configured correctly to allow PHP, MySQL, ASP and Java to work on the same page at the same time which is
what I am ultimately trying to accomplish.

"Is it your router doing the forwarding? If so, external users will need
to append
:7075 to the host name or IP address to get requests delivered to
whatever is listening on port 80."

Yes it's the router doing the forwarding. I
got that and knew that. Sorry I explained it poorly.

If you mean httpd when you say "Apache",
Yes, I realize Apache Org develops both Tomcat and httpd and I was
referring to httpd when I was saying Apache (which most people do).
Again sorry for the incorrect reference.

> Can you not run Tomcat apps from the WAN?
"Of course you can. Many sites use Tomcat in all sorts of environments."

That answers that question, thanks.

> What am I missing?

"Some basic education on TCP/IP and a little history, I expect. For many
years, Tomcat was not terribly efficient at delivering static content,
so it was often front-ended with httpd, listening on port 80. The http
server would be configured to forward servlet and .jip requests to
Tomcat on port 8080, and handle the rest itself. These days, Tomcat is quite adequate for handling static content, and httpd merely gets in the way (unless you want to do other things with it, such as load-balancing
or PHP).  To run a stand-alone Tomcat, people normally set it up to
listen on port 80, thereby avoiding the need for users to explicitly
enter a port number in each URL."

This goes to the heart of the matter.
I have apps that rely heavily on PHP and MySql. I've read (see I do read, ha!) that " front-ending with httpd" is what I want to do. I know I can even
get Tomcat to handle the PHP and MySql but that is going to require
significant porting  to my apps.
Can I do both "front-ending with httpd" and add the appropriate PHP/MySql
classes and/or .jars to Tomcat therefore having both ways available?
Do you know if my "DEFAULT" Tomcat and hpptd setup from Developers.net is
setup front-ending with httpd or separate?

And again, I'm not getting through to Tomcat from WAN or for some reason
using my computer-name either. Any idea why?

Apologies for long being winded and for the previous posts naivety and
misstated acronyms and thanks again for replying to my email.
You have help answer some of my uneducated question.

Wayne


"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)



--------------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.6/709 - Release Date: 3/3/2007 8:12 AM


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



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.6/709 - Release Date: 3/3/2007 8:12 AM



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




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

Reply via email to