tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashirvad Uniyal <ashirvad.uni...@bmpg.pl>
Subject Re: URL Redirection
Date Fri, 22 Sep 2006 10:54:48 GMT
Hello,

The images that are referenced using the '.' current directory operator 
are visible when the folder is renamed ROOT but not the other images for 
example please look for the src="/jpivot/toolbar/cube-up.png" in the 
page source.

I want to reference these images aswell with the '.' operator but iam 
unable to change testpage.jsp as it uses the Window Component Framework 
(wcf). Could you please suggest how can i change the path in the 
testpage.jsp.

Thanks and regards,
-Ash


David Smith wrote:
> I see the gif image is the only one referenced using the '.' current 
> directory operator.  I've found it better to code image urls as 
> "${pageContext.request.contextPath}/images/zapisz.gif".  This will 
> render the full path relative to the site and will also change 
> automatically as the webapp's context path changes.
>
> --David
>
> Ashirvad Uniyal wrote:
>> David Smith wrote:
>>> Ok. Can you offer a code snippet showing where you compose the url 
>>> to the gif image?
>>>
>>> --David
>>>
>>> Ashirvad Uniyal wrote:
>>>> Hello,
>>>>
>>>> If the application is renamed say for example "Test" or anything, 
>>>> everything works fine and the gif appear but they
>>>> just vanish if the application is renamed as ROOT.
>>>>
>>>> Regards,
>>>> Ash
>>>>
>>>> Caldarale, Charles R wrote:
>>>>>> From: Ashirvad Uniyal [mailto:ashirvad.uniyal@bmpg.pl] Subject: 
>>>>>> Re: URL Redirection
>>>>>>
>>>>>> I renamed the application to ROOT and everything works fine 
>>>>>> except that all the images (gif) have all together vanished
>>>>>
>>>>> How are you referencing the images? Do you have a hard-coded URL 
>>>>> in the
>>>>> generated HTML?
>>>>>
>>>>> - Chuck
>>>>>
>>>>>
>>>>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
>>>>> PROPRIETARY
>>>>> MATERIAL and is thus for use only by the intended recipient. If you
>>>>> received this in error, please contact the sender and delete the 
>>>>> e-mail
>>>>> and its attachments from all computers.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>> Hello,
>>
>> After spending long time understanding this project i still have no 
>> clue.
>>
>> All logic is contained in one file, testpage.jsp. Despite of the size 
>> of the application, this file is a relatively small file. It was 
>> possible to achieve through the Window Component Framework (WCF). 
>> This framework is a set of tags, which enables developing short 
>> application code based on JSP.
>>
>> I have problem understanding the testpage.jsp and modifing it. Please 
>> find the snippet of the page souce of testpage.jsp, and the code of 
>> testpage.jsp respectively
>>
>>
>>
>>
>> <table border="0" cellspacing="0" cellpadding="0" style="width:100%">
>> <tr><td class="lewa lewa_listwa" valign="middle" style="height:45px">
>>
>> <table border="0" cellspacing="0" cellpadding="0"><tr valign="middle">
>> <td style="padding-left:10px">
>> <table border="0" cellspacing="1" cellpadding="0" 
>> id="toolbar01"><tr><td><input type="image" 
>> name="toolbar01.cubeNaviButton" src="/jpivot/toolbar/cube-up.png" 
>> border="0" title="Open OLAP Navigator" width="24" 
>> height="24"></td><td><input type="image" 
>> name="toolbar01.mdxEditButton" src="/jpivot/toolbar/mdx-edit-up.png" 
>> border="0" title="Show MDX Editor" width="24" 
>> height="24"></td><td><input type="image" 
>> name="toolbar01.sortConfigButton" 
>> src="/jpivot/toolbar/sort-asc-up.png" border="0" title="Config OLAP 
>> Table" width="24" height="24"></td><td><div style="width: 
>> 1ex"></div></td><td><input type="image" name="toolbar01.levelStyle"

>> src="/jpivot/toolbar/level-style-up.png" border="0" title="Show 
>> Parent Members" width="24" height="24"></td><td><input type="image"

>> name="toolbar01.hideSpans" src="/jpivot/toolbar/hide-spans-up.png" 
>> border="0" title="Hide Spans" width="24" height="24"></td><td><input

>> type="image" name="toolbar01.propertiesButton" 
>> src="/jpivot/toolbar/properties-up.png" border="0" title="Show 
>> Properties" width="24" height="24"></td><td><input type="image"

>> name="toolbar01.nonEmpty" src="/jpivot/toolbar/non-empty-down.png" 
>> border="0" title="Suppress Empty Rows / Columns" width="24" 
>> height="24"></td><td><input type="image" name="toolbar01.swapAxes"

>> src="/jpivot/toolbar/swap-axes-up.png" border="0" title="Swap Axes" 
>> width="24" height="24"></td><td><div style="width: 
>> 1ex"></div></td><td><input type="image" name="toolbar01.drillMember"

>> src="/jpivot/toolbar/navi-member-up.png" border="0" title="Drill 
>> Member" width="24" height="24"></td><td><input type="image" 
>> name="toolbar01.drillPosition" 
>> src="/jpivot/toolbar/navi-position-down.png" border="0" title="Drill 
>> Position" width="24" height="24"></td><td><input type="image" 
>> name="toolbar01.drillReplace" 
>> src="/jpivot/toolbar/navi-replace-up.png" border="0" title="Drill 
>> Replace" width="24" height="24"></td><td><input type="image" 
>> name="toolbar01.drillThrough01" 
>> src="/jpivot/toolbar/navi-through-up.png" border="0" title="Drill 
>> Through" width="24" height="24"></td><td><div style="width: 
>> 1ex"></div></td><td><input type="image" 
>> name="toolbar01.chartButton01" src="/jpivot/toolbar/chart-up.png" 
>> border="0" title="Show Chart" width="24" height="24"></td><td><input

>> type="image" name="toolbar01.chartPropertiesButton01" 
>> src="/jpivot/toolbar/chart-config-up.png" border="0" title="Chart 
>> Config" width="24" height="24"></td><td><div style="width: 
>> 1ex"></div></td><td><input type="image" 
>> name="toolbar01.printPropertiesButton01" 
>> src="/jpivot/toolbar/print-config-up.png" border="0" title="Configure 
>> Print Settings" width="24" height="24"></td><td><a 
>> href="./Print?cube=01&type=1"><img src="/jpivot/toolbar/pdf-up.png" 
>> border="0" title="Print this Page via PDF" width="24" 
>> height="24"></a></td><td><a href="./Print?cube=01&type=0"><img

>> src="/jpivot/toolbar/excel-up.png" border="0" title="Start Excel" 
>> width="24" height="24"></a></td><td><div style="width: 
>> 1ex"></div></td><td><input type="image" name="toolbar01.chartResize"

>> src="/jpivot/toolbar/swap-axes-up.png" border="0" 
>> title="toolb.chart.resize" width="24" height="24"></td></tr></table>
>>
>> </td>
>> <td style="padding-left:60px">
>> <a href="./mdx_save.jsp" target="_blank"><img 
>> src="./images/zapisz.gif" 
>> onmouseover="changeSrc(this,'images/zapisz_over.gif');" 
>> onmouseout="changeSrc(this,'images/zapisz.gif');" width="176" 
>> height="24" border="0" alt="Zapisanie aktualnego zapytania MDX" /></a>
>> </td>
>> </tr></table>
>>
>> </td></tr>
>> <tr><td style="height:10px"><img src="./images/p.gif" width="1" 
>> height="1" alt=""></td></tr>
>> </table>
>>
>>
>>
>> <%@ page session="true" contentType="text/html; charset=utf-8" 
>> pageEncoding="UTF-8"%>
>> <%@ taglib uri="http://www.tonbeller.com/jpivot" prefix="jp" %>
>> <%@ taglib uri="http://www.tonbeller.com/wcf" prefix="wcf" %>
>> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>>
>>
>> <%--
>>
>> JPivot / WCF comes with its own "expression language", which simply
>> is a path of properties. E.g. #{customer.address.name} is
>> translated into:
>> session.getAttribute("customer").getAddress().getName()
>> WCF uses jakarta commons beanutils to do so, for an exact syntax
>> see its documentation.
>>
>> With JSP 2.0 you should use <code>#{}</code> notation to define
>> expressions for WCF attributes and <code>\${}</code> to define
>> JSP EL expressions.
>>
>> JSP EL expressions can not be used with WCF tags currently, all
>> tag attributes have their <code>rtexprvalue</code> set to false.
>> There may be a twin library supporting JSP EL expressions in
>> the future (similar to the twin libraries in JSTL, e.g. core
>> and core_rt).
>>
>> Check out the WCF distribution which contains many examples on
>> how to use the WCF tags (like tree, form, table etc).
>>
>> --%>
>>
>> <html>
>> <head>
>> <title>Przyk?adowy system analiz wielowymiarowych w czasie 
>> rzeczywistym: sprzedaz. oraz koszty.</title>
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>> <link rel="stylesheet" type="text/css" href="jpivot/table/mdxtable.css">
>> <link rel="stylesheet" type="text/css" href="jpivot/navi/mdxnavi.css">
>> <link rel="stylesheet" type="text/css" href="wcf/form/xform.css">
>> <link rel="stylesheet" type="text/css" href="wcf/table/xtable.css">
>> <link rel="stylesheet" type="text/css" href="wcf/tree/xtree.css">
>> <link rel="stylesheet" type="text/css" href="images/styl.css">
>> <script type="text/javascript">
>> function changeSrc(el,img){
>> if(el!=null){
>> el.src=img;
>> }
>> }
>> </script>
>> </head>
>> <body bgcolor=white>
>> <script type="text/javascript" src="js/utils.js" ></script>
>> <!-- tree menu -->
>> <script type="text/javascript" src="js/tree.js"></script>
>>
>> <div class="srodek" style="height:100%">
>> <!--tab glowna -->
>> <table cellspacing="0" cellpadding="0" border="0" style="width:100%; 
>> height:100% " class="srodek">
>> <tr class="top">
>> <td class="lewa" style="height:70px"><table style="width:100%" 
>> class="srodek" cellspacing="0" cellpadding="0" border="0">
>> <tr>
>> <td valign="middle" align="left" style="width:1004px;"><img 
>> src="images/top.jpg" align="left" width="1004" height="70" alt=""></td>
>> </tr>
>> </table></td>
>> </tr>
>> <tr valign="top"><td class="srodek">
>> <!-- tab wewnetrzna -->
>> <table cellspacing="0" cellpadding="0" border="0" style="width:100%; 
>> height:100%" class="srodek">
>> <tr valign="top">
>> <td style="width:250px; padding-left:10px" class="lewa lewa_listwa">
>> <%@include file="mdx_select.jsp" %>
>> </td>
>> <td style="width:1px"><img src="./images/p.gif" width="1" height="1" 
>> alt=""></td>
>> <td class="lewa" style="width:100%">
>>
>> <!-- tresc -->
>> <table cellspacing="0" cellpadding="0" border="0" class="lewa" 
>> style="width:100%; height:100%"><tr><td class="lewa" valign="top">
>>
>> <form action="testpage.jsp" method="post">
>>
>>
>> <%-- include query and title, so this jsp may be used with different 
>> queries --%>
>> <wcf:include id="include01" httpParam="query" 
>> prefix="/WEB-INF/queries/" suffix=".jsp"/>
>> <c:if test="${query01 == null}">
>> <jsp:forward page="/index.jsp"/>
>> </c:if>
>>
>> <%-- define table, navigator and forms --%>
>> <jp:table id="table01" query="#{query01}"/>
>> <jp:navigator id="navi01" query="#{query01}" visible="false"/>
>> <wcf:form id="mdxedit01" xmlUri="/WEB-INF/jpivot/table/mdxedit.xml" 
>> model="#{query01}" visible="false"/>
>> <wcf:form id="sortform01" xmlUri="/WEB-INF/jpivot/table/sortform.xml" 
>> model="#{table01}" visible="false"/>
>>
>> <jp:print id="print01"/>
>> <wcf:form id="printform01" 
>> xmlUri="/WEB-INF/jpivot/print/printpropertiesform.xml" 
>> model="#{print01}" visible="false"/>
>>
>> <jp:chart id="chart01" query="#{query01}" visible="false"/>
>> <wcf:form id="chartform01" 
>> xmlUri="/WEB-INF/jpivot/chart/chartpropertiesform.xml" 
>> model="#{chart01}" visible="false"/>
>> <wcf:table id="query01.drillthroughtable" visible="false" 
>> selmode="none" editable="true"/>
>>
>> <table border="0" cellspacing="0" cellpadding="0" style="width:100%">
>> <tr><td class="tytul lewa" valign="middle" style="height:33px">
>> Analiza wyników sprzedaz.y wg. zapytania: <c:out value="${title01}"/>
>> </td></tr>
>> <tr><td style="height:1px"><img src="./images/p.gif" width="1" 
>> height="1" alt=""></td></tr>
>> </table>
>>
>> <!--
>> [<c:out value="${chart01.chartHeight}"/>]
>> [<c:out value="${chart01.chartWidth}"/>]
>> [<c:out value="${chart01.resizable}"/>]
>> -->
>>
>> <%-- define a toolbar --%>
>> <wcf:toolbar id="toolbar01" 
>> bundle="com.tonbeller.jpivot.toolbar.resources">
>> <wcf:scriptbutton id="cubeNaviButton" tooltip="toolb.cube" img="cube" 
>> model="#{navi01.visible}"/>
>> <wcf:scriptbutton id="mdxEditButton" tooltip="toolb.mdx.edit" 
>> img="mdx-edit" model="#{mdxedit01.visible}"/>
>> <wcf:scriptbutton id="sortConfigButton" tooltip="toolb.table.config" 
>> img="sort-asc" model="#{sortform01.visible}"/>
>> <wcf:separator/>
>> <wcf:scriptbutton id="levelStyle" tooltip="toolb.level.style" 
>> img="level-style" model="#{table01.extensions.axisStyle.levelStyle}"/>
>> <wcf:scriptbutton id="hideSpans" tooltip="toolb.hide.spans" 
>> img="hide-spans" model="#{table01.extensions.axisStyle.hideSpans}"/>
>> <wcf:scriptbutton id="propertiesButton" tooltip="toolb.properties" 
>> img="properties" 
>> model="#{table01.rowAxisBuilder.axisConfig.propertyConfig.showProperties}"/> 
>>
>> <wcf:scriptbutton id="nonEmpty" tooltip="toolb.non.empty" 
>> img="non-empty" model="#{table01.extensions.nonEmpty.buttonPressed}"/>
>> <wcf:scriptbutton id="swapAxes" tooltip="toolb.swap.axes" 
>> img="swap-axes" model="#{table01.extensions.swapAxes.buttonPressed}"/>
>> <wcf:separator/>
>> <wcf:scriptbutton model="#{table01.extensions.drillMember.enabled}" 
>> tooltip="toolb.navi.member" radioGroup="navi" id="drillMember" 
>> img="navi-member"/>
>> <wcf:scriptbutton model="#{table01.extensions.drillPosition.enabled}" 
>> tooltip="toolb.navi.position" radioGroup="navi" id="drillPosition" 
>> img="navi-position"/>
>> <wcf:scriptbutton model="#{table01.extensions.drillReplace.enabled}" 
>> tooltip="toolb.navi.replace" radioGroup="navi" id="drillReplace" 
>> img="navi-replace"/>
>> <wcf:scriptbutton model="#{table01.extensions.drillThrough.enabled}" 
>> tooltip="toolb.navi.drillthru" id="drillThrough01" img="navi-through"/>
>> <wcf:separator/>
>> <wcf:scriptbutton id="chartButton01" tooltip="toolb.chart" 
>> img="chart" model="#{chart01.visible}" />
>> <wcf:scriptbutton id="chartPropertiesButton01" 
>> tooltip="toolb.chart.config" img="chart-config" 
>> model="#{chartform01.visible}"/>
>> <wcf:separator/>
>> <wcf:scriptbutton id="printPropertiesButton01" 
>> tooltip="toolb.print.config" img="print-config" 
>> model="#{printform01.visible}"/>
>> <wcf:imgbutton id="printpdf" tooltip="toolb.print" img="pdf" 
>> href="./Print?cube=01&type=1"/>
>> <wcf:imgbutton id="printxls" tooltip="toolb.excel" img="excel" 
>> href="./Print?cube=01&type=0"/>
>> <wcf:separator/>
>> <wcf:scriptbutton id="chartResize" tooltip="toolb.chart.resize" 
>> img="swap-axes" model="#{chart01.resizable}"/>
>> </wcf:toolbar>
>>
>> <%-- render toolbar --%>
>> <table border="0" cellspacing="0" cellpadding="0" style="width:100%">
>> <tr><td class="lewa lewa_listwa" valign="middle" style="height:45px">
>>
>> <table border="0" cellspacing="0" cellpadding="0"><tr valign="middle">
>> <td style="padding-left:10px">
>> <wcf:render ref="toolbar01" 
>> xslUri="/WEB-INF/jpivot/toolbar/htoolbar.xsl" xslCache="true"/>
>> </td>
>> <td style="padding-left:60px">
>> <a href="./mdx_save.jsp" target="_blank"><img 
>> src="./images/zapisz.gif" 
>> onmouseover="changeSrc(this,'images/zapisz_over.gif');" 
>> onmouseout="changeSrc(this,'images/zapisz.gif');" width="176" 
>> height="24" border="0" alt="Zapisanie aktualnego zapytania MDX" /></a>
>> </td>
>> </tr></table>
>>
>> </td></tr>
>> <tr><td style="height:10px"><img src="./images/p.gif" width="1" 
>> height="1" alt=""></td></tr>
>> </table>
>>
>>
>> <table border="0" cellspacing="0" cellpadding="10"><tr valign="middle">
>> <td>
>>
>> <%-- if there was an overflow, show error message --%>
>> <c:if test="${query01.result.overflowOccured}">
>> <p>
>> <strong style="color:red">Otrzymany wynik spowodowa? 
>> przepe?nienie</strong>
>> <p>
>> <br>
>> </c:if>
>>
>> <%-- render navigator --%>
>> <wcf:render ref="navi01" xslUri="/WEB-INF/jpivot/navi/navigator.xsl" 
>> xslCache="true"/>
>>
>> <%-- edit mdx --%>
>> <c:if test="${mdxedit01.visible}">
>> <h3>Edytor zapytan' MDX</h3>
>> <wcf:render ref="mdxedit01" xslUri="/WEB-INF/wcf/wcf.xsl" 
>> xslCache="true"/>
>> <br>
>> </c:if>
>>
>> <%-- sort properties --%>
>> <wcf:render ref="sortform01" xslUri="/WEB-INF/wcf/wcf.xsl" 
>> xslCache="true"/>
>> <br />
>> <%-- chart properties --%>
>> <wcf:render ref="chartform01" xslUri="/WEB-INF/wcf/wcf.xsl" 
>> xslCache="true"/>
>> <br />
>> <%-- print properties --%>
>> <wcf:render ref="printform01" xslUri="/WEB-INF/wcf/wcf.xsl" 
>> xslCache="true"/>
>>
>> <!-- render the table -->
>> <p>
>> <!-- render chart -->
>> <wcf:render ref="chart01" xslUri="/WEB-INF/jpivot/chart/chart.xsl" 
>> xslCache="true"/>
>> <p>
>> <a href="index.jsp">Powrót do pocza;tku</a>
>> <p>
>> Przekrój:
>> <wcf:render ref="table01" 
>> xslUri="/WEB-INF/jpivot/table/mdxslicer.xsl" xslCache="true"/>
>> <p>
>> <wcf:render ref="table01" xslUri="/WEB-INF/jpivot/table/mdxtable.xsl" 
>> xslCache="true"/>
>>
>> <p>
>> <!-- drill through table -->
>> <wcf:render ref="query01.drillthroughtable" 
>> xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>
>> </form>
>>
>> </td></tr></table>
>>
>> </td></tr>
>> <tr class="stopa"><td>&nbsp;</td></tr>
>> </table>
>> <!-- tresc koniec -->
>>
>> </td></tr></table>
>> <!-- wewnetrzna koniec -->
>>
>> </td></tr></table>
>> <!-- tab glowna koniec -->
>> </div>
>> <script type="text/javascript">
>> RedrawAllTrees();
>> </script>
>> </body>
>> </html>
>>
>>
>>
>> Thanks and regards,
>> Ash
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message