Problems with tomcat server hostname mapping and ant tasks...server redirect problems

2003-11-14 Thread Mike Klein
As my tomcat is behind a firewall and not publicly visible (I use Apache 
connector) I had selected localhost as the engine name and host name.

All of my tomcat functionality is working: manager, admin, jsps under 
docroot, axis, struts, blah blah.

My tomcat version is 4.1.27, and it is using an internal ip of 
192.168.1.2 and internal hostname of mother.

For some reason, when I attempt using the tomcat ant list task from a 
remote laptop, I get the message:

tools\build.xml [177] java.net.ProtocolException: Server redirected too 
many  times (20)

It doesn't work whether I give a url of http://mother:8080/manager; or 
http://192.168.1.2:8080/manager;. I have tried changing engine's 
defaultHost and host names to localhost, mother, and 192.168.1.2 
to no avail.

Yet I can remotely (via internal lan) issue the manager list command 
from any of my web browsers and it works just fine.

The following is output from catalina_ log:

2003-11-14 12:46:06 StandardEngine[Standalone]: Mapping server name 'mother'
2003-11-14 12:46:06 StandardEngine[Standalone]:  Trying a direct match
goes on 18 more times
Based on my understanding of host mapping, if request doesn't match a 
specific host name, then defaultHost property of engine is used. This 
doesn't seem to be happening though.

It seems the ant task functionality has worked before and as far I know 
I haven't made any server.xml changes that would cause it to cease 
working. It's wierd that I can invoke this same url from browser and 
data is returned.

Any ideas?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IIS ISAPI Redirect problems (was Re: context.xml question)

2003-06-18 Thread Jason Bainbridge
G'day,

You're welcome. :) In future though I suggest you post questions to the list 
and not direct to an individual you are much more likely to get help that 
way. :) (I've CC'd the list with this)

As to your problem, can you give a few more details? Is the 404 being thrown 
by IIS or Tomcat? If you're using MSIE you will have to turn off friendly 
error messages to be able to see the 404 properly in your browser, that will 
reveal where it is coming from.

Regards,
-- 
Jason Bainbridge
http://jblinux.org

On Thu, 19 Jun 2003 04:41, you wrote:
 Hi Jason,
 Thanks for answering me.

 I have several web-sites, and I'm trying to configure the isapi redirect
 for some of them, now it works for localhost, but I am having some problem
 with the other hosts?

 All the web-sites have their Jakarta Virtual Directory with the isapi
 loaded (green and up arrow), and the hosts are added in the server.xml, if
 I access them with port 8080, they work, but the redirect isn't working.

 This is my uriworker.properties:  (it is the default)
 /servlet/*=ajp13
 /examples/*=ajp13

 This is my worker.properties  (Also the default, just added the other
 hosts)

 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers=ajp13
 worker.tomcat_home=D:\Tomcat4
 worker.java_home=C:\j2sdk1.4.0
 ps=#
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.host=mydomain.com
 worker.ajp13.host=myotherdomain.com
-- 
Jason Bainbridge
http://jblinux.org
 My registry is fine, because the redirect is working for the localhost.

 I'm trying this configuration and it isn't working, (error 404) do you know
 what could be causing this?

 Thanks
 Jose Oyervides.



 -Original Message-
 From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 12:24 PM
 To: Tomcat Users List
 Subject: Re: context.xml question

 On Thu, 19 Jun 2003 01:15, Jose Santiago Oyervides Gonzalez wrote:
  I've tried:
  Host name=mydomain.com debug=0 appBase=e:\webapps
  unpackWARs=true

 Try a forward slash instead ie. e:/webapps or maybe a double backslash.

 Also is e: drive a local or network drive? If it is a Network drive you
 will

 need to use it's UNC name and the user that is running Tomcat will need
 access to the network ie. LocalSystem for an NT service won't work.

 Regards,


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: IIS ISAPI Redirect problems (was Re: context.xml question)

2003-06-18 Thread Jose Santiago Oyervides Gonzalez
OK,
I'm having error 404, with MSIE, setting as proxy the server IP, port 80,
this way I can access the domains as they are been served in the machine.
I'm not doing this in production yet. I have the friendly error messages
turned off. BTW, If a access my domain setting the IE with server IP, port
8080 they all work.

In my IIS logs, I see error 404,( GET /examples/jsp - 404) like the requests
isn't passed to the isapi_redirector.dll, this is happening in the other
domains, default web site shows the hits of the isapi.

On the other hand, my isapi.log is showing this: (every time I access the
error)


jk_isapi_plugin.c (657)]: HttpFilterProc started
[jk_isapi_plugin.c (705)]: In HttpFilterProc Virtual Host redirection of
/some.mydomain.comhttp://some.mydomain.com/examples/jsp
 [jk_uri_worker_map.c (447)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (464)]: Attempting to map URI
'/some.mydomain.comhttp://some.mydomain.com/examples/jsp'
 [jk_uri_worker_map.c (570)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match
 [jk_isapi_plugin.c (711)]: In HttpFilterProc test Default redirection of
http://some.mydomain.com/examples/jsp
 [jk_uri_worker_map.c (447)]: Into jk_uri_worker_map_t::map_uri_to_worker
 [jk_uri_worker_map.c (566)]: In jk_uri_worker_map_t::map_uri_to_worker,
wrong parameters
 [jk_uri_worker_map.c (570)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match
 [jk_isapi_plugin.c (775)]: HttpFilterProc
[http://some.mydomain.com/examples/jsp] is not a servlet url
 [jk_isapi_plugin.c (784)]: HttpFilterProc check if
[http://some.mydomain.com/examples/jsp] is points to the web-inf directory

I am replacing the real domain for some.mydomain.com, to avoid me problems.

My system:   W2K-IIS5, Tomcat 4.0.6. My uriworker.properties and
worker.properties are in the past mail.

Regards.
Jose Oyervides.

-Original Message-
From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 3:53 PM
To: Jose Santiago Oyervides Gonzalez
Cc: [EMAIL PROTECTED]
Subject: IIS ISAPI Redirect problems (was Re: context.xml question)


G'day,

You're welcome. :) In future though I suggest you post questions to the list

and not direct to an individual you are much more likely to get help that 
way. :) (I've CC'd the list with this)

As to your problem, can you give a few more details? Is the 404 being thrown

by IIS or Tomcat? If you're using MSIE you will have to turn off friendly 
error messages to be able to see the 404 properly in your browser, that will

reveal where it is coming from.

Regards,
-- 
Jason Bainbridge
http://jblinux.org

On Thu, 19 Jun 2003 04:41, you wrote:
 Hi Jason,
 Thanks for answering me.

 I have several web-sites, and I'm trying to configure the isapi redirect
 for some of them, now it works for localhost, but I am having some problem
 with the other hosts?

 All the web-sites have their Jakarta Virtual Directory with the isapi
 loaded (green and up arrow), and the hosts are added in the server.xml, if
 I access them with port 8080, they work, but the redirect isn't working.

 This is my uriworker.properties:  (it is the default)
 /servlet/*=ajp13
 /examples/*=ajp13

 This is my worker.properties  (Also the default, just added the other
 hosts)

 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers=ajp13
 worker.tomcat_home=D:\Tomcat4
 worker.java_home=C:\j2sdk1.4.0
 ps=#
 worker.list=ajp13
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.host=mydomain.com
 worker.ajp13.host=myotherdomain.com
-- 
Jason Bainbridge
http://jblinux.org
 My registry is fine, because the redirect is working for the localhost.

 I'm trying this configuration and it isn't working, (error 404) do you
know
 what could be causing this?

 Thanks
 Jose Oyervides.



 -Original Message-
 From: Jason Bainbridge [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 12:24 PM
 To: Tomcat Users List
 Subject: Re: context.xml question

 On Thu, 19 Jun 2003 01:15, Jose Santiago Oyervides Gonzalez wrote:
  I've tried:
  Host name=mydomain.com debug=0 appBase=e:\webapps
  unpackWARs=true

 Try a forward slash instead ie. e:/webapps or maybe a double backslash.

 Also is e: drive a local or network drive? If it is a Network drive you
 will

 need to use it's UNC name and the user that is running Tomcat will need
 access to the network ie. LocalSystem for an NT service won't work.

 Regards,

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect problems?

2001-07-06 Thread Pär-Joel Utsi

Hello Tomcat/Jakarta/Apache

I am experiencing some weird problems with my web server setup.
My system configuration is:

Windows 2000 server
IIS 5.0
Jakarta Tomcat 3.2.2
MS SQL 2000
Avenir aveConnect JDBC-driver 2.4M (developer verison)

I have built an insert post page in MM Dreaweaver Ultradev 4.0 with a
standard html form (texfields and a submitm button) and a jdbc connection.
After the submit button is activated and the form data is inserted (which
works great) I have added an jsp redirect command, and it is here the
weirdness starts.

The redirect function (
response.sendRedirect(response.encodeRedirectURL(MM_editRedirectUrl)); )
doesn't seem to work if the page contains a lot of html code. 

With only the form tags bodyform.../form/body the redirect-command
works just fine.

But when nestling the form tag with tables and other formatting html code
the redirect seems to break down. After pressing the submit button, the URL
changes as it should and the new page is displayed, only BELOW parts of the
old (form) page. How much of the old page that is included after the
redirect-command is dependent on the amount of html code ob the form page.

Does this make any sense at all? I have spent 3 days trying back and forth
with tomacat conf-files and IIS settings and so on.

Best regards, PJ Utsi - Gothenburg Sweden



Strange redirect problems with non-existent /servlets/ JkMount

2000-12-19 Thread Cato, Christopher

I have run into a strange little problem. I have a web application
consisting of 40 servlets. In the servlet code a good deal of redirects are
going on between the servlets. All redirects are pointed towards
"/app01/servlet/servletx".
The only apps that are configured except the /app01 are /example, /test and
/admin.

The problem is that some of the redirections that are supposed to go to
'/app01/servlet/servletx/' go to '/servlets/servletx' instead. 

I've checked all the code, and there are no references to /servlets/
anywhere... So, I'm kind of stuck here...
I used to have a '/servlets' JkMount directive in httpd.conf, but not
anymore Nothing in server.xml or web.xml either... What's going on here?
Where does that /servlets/ come from?

Is it possible to turn on debugging of the redirectHandler? If so, where?


Mvh / Regards

Christopher Cato [EMAIL PROTECTED]
Rational Software Nordic AB / ECAT - Ericsson Corporate Account Team 



Re: Strange redirect problems with non-existent /servlets/ JkMount

2000-12-19 Thread David Bussenschutt

I don't know if it's related, but I had a similar problem with weird
persistence of things that shouldn't persist after a restart, and found
that clearing out the $TOMCAT_HOME/work folder solved this:

$TOMCAT_HOME/conf/tomcat.sh stop
rm -rf $TOMCAT_HOME/work/*
$TOMCAT_HOME/conf/tomcat.sh start

Anyone else have this sort of problem?

David.

P.S. I'm not a java programmer, or a tomcat developer, so I can't tell you
why it worked, but it did.


At 10:57 PM 12/19/00 +0100, you wrote:
I have run into a strange little problem. I have a web application
consisting of 40 servlets. In the servlet code a good deal of redirects are
going on between the servlets. All redirects are pointed towards
"/app01/servlet/servletx".
The only apps that are configured except the /app01 are /example, /test and
/admin.

The problem is that some of the redirections that are supposed to go to
'/app01/servlet/servletx/' go to '/servlets/servletx' instead. 

I've checked all the code, and there are no references to /servlets/
anywhere... So, I'm kind of stuck here...
I used to have a '/servlets' JkMount directive in httpd.conf, but not
anymore Nothing in server.xml or web.xml either... What's going on here?
Where does that /servlets/ come from?

Is it possible to turn on debugging of the redirectHandler? If so, where?


Mvh / Regards

Christopher Cato [EMAIL PROTECTED]
Rational Software Nordic AB / ECAT - Ericsson Corporate Account Team 




David Bussenschutt  Email: [EMAIL PROTECTED]
Senior Computing Support Officer  Systems Administrator/Programmer
Location: Griffith University. Information Technology Services
  Brisbane Qld. Aust.  (TEN bldg. rm 1.33) Ph: (07)38757079




AW: redirect problems?

2000-10-30 Thread Amrhein, Thomas

Do you make a return after the sendRedirect?
...
response.sendRedirect("/checkout2.jsp");
return;
...

Otherwise, the output of checkout2.jsp is added (and not a 'new' output).

Hint: Call sendRedirect before you make any output!!!


-Ursprüngliche Nachricht-
Von: jim [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 27. Oktober 2000 18:41
An: [EMAIL PROTECTED]
Betreff: redirect problems?

Hi,
We are using Apache 1.3.12 with Tomcat 3.1 and experiencing weird problems.

1. checkout.jsp (FORM collecting new user info)
   - POSTs to checkout_eng1.jsp

2. checkout_eng1.jsp
 - adds user from #1 and does a response.sendRedirect("/checkout2.jsp");

3. checkout2.jsp shows the next FORM asking for mailing address information


Weird Symptom #1
--
On any version of Internet Explorer (never on netscape) the POST to step #2
above fails and up comes this IE error "cannot find server or DNS error"
which
leads me to beleive that the response.sendredirect() is doing something odd,
maybe not sending back the correct http location header or something

If you immediatly hit the browsers back button and re-submit the form, it
then
works with no problem and as expected. This only seems to occur the first
time
submitting forms to a page that re-directs after an operation.

Weird Symptom #2

occasionally on Internet Explorer AND Netscape.
User submits info from form #1 above (checkout.jsp), their information is
added
to the database and they are redirected to checkout2.jsp, HOWEVER what is
shown
on checkout2.jsp is BOTH the previous pages contents (checkout.jsp) AND the
expected contents of checkout2.jsp with a visible HTTP response header
printed
out in between checkout.jsp's contents and checkout2.jsp's contents ALL on
visible on the URL checkout2.jsp

Anyone have any ideas? I tried checking the bug database but it appears to
be
down.



Re: AW: redirect problems?

2000-10-30 Thread ok

yeah, I have returns, why does this do this, there is no documentation in the
JSP spec saying i have to do returns after a redirect. Is this a bug in tomcat?

On Mon, 30 Oct 2000, you wrote:
 Do you make a return after the sendRedirect?
 ...
 rresponse.sendRedirect("/checkout2.jsp");
 return;
 ...
 
 Otherwise, the output of checkout2.jsp is added (and not a 'new' output).
 
 Hint: Call sendRedirect before you make any output!!!
 
 
 -Ursprüngliche Nachricht-
 Von: jim [mailto:[EMAIL PROTECTED]]
 Gesendet am: Freitag, 27. Oktober 2000 18:41
 An: [EMAIL PROTECTED]
 Betreff: redirect problems?
 
 Hi,
 We are using Apache 1.3.12 with Tomcat 3.1 and experiencing weird problems.
 
 1. checkout.jsp (FORM collecting new user info)
- POSTs to checkout_eng1.jsp
 
 2. checkout_eng1.jsp
  - adds user from #1 and does a response.sendRedirect("/checkout2.jsp");
 
 3. checkout2.jsp shows the next FORM asking for mailing address information
 
 
 Weird Symptom #1
 --
 On any version of Internet Explorer (never on netscape) the POST to step #2
 above fails and up comes this IE error "cannot find server or DNS error"
 which
 leads me to beleive that the response.sendredirect() is doing something odd,
 maybe not sending back the correct http location header or something
 
 If you immediatly hit the browsers back button and re-submit the form, it
 then
 works with no problem and as expected. This only seems to occur the first
 time
 submitting forms to a page that re-directs after an operation.
 
 Weird Symptom #2
 
 occasionally on Internet Explorer AND Netscape.
 User submits info from form #1 above (checkout.jsp), their information is
 added
 to the database and they are redirected to checkout2.jsp, HOWEVER what is
 shown
 on checkout2.jsp is BOTH the previous pages contents (checkout.jsp) AND the
 expected contents of checkout2.jsp with a visible HTTP response header
 printed
 out in between checkout.jsp's contents and checkout2.jsp's contents ALL on
 visible on the URL checkout2.jsp
 
 Anyone have any ideas? I tried checking the bug database but it appears to
 be
 down.