Win a copy of Pipeline as Code this week in the Cloud/Virtualization 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Can I use struts 2 Action and struts 1 JSP file?

 
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If I change Action class to struts 2 and keep using struts 1 JSP file?

Is it possible? Will it work?
 
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try it?  My wild guess would be that it would not work.  The two versions of Struts are very different code bases, including the JSP tag libraries.
 
Yogesh Gandhi
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:Did you try it?  My wild guess would be that it would not work.  The two versions of Struts are very different code bases, including the JSP tag libraries.



Well I didnt' try exactly this, but other way round I tried.

Struts 1 Action class
Struts 2 JSP

And it works...But at this moment I am facing another problem.

I am setting attribute in ACtion class into request, which I am not able to display on the JSP



JSP CODE
 
Joe Ess
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's been a long time since I worked with Struts, but I don't know that you can do this:

The way I understand it, the "value" attribute is supposed to be name of a getter in the action class.  The tag documentation has several examples or this example.  
 
He's giving us the slip! Quick! Grab this tiny ad!
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic