• 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

Loading Data on Page load.

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to show some data in a jsp page using structs.
Let, It is a page to view user profile. No editing, just showing the details. SO no need of writing its form bean. Also I am navigating to this page by a hyperlink. So how can I load the data. Where do I write the code to initialize the DTO. Or please give me the correct steps for that.

Thanks in advance.
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
would be nice if you choose a correct name as we all do here...
[ October 24, 2006: Message edited by: Jan Groth ]
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you do not accept private messages, so i cannot answer you privately.

the answer to this question of yours should explain our point...

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

I know it seems like everyone is badgering you about this, but it really is an important part of the JavaRanch culture to give your real name, or at least give us a name that we can believe is your real name.

I'm afraid this policy is not optional. Failure to comply could cause your profile to be deleted without warning.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jobin,

Thanks for taking the time to change your profile name. However, you're not quite there yet. The JavaRanch naming policy states that your profile must have a first and last name. If you for some reason just don't want us to know your last name, then make one up. All the policy says is that it has to be a believable last name.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would still use a form bean (probably, it depends somewhat on what your DTO looks like and how much formatting you would need to do on the data). Say I had the form bean UserForm that had properties id, name, and age. I would create an action named DisplayProfile that would be configured to use UserForm. The URL would pass in the needed id (DisplayProfile.do?id=562). In the execute method I would 1) cast form into UserForm, 2) get the id value from the UserForm, 3) pass the id into my business layer to retrieve the data, 4) populate the name and age fields on the UserForm, and 5) return the "success" forward.

- Brent
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic