• 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Cache Problem

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

I am not sure what could be the problem with this app. But same app works fine in weblogic.

I have a simple webapp that provides user profile data to the user. The request parameter is the profile id that gets passed to the struts2 action which reads the data from the MYSQL server and sends it back to the browser using a jspx files.

When I invoke the url with param id=0 it works fine.

Example



but when I invoke it with param=1 it sends me back the data for param=0 in the browser.



When I restart tomcat and invoke url with param id=1 then it provides correct result. I put logs in the action file after and it prints correct(expected) results all the time, but it shows wrong result on the browser.



I deployed the same app on weblogic10.3 and it works fine all the time.

Will appreciate any tips and ideas provided.

Thanks,
Amit
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to take a guess and say that your problem is really due to having used an instance variable somewhere in your servlet and it is only an accident that you got one result in weblogic and another in Tomcat.

Bill
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not use any Servlet, I use Strtus2 action class( that internally uses some Filter to forward request to Action class). I developed this application first on weblogic and it works fine everytime. The I started to deploy it in tomcat and it gives me this issue everytime.

Thanks,
Amit
 
I do some of my very best work in water. Like this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic