You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris <ch...@taylor.com> on 2004/04/02 18:55:49 UTC

problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Thanks Tom,

That all looks interesting.  What I have done for the
<html:link="/action..." page tags is removed the "/" from the front so when
it adds a / it becomes correct instead of adding a second slash ie //action.
The only problem is that the buttons do not work since they are within a
form tag and in the <html:form struts tag the action attribute doesn't
require a / before the action mapping.  I may just have to eliminate all
buttons and use links.  But I hope not.

About the base path, that's the other interesting thing, the extra slash is
added there as well, for example for the product.jsp page the base path is
http://www.companyname.com//pages/product.jsp instead of
http://www.companyname.com/pages/product.jsp

c.



-----Original Message-----
From: Tom K [mailto:tkoc@cox.net] 
Sent: Friday, April 02, 2004 12:11 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

Hi Chris,

	Frames are very inconsistent on different browser, so most
developers try to avoid them. With that said, some times you have to
"tune" you path to work with the classpath.

First of all see where your path is pointing to by use a few commands
e.g.

String path = request.getContextPath();
System.out.println("The path in SearchResultsPage is " + path);
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerP
ort()+path+"/";

If you are using a jsp, simply enclose the above code in <% %>

Now that you know your path info, the next thing to do is determine if
you can make it all work together by "tuning" your path info.

For example, when viewing your source code html out put, look at the
path, sometime, you need to ad a ../myPath to go "back a directory!

Now other times (I don't know exactly what your working with, so excuse
my ignorance) you may have to have a base path set up so all you
"relative" path information can be base on that. For example you may
need to ad code such as this:

<BASE
HREF=<%=request.getScheme()+"://"+request.getServerName()+":"+request.ge
tServerPort()+path+"/" %>>

which gives you a "base" path to work off of.


Any ways...good luck,


Tom Kochanowicz





-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am
experiencing
is that when I go to a page that loads a new frameset all of my links
and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are
all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/"
is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat
standalone no
apache involved) onto a linux box.  The problem does not occur when I
test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Tom K <tk...@cox.net>.
Hi Chris,

	Frames are very inconsistent on different browser, so most
developers try to avoid them. With that said, some times you have to
"tune" you path to work with the classpath.

First of all see where your path is pointing to by use a few commands
e.g.

String path = request.getContextPath();
System.out.println("The path in SearchResultsPage is " + path);
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerP
ort()+path+"/";

If you are using a jsp, simply enclose the above code in <% %>

Now that you know your path info, the next thing to do is determine if
you can make it all work together by "tuning" your path info.

For example, when viewing your source code html out put, look at the
path, sometime, you need to ad a ../myPath to go "back a directory!

Now other times (I don’t know exactly what your working with, so excuse
my ignorance) you may have to have a base path set up so all you
"relative" path information can be base on that. For example you may
need to ad code such as this:

<BASE
HREF=<%=request.getScheme()+"://"+request.getServerName()+":"+request.ge
tServerPort()+path+"/" %>>

which gives you a "base" path to work off of.


Any ways...good luck,


Tom Kochanowicz





-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am
experiencing
is that when I go to a page that loads a new frameset all of my links
and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are
all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/"
is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat
standalone no
apache involved) onto a linux box.  The problem does not occur when I
test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Are there any benefits to doing it that way?  I am using tomcat standalone
and serving out on prot809, not integrating it in with apache.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:47 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

Hi,

If the DNS is configured for that host, then yeah, you can use it instead of
the
"localhost".  But then you have to change all your <host> to use the same
hostname. 

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:34 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


It does.  Thanks Yan!

What should I specify as my defaultHost in the Engine element?  And the name
in the Host element?

<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

should I make defaultHost and name the actual url of the application?  ie
www.myApp.com?

<Engine name="Catalina" defaultHost="www.myApp.com" debug="0">

  <Host name="www.myApp.com" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

What exactly happens when you do this?  Does tomcat look in your hosts file
to see where the domain name is mapped?   The documentation is a little bit
unclear for me.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:22 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

ok, whatever you specify in your path is the context path.  if you don't
want to
have the context been part of your request URL(i.e.,
www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the
path="".
But if your server is serving more that one webapps, the implication of this
is
that all other requests that are not assigned to other contexts will be
processed using this "default" context.  

So if you only run one web application, there is nothing to worry about.  If
you
are running multiple web applications, then this is a good place to catch
those
unassigned requests.  

Hope this helps:).

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Hey Yan, 

Changing the path to "" instead of "/" fixed everything.

Thanks! 

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:47 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

Hi,

If the DNS is configured for that host, then yeah, you can use it instead of
the
"localhost".  But then you have to change all your <host> to use the same
hostname. 

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:34 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


It does.  Thanks Yan!

What should I specify as my defaultHost in the Engine element?  And the name
in the Host element?

<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

should I make defaultHost and name the actual url of the application?  ie
www.myApp.com?

<Engine name="Catalina" defaultHost="www.myApp.com" debug="0">

  <Host name="www.myApp.com" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

