Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

pageContext.request.

 
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting a different value in case of request.getRequestURL() and request.getRequestURL() when used with pageContext.request.requestURI and
pageContext.request.requestURL

I have done the following maping in my struts-config.xml
<action path="/GDCityDetail"
type="struts.actions.GDCityDispatchAction"
parameter="methodToCall" name="brandNeutralCityContentForm"
scope="session">
<forward name="showCityIntroduction" path="GDCityIntroductionView"/>
<forward name="showCityHotels" path="GDCityHotelsView"/>
<forward name="showCityMap" path="GDCityMapView"/>
<forward name="showCityResturants" path="GDCityResturantsView"/>
<forward name="showCityAttractions" path="GDCityAttractionsView"/>
<forward name="showCityEvents" path="GDCityEventsView"/>
<forward name="showCityEventDetails" path="GDCityEventDetailsView"/>
<forward name="showCityTransport" path="GDCityTransportView"/>
<forward name="showCityWeather" path="GDCityWeatherView"/>


<forward name="failure" path="ErrorView"/>
</action>

<action path="/city/introduction"
forward="/GDCityDetail.do?methodToCall=displayCityIntroduction">
</action>

request.getRequestURI returns me /GDCityDetail.do while pageContext.request.requestURI returns me the path of the jsp mapped i tiles-def.

Thanks
Neeraj.
 
Marshal
Posts: 67430
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that you are not confusing the URL and URI methods?

What container? Under Tomcat 5.5, I get identical results.
 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am not getting confused iwth URI and URL methods.


I am using atg 7 as server. I am not sure whether it is because of struts definations.

Thanks,
Neeraj.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic