This would append jsessionid..
response.encodeURL("UnitSearch.jsp?type=CS")
depending upon what other settings (ie url-rewriting enabled).
>From: "Mark Williams" <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Subject: RE: jsessionid suddenly appearing in the HTML links
>Date: Mon, 13 May 2002 17:06:07 +0100
>
>Hi,
>
>I'm using Tomcat 3.2.1 the "offending" JSP file is copied below ( note: I
>am
>using mod_jserv rather then mod_jk as I could not get mod_jk to compile,
>should I re-try to compile mod_jk? ) :
>
><%@ page language="java"
>errorPage="Error.jsp"
>import="java.util.*"
>%>
>
><jsp:useBean id="SearchUnit" scope="session"
>class="com.tmt.goHolidayBreaks.business.SearchUnit" />
><jsp:setProperty name="SearchUnit" property="search" param="Search" />
><jsp:setProperty name="SearchUnit" property="region" param="Region" />
><jsp:useBean id="SessionManager" scope="session"
>class="com.tmt.goHolidayBreaks.database.SessionManager" />
>
>
><%@ include file="mainHeader.htm" %>
><%
>
> Vector res = new Vector();
> String type = "";
> boolean doneSearch = false;
> type = request.getParameter("type");
>
> if(!SearchUnit.getRegion().equals("")) {
> res = SearchUnit.getUnitsByRegion(type);
> doneSearch = true;
> }
> if(!SearchUnit.getSearch().equals("")) {
> SearchUnit.setCriteria(SearchUnit.getSearch());
> res = SearchUnit.getUnitsByKeyWord(type);
> }
>
>%>
> <TD vAlign=top width=436 background=index_files/netscape.gif>
> <DIV align=center>
> <TABLE cellSpacing=0 cellPadding=0 width=414
>background=index_files/netscape.gif border=0>
> <TR>
> <TD vAlign=left width=68 bgColor=#a8a7c0><FONT face=Verdana
> color=#ffffff size=1><B> Results</B></FONT></TD>
> <TD vAlign=left width=346 bgColor=#ffffff><IMG
> src="index_files/corner.gif" border=0></TD>
> </TR>
> <TR>
> <TD width=412 background=index_files/menuline.gif colSpan=2><IMG
> src="index_files/menuline.gif" border=0></TD></TR>
> </TABLE>
> <TABLE cellSpacing=0 cellPadding=0 width=414
>background=index_files/netscape.gif border=0>
> <TR>
> <TD width=412 colSpan=2> </TD></TR>
> <TR>
> <TD width=414 colSpan=2><FONT face=Verdana size=2>Selection
>results.<BR></FONT><P>
> <a href=<%=response.encodeURL("UnitSearch.jsp?type=H&")
>%> ><img
>src="hotel.gif" border="0"><a
>href=<%=response.encodeURL("UnitSearch.jsp?type=GH") %> ><img
>src="guesthouse.gif" border="0"><a
>href=<%=response.encodeURL("UnitSearch.jsp?type=BB") %> ><img src="bb.gif"
>border="0"><a href=<%=response.encodeURL("UnitSearch.jsp?type=CS") %> ><img
>src="camping.gif" border="0"><a
>href=<%=response.encodeURL("UnitSearch.jsp?type=CP") %> ><img
>src="cpark.gif" border="0">
> </TD>
>
>
> <TR><td><TABLE cellSpacing=0 cellPadding=0 width="414" border=0>
>
>
> <tr>
> <td width="100%">
> <div align="left">
>
> <table border="1" width="100%" bordercolor="#C0C0C0"
>cellspacing="1">
>
><% // Dynamic content goes here....................
>
> for(int i=0; i<res.size(); i++) {
> com.tmt.goHolidayBreaks.business.UnitSummary u =
>(com.tmt.goHolidayBreaks.business.UnitSummary)res.elementAt(i);
> String name = u.getUnit().getName();
> String address = u.getAddress();
> String picture="";
> try {
> picture = u.getUnit().getDescriptor().getPicture1();
> } catch (Exception e) {}
> String description = u.getUnit().getDescription();
> String features="";
> try {
> features =
>u.getUnitFacilityExpanded().getFacilityText();
> } catch (Exception e) {}
>%>
> <tr>
> <td width="100%" bgcolor="#F0800F" colspan="2"><font
>face="Verdana" color="#FFFFFF"><b><%=name%>,<br>
> </b><font size="1"><%= address %></font></font></td>
> </tr>
> <tr>
> <td width="83%"><img border="0" src="<%= picture %>"
>align="left">
> <font size="1" face="Verdana"><%= description %></font><br>
> <font face="Verdana" size="1">Features: <%= features
>%></font></td>
> <td width="17%">
> <p align="center">
> <IMG name="www" src="www.gif"
>width="72" height="31" border="0"
>usemap="#www<%=u.getUnit().getId().toString()%>">
> <map
>name="www<%=u.getUnit().getId().toString()%>">
> <area shape="rect" coords="0,0,72,31"
>href="http://<%=
>u.getUnit().getDomain() %>" >
> </map>
> <br>
><%
> if(u.hasPostCode()) {
>%>
> <img name="viewmap"
>src="viewmap.gif" width="72" height="31" border="0"
>usemap="#vm<%=u.getUnit().getId().toString()%>">
> <map
>name="vm<%=u.getUnit().getId().toString()%>">
> <area shape="rect"
>coords="0,0,72,31"
>href="javascript:map_window('http://www.streetmap.co.uk/streetmap.dll?Postco
>de2Map?code=<%=u.getPostCode()%>', 'map',
>'width=650,height=620,resizable=0,toolbar=0,scrollbars=yes,location=0,menuba
>r=0,
>status=0,titlebar=0,top=0,left=0')"></map>
><% }
>%>
> <br>
><%
> if(SessionManager.isAuthenticated()) {
>%>
> <img name="addtohotels" src="addtohotels.gif"
>width="72" height="31"
>border="0" usemap="#fav<%=u.getUnit().getId().toString()%>">
> <map
>name="fav<%=u.getUnit().getId().toString()%>">
> <area shape="rect" coords="0,0,72,31"
>href="Menu.jsp?unitId=<%=
>u.getUnit().getId().toString() %>" >
> </map>
><%
> }
>%>
> </td>
> </tr>
> <tr>
> <td width="100%" colspan="2"><font face="Verdana" size="1">
><%
> Vector facilities = u.getFacilities();
> for(int j=0; j <facilities.size(); j++) {
> com.tmt.goHolidayBreaks.business.FacilityExpanded f =
>(com.tmt.goHolidayBreaks.business.FacilityExpanded)facilities.elementAt(j);
>
> %>
> <%= f.getFacility().getCaption() %> - Min.Price �<%=
>f.getFacility().getStartPrice()%> Max.Price �<%=
>f.getFacility().getEndPrice()%> No.Available:<%=
>f.getFacility().getNumItems()%>
> <br>
><% }
>%>
> </font></td>
> </tr>
><%
> }
>%>
><%-- End <Conditional includes based on selection type> --%>
>
>
> </TABLE></DIV></TD></TR>
> </TABLE><FONT face=Verdana size=1><BR>
> <I>Select the 'WWW' button to view further details.<BR>
>Select 'Map' to view a local map of the area.<BR> If you are already
>registered, you will see an 'Add to my hotels' button. You may click on
>this to add the establishment to your favourites.<BR>You may register
>using the boxes in the bar to the left.</I><BR>
><P><BR><FONT face=Verdana size=2><B>Note to owners of hotels etc.</B><BR>
> If you are interested in having your business listed in our directory,
>then you may request full details of our services
> by clicking <A href="/enquiryform.html"><IMG src="here.gif" border="0"
>align=center></A><BR> <BR> </FONT><IMG
> src="index_files/netscape.gif" border=0></P>
> </td></TR></TR></TABLE>
> </DIV></TD>
>
><jsp:include page="FeaturedHotel.jsp" flush="true" />
>
><%-- Conditional includes based on selection type --%>
>
>
><%@ include file="mainFooter.htm" %>
>
>
>
> > -----Original Message-----
> > From: Galbraith, Paul [mailto:[EMAIL PROTECTED]]
> > Sent: 13 May 2002 16:43
> > To: Tomcat Users List
> > Subject: RE: jsessionid suddenly appearing in the HTML links
> >
> >
> > No you should leave noCookies="false", the double negative
> > implying that cookies may be used, which is what you want.
> >
> > Are you using Tomcat 3.2? I use 3.3, and it looks like the
> > configuration syntax is a little different. Anyways, since you
> > haven't touched the server.xml file, I'd be inclined to agree
> > with you that the problem is elsewhere.
> >
> > Can you give a sample of the JSP code that is actually generating
> > the problem URL?
> >
> > Paul
> >
> > -----Original Message-----
> > From: Mark Williams [mailto:[EMAIL PROTECTED]]
> > Sent: May 13, 2002 11:37 AM
> > To: Tomcat Users List
> > Subject: RE: jsessionid suddenly appearing in the HTML links
> >
> >
> > Hi,
> >
> > Thanks for your reply. I looked for the tag and there isn't one,
> > what I did
> > find was this :
> >
> > <!-- Request processing -->
> > <!-- Session interceptor will extract the session id from
>cookies
> > and
> > deal with URL rewriting ( by fixing the URL ). If
> > you wish to
> > suppress the use of cookies for session identifiers,
> > change the
> > "noCookies" attribute to "true"
> > -->
> > <RequestInterceptor
> > className="org.apache.tomcat.request.SessionInterceptor"
> > noCookies="false" />
> >
> > So, changing the NoCookies value to true would fix my problem? Sorry,
>I'm
> > not at all used to tomcat
> >
> > > -----Original Message-----
> > > From: Galbraith, Paul [mailto:[EMAIL PROTECTED]]
> > > Sent: 13 May 2002 16:20
> > > To: Tomcat Users List
> > > Subject: RE: jsessionid suddenly appearing in the HTML links
> > >
> > >
> > > What does the <SessionId /> tag look like in your server.xml file?
> > >
> > > -----Original Message-----
> > > From: Mark Williams [mailto:[EMAIL PROTECTED]]
> > > Sent: May 13, 2002 11:22 AM
> > > To: Tomcat Users List
> > > Subject: RE: jsessionid suddenly appearing in the HTML links
> > >
> > >
> > > No, i've checked on multiple browsers with cookies turned on.
> > THe problem
> > > still exists. Sorry I didn't mentio this in my original post, I
>forgot.
> > >
> > > > -----Original Message-----
> > > > From: Galbraith, Paul [mailto:[EMAIL PROTECTED]]
> > > > Sent: 13 May 2002 16:13
> > > > To: Tomcat Users List
> > > > Subject: RE: jsessionid suddenly appearing in the HTML links
> > > >
> > > >
> > > > It sounds like you've got cookies turned off in your browser. Is
> > > > it possible that your browser configuration has changed recently?
> > > >
> > > > -----Original Message-----
> > > > From: Mark Williams [mailto:[EMAIL PROTECTED]]
> > > > Sent: May 13, 2002 11:02 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: jsessionid suddenly appearing in the HTML links
> > > >
> > > >
> > > > Hi all,
> > > >
> > > > Apache : 1.3.x
> > > > Tomcat : 3.x
> > > >
> > > > I am having a problem in that suddently, for some reason( no
> > > changes have
> > > > been made to eith my apache or tomcat configuarion for the past 9
> > > > months ) ,
> > > > Tomcat's session id ( jsessionid ) is getting included in the
> > > > HTML URLs that
> > > > are generated from the JSP code I am using. For example :
> > > >
> > > >
>http://www.domain.com/ghb/estabtype?=GH;jessionid=Gkhjfjfhgjg?type=MX
> > > >
> > > > The jessionid code suddenly started appearing in the
> > generated HTML URL
> > > > links about 1 week ago ( again, I stress absolutely nothing has
> > > changed in
> > > > tomcat's configuration ) and as such, has been causing 404
> > > errors when you
> > > > click on the link.
> > > >
> > > > The qustion id, why is the jsessionid suddenly appearing in the
> > > > HTML links?
> > > > and how do I configure tomcat ( or whatever ) to stop doing this?
> > > >
> > > > Thanks in advance
> > > >
> > > > Regards, Mark
> > > >
> > > >
> > > >
> > > > --
> > > > 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]>
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > 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]>
> >
> >
> >
> >
> > --
> > 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]>
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>