tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom K" <t...@cox.net>
Subject RE: problem with url - extra / appended before action
Date Fri, 02 Apr 2004 19:11:17 GMT
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


Mime
View raw message