• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to embed body of JSP and have it's associated Action populate form used in JSP?

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That subject may be a little confusing, so with a few more words let me explain what I'm trying to do.

I have an existing JSP and its associated Action and ActionForm. This works on its own.

I now have a situation where I need to have the body of the JSP embedded into another JSP to add the original functionality to this new JSP and Action (no ActionForm for new JSP).

I have the new action forward to the original action. The original action unfortunately gets an unpopulated form. And then what is put into the form is 'lost' when it returns to the new JSP.

Here is the segment of struts-config.xml that may help:



Originally I had the form connected to the original action, but when I was getting no data, I thought of moving it to the new action.

As you can see, the new action forwards to the original action, but in the original action the form is null. If I create a new form within the action, the data still doesn't appear when forwarded back to the new JSP.

Is this doable or do I need to duplicate all of the logic from the original action into the new one?

Thanks.

Les
 
Ranch Hand
Posts: 99
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got consufused, but what are you trying to reach fill some fields in another jsp? you can work sending by request or by session if you will use over differents jsps.

 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic