Re: html:base/ tag

2003-09-22 Thread Adam Hardy
The HTML base tag tells the browser where it should resolve relative 
URLs from. The struts taglib will create it for you.

Alternately you can put html:rewrite around all your relative links.

Adam

On 09/22/2003 07:50 AM Kalra, Ashwani wrote:
hi,
I could not understand the use of base tag from the example.  Can any one
explain ?
 
 

Regds 
Ashwani Kalra 
http://www.geocities.com/ashwani_kalra
http://www.geocities.com/ashwani_kalra  


This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst  Young Group. It is intended only
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:base tag

2002-12-16 Thread David Graham
What version of Struts are you using?  The recent html:base code looks ok. 
 It just constructs the url from request.getRequestURI().  What do your 
image paths look like?

David






From: Amit Badheka [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: html:base tag
Date: Tue, 17 Dec 2002 11:30:31 +0530

HI All,

I have a problem with displaying images in my jsp page. I am giving 
relative path in the page. If I call the page directly it shows the images.
But If I call the page from struts Template then it is not showing any 
images.

i have a dir structure like -

common\
 template.jsp
jsp\
   somefolder\
header.jsp
container.jsp (struts template definition)

if I calls header directly it shows the images. But if I calls 
container.jsp (which puts the header.jsp) then it is not showing any 
images.
I am also putting the html:base / tag in each page.
what I observed is that my generated html code contains base tag as below , 
but-
base 
href=http://localhost:7001/ManageStyle/jsp/ecatalogManageStartPage.jsp;
it should be like -
base 
href=http://localhost:7001/ManageStyle/jsp/ecatalog/ManageStartPage.jsp;
   
^
   
||


please help.

AB.



_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: html:base tag

2002-12-16 Thread Amit Badheka
I am using 1.1b2 version. and, I know it works fine.
I used it in my earlier application.

But i don't know whay it is generating url like this.

My image path is relative path. So it looks like ../../images/abc.gif.

Amit.


- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 11:47 AM
Subject: Re: html:base tag


 What version of Struts are you using?  The recent html:base code looks
ok.
   It just constructs the url from request.getRequestURI().  What do your
 image paths look like?

 David






 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: html:base tag
 Date: Tue, 17 Dec 2002 11:30:31 +0530
 
 HI All,
 
 I have a problem with displaying images in my jsp page. I am giving
 relative path in the page. If I call the page directly it shows the
images.
 But If I call the page from struts Template then it is not showing any
 images.
 
 i have a dir structure like -
 
 common\
   template.jsp
 jsp\
 somefolder\
  header.jsp
  container.jsp (struts template definition)
 
 if I calls header directly it shows the images. But if I calls
 container.jsp (which puts the header.jsp) then it is not showing any
 images.
 I am also putting the html:base / tag in each page.
 what I observed is that my generated html code contains base tag as below
,
 but-
  base
 href=http://localhost:7001/ManageStyle/jsp/ecatalogManageStartPage.jsp;
 it should be like -
  base

href=http://localhost:7001/ManageStyle/jsp/ecatalog/ManageStartPage.jsp;
 
  ^
 
  ||
 
 
 please help.
 
 AB.
 


 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*
 http://join.msn.com/?page=features/junkmail


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





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




Re: html:base tag

2002-12-16 Thread David Graham
You could try using the html:img tag:
http://jakarta.apache.org/struts/userGuide/struts-html.html#img

David







From: Amit Badheka [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: html:base tag
Date: Tue, 17 Dec 2002 12:03:29 +0530

I am using 1.1b2 version. and, I know it works fine.
I used it in my earlier application.

But i don't know whay it is generating url like this.

My image path is relative path. So it looks like ../../images/abc.gif.

Amit.


- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 11:47 AM
Subject: Re: html:base tag


 What version of Struts are you using?  The recent html:base code looks
ok.
   It just constructs the url from request.getRequestURI().  What do your
 image paths look like?

 David






 From: Amit Badheka [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: html:base tag
 Date: Tue, 17 Dec 2002 11:30:31 +0530
 
 HI All,
 
 I have a problem with displaying images in my jsp page. I am giving
 relative path in the page. If I call the page directly it shows the
images.
 But If I call the page from struts Template then it is not showing any
 images.
 
 i have a dir structure like -
 
 common\
   template.jsp
 jsp\
 somefolder\
  header.jsp
  container.jsp (struts template definition)
 
 if I calls header directly it shows the images. But if I calls
 container.jsp (which puts the header.jsp) then it is not showing any
 images.
 I am also putting the html:base / tag in each page.
 what I observed is that my generated html code contains base tag as 
below
,
 but-
  base
 
href=http://localhost:7001/ManageStyle/jsp/ecatalogManageStartPage.jsp;
 it should be like -
  base

href=http://localhost:7001/ManageStyle/jsp/ecatalog/ManageStartPage.jsp;
 
  ^
 
  ||
 
 
 please help.
 
 AB.
 


 _
 The new MSN 8: advanced junk mail protection and 2 months FREE*
 http://join.msn.com/?page=features/junkmail


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





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


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: html:base tag and tiles?

2002-06-21 Thread Cedric Dumoulin


  Hello,

  Maybe we can extend / enhance the base tag to provide such behavior.
   An idea is to add an optional attribute path. If this attribute is
specified, base output the root URL of current web application context,
concatenated with  the specified path. If path is set to  or /, the base
output the root URL of current web application.

  This behavior is interesting when using template, tiles or include. It allows
to specify in a layout the base URL to be used by browsers, independently of
tiles jsp (or layout) locations.

  Is there some objections or comments ?

Cedric

Holman, Cal wrote:

 Byrne  I had a similar issue with the template layout being a sub
 directory.  This is not as elegant as the html:base tag but works.  I
 forward to definitions not .jsp.

 base href=http://%=
 request.getServerName()%:%=request.getServerPort()%
 %=request.getContextPath()%/

 Cal

 -Original Message-
 From: Byrne, Steven [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 19, 2002 13:44
 To: [EMAIL PROTECTED]
 Subject: html:base tag and tiles?

 I'm using tiles for my primary page definition, and I've chosen to put
 my common tiles building blocks into a web space subdirectory
 called tiles, including my main layout tile.  When I try to use the
 html:base tag to define the default URLs for my web pages, it refers,
 naturally enough to the tiles subdirectory since that's where the main
 tile lives.

 What I'm looking for is a way to get the base element that's emitted
 to refer to the top of the web space, i.e. http://localhost:8080/app/
 and not http://localhost:8080/app/tiles.

 Of course, I could put the mainLayout.jsp in the top directory, but I
 had really wanted to factor the basic tiles definitions into their own
 directory

 Has anyone run into and solved this problem?

 Steve

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


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




RE: html:base tag and tiles?

2002-06-20 Thread Holman, Cal

Byrne  I had a similar issue with the template layout being a sub
directory.  This is not as elegant as the html:base tag but works.  I
forward to definitions not .jsp.


base href=http://%=
request.getServerName()%:%=request.getServerPort()%
%=request.getContextPath()%/


Cal

-Original Message-
From: Byrne, Steven [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 19, 2002 13:44
To: [EMAIL PROTECTED]
Subject: html:base tag and tiles?

I'm using tiles for my primary page definition, and I've chosen to put
my common tiles building blocks into a web space subdirectory
called tiles, including my main layout tile.  When I try to use the
html:base tag to define the default URLs for my web pages, it refers,
naturally enough to the tiles subdirectory since that's where the main
tile lives.

What I'm looking for is a way to get the base element that's emitted
to refer to the top of the web space, i.e. http://localhost:8080/app/
and not http://localhost:8080/app/tiles. 

Of course, I could put the mainLayout.jsp in the top directory, but I
had really wanted to factor the basic tiles definitions into their own
directory

Has anyone run into and solved this problem?

Steve

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