FYI problem solved,In case some other newbie has the same problem, I've decided to add this message to the list. I solved my problem of not being able to access the tomcat server functions through anything other than localhost:8080. The problem was a misunderstanding of how the httpd server and tomcat, both native server and jk connector, were configured and accessed. In the default setup of devside.net Web[Developer] Server Suite 1.94, it install tomcat native server and a jk connector through httpd (commonly referred to as Apache Server). To connect to tomcat native server you use localhost:8080. It appears nothing else will connect to the native server the way it is configured. If you want to connect to tomcat from outside localhost, even with computer-name you have to go through the jk connector. Which means using ip-or-computer-name:80. The confusion came when doing this gave me a "$variable not defined" error upon the served starting. This was caused by the <served> and <served-mapping> being in the wrong file or not there at all. I don't know where it was I just know when I discoverd it and put it in /conf/web.xml or /app-program/WEB-INF/web.xml it all came together. Thanks for all the help and suggestions. It contributed to me being able to figure this problem out.
This left me with a question -Is there any reason other than convenience and amount of apps using it that you would want to put a related jar, <servlet> and <servlet mapping> in the local application folders over the higher level config and common folders?
As far as the----- Original Message ----- From: "Wayne Bragg" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org> Sent: Saturday, March 03, 2007 10:00 PM Subject: Re: DWR using WAN vs LAN
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 LANYou 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 defaultyou 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 computerfrom 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 (notrecommended). Make sure you use your actual IP which you can determine bytyping "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.94standard 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) andPHP then you'll have to manage two separate sessions, though that shouldn'tbe 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 readthrough 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 howyou send up your application. Apache's mod_jk is how you make Apache andtomcat 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 computerfrom 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 (notrecommended). Make sure you use your actual IP which you can determine bytyping "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 ofthese questions are borderline inappropriate for this mailing-list subjectbut 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 ofmy 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 onport 80"Here I go getting confused again, what is it 80 or 8080? Or was that justa 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 thanhttp://localhost:8080/chat-demo which works perfectly or I can get to itat 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 Iget 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 aboutwhen 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 andhave 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 Ithough 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 >thatjar. >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 throughto 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 iswhat I am ultimately trying to accomplish."Is it your router doing the forwarding? If so, external users will needto 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 manyyears, 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 isquite adequate for handling static content, and httpd merely gets in theway (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 evenget 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/MySqlclasses and/or .jars to Tomcat therefore having both ways available?Do you know if my "DEFAULT" Tomcat and hpptd setup from Developers.net issetup front-ending with httpd or separate?And again, I'm not getting through to Tomcat from WAN or for some reasonusing 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] -- 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]