What exactly happens when you do this?  Does tomcat look in your hosts file
to see where the domain name is mapped?   The documentation is a little bit
unclear for me.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:22 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

ok, whatever you specify in your path is the context path.  if you don't
want to
have the context been part of your request URL(i.e.,
www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the
path="".
But if your server is serving more that one webapps, the implication of this
is
that all other requests that are not assigned to other contexts will be
processed using this "default" context.  

So if you only run one web application, there is nothing to worry about.  If
you
are running multiple web applications, then this is a good place to catch
those
unassigned requests.  

Hope this helps:).

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Yansheng Lin <ya...@silvacom.com>.
Hi,

If the DNS is configured for that host, then yeah, you can use it instead of the
"localhost".  But then you have to change all your <host> to use the same
hostname. 

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:34 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


It does.  Thanks Yan!

What should I specify as my defaultHost in the Engine element?  And the name
in the Host element?

<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

should I make defaultHost and name the actual url of the application?  ie
www.myApp.com?

<Engine name="Catalina" defaultHost="www.myApp.com" debug="0">

  <Host name="www.myApp.com" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

What exactly happens when you do this?  Does tomcat look in your hosts file
to see where the domain name is mapped?   The documentation is a little bit
unclear for me.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:22 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

ok, whatever you specify in your path is the context path.  if you don't
want to
have the context been part of your request URL(i.e.,
www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the
path="".
But if your server is serving more that one webapps, the implication of this
is
that all other requests that are not assigned to other contexts will be
processed using this "default" context.  

So if you only run one web application, there is nothing to worry about.  If
you
are running multiple web applications, then this is a good place to catch
those
unassigned requests.  

Hope this helps:).

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
It does.  Thanks Yan!

What should I specify as my defaultHost in the Engine element?  And the name
in the Host element?

<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

should I make defaultHost and name the actual url of the application?  ie
www.myApp.com?

<Engine name="Catalina" defaultHost="www.myApp.com" debug="0">

  <Host name="www.myApp.com" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

What exactly happens when you do this?  Does tomcat look in your hosts file
to see where the domain name is mapped?   The documentation is a little bit
unclear for me.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 1:22 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

ok, whatever you specify in your path is the context path.  if you don't
want to
have the context been part of your request URL(i.e.,
www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the
path="".
But if your server is serving more that one webapps, the implication of this
is
that all other requests that are not assigned to other contexts will be
processed using this "default" context.  

So if you only run one web application, there is nothing to worry about.  If
you
are running multiple web applications, then this is a good place to catch
those
unassigned requests.  

Hope this helps:).

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Yansheng Lin <ya...@silvacom.com>.
ok, whatever you specify in your path is the context path.  if you don't want to
have the context been part of your request URL(i.e., www.mycompany.com/action.do
instead of www.mycompany.com/myapp/action.do), then you can specify the path="".
But if your server is serving more that one webapps, the implication of this is
that all other requests that are not assigned to other contexts will be
processed using this "default" context.  

So if you only run one web application, there is nothing to worry about.  If you
are running multiple web applications, then this is a good place to catch those
unassigned requests.  

Hope this helps:).

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 1:03 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying <Context path="" docBase="myApp"/>

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context
path=""
docBase="myApp"/>, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Yansheng Lin <ya...@silvacom.com>.
I am not sure about <Context path="/" docBase="myApp"/>.

I think if you try <Context path="/myApp" docBase="myApp"/>, the container will
append a / to the path, i.e., /myApp/***.do.  But if you use <Context path=""
docBase="myApp"/>, then that's the default webapp path, which is not something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
<Engine name="Catalina" defaultHost="localhost" debug="0">

  <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNameSpaceAware="false">

     <Context path="/" docBase="myApp"/>

  </Host>
</Engine>

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-----Original Message-----
From: Yansheng Lin [mailto:yansheng.lin@silvacom.com] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



---------------------------------------------------------------------
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


RE: problem with url - extra / appended before action

Posted by Yansheng Lin <ya...@silvacom.com>.
it's hard to say what's causing the problem exactly without knowing your context
and your action-mappings.  maybe in your action mapping, you have one extra / in
front.  and tomcat would add that to the requestURL?

-Yan

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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


RE: problem with url - extra / appended before action

Posted by Chris <ch...@taylor.com>.
Sorry, I made a mistake in my previous post.  I end up losing the domain
name in the link i.e I get http://action.do?parameter=blah instead of
Http://www.companyname.com/action.do?parameter=blah.  When I look at the
page source, the href attribute becomes href="//action.do" instead of
href="/action.do".  And yes, I am using struts 1.1.

c.

-----Original Message-----
From: Chris [mailto:chuisman@taylor.com] 
Sent: Friday, April 02, 2004 9:56 AM
To: tomcat-user@jakarta.apache.org
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra "/"  before the action name:
www.companyname.com//action.do?parameter=blah
<http://www.companyname.com/action.do?parameter=blah>  .  This extra "/" is
also found in the <base href="."/> element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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