This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Cache Problem

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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. it might be a problem with Struts2 on Tomcat.

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.


Thanks,
Amit
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's unlikely this is a Struts 2 issue per se; Struts does no caching on its own. Without the code/etc. it'll be hard to diagnose, though.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the Action Class



When I do the System out it shows me the correct result(the one I want), but on the browser it sends me the same page for all diff "id"


Here is the jspx file which displays the page




Here is the Struts.xml file


 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see anything obvious; sorry.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic