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

issue understanding jstl properties

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear users, I am experiencing some problems understanding how an inherited jsp should work :



<c:param name="${AppUtils.consts.PARAM_USER_NAME}" value="${simpleContext.user}"/>

please can somebody explain me how should it be getting the value of ${simpleContext.user} if not defined anywhere ? How should this work ? I inherited this jsp... but I don't
understand what was in mind of who wrote this... how should work the row in bold ?

Thanks a lot!
 
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

This just adds parameters to the end of the URL so you would retrieve it the same as any other parameter using:
So your URL will end up:

Sean
 
Renato Bobbio Calogero
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I explained myself in few words 'cause I wanted to avoid the standard TL;DR reaction... but ... I am rewriting an application based on BPEL workflow manager.

Is the code simpleContext.user supposed to be managed by bpel maybe ? I mean , the parameter user would just be displayed if in my request I would have

an object of the type SimpleContext , named simpleContext , which has a "user" property . Did I get it ? Thank you for any reply,

Renato
 
Sean Clark
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Renato Bobbio Calogero wrote:Is the code simpleContext.user supposed to be managed by bpel maybe ?


I can't tell you that, BPEL looks like a process to work towards rather than anything specific to java. Are there any libraries/projects being used?

Renato Bobbio Calogero wrote:I mean , the parameter user would just be displayed if in my request I would have an object of the type SimpleContext , named simpleContext , which has a "user" property . Did I get it ?


Yes, that is correct, so have you checked the session to see if there is a SimpleContext object in it?

Sean
 
Renato Bobbio Calogero
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the BPEL workflow manager was messing around with session, using some parameters which he knows but they are transparent to developer which uses BPEL support.

Now, I had to substitute everything , so i deleted all the BPEL called methods and stuff related to that. I manually manage session beans throught navigation of the jsp_s . I was

just wondering if the JSTL worked like you confirmed they do... so now I could understand better what did BPEL engine and I can write my buisness logic in a way that everything

works fine.

So I understood it right: If I had a bean named "simpleContext" , of the type "SimpleContext" which had an attribute named "user" ( let's suppose a String containing the username

of logged user ) JSTL automatically retrieves it from request ( or session , if it's defined in session ) scope and returns the "user" attribute value.

Thanks a lot for your precious help,

kind regards

Renato
 
Sean Clark
Rancher
Posts: 377
Android Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Renato Bobbio Calogero wrote:So I understood it right: If I had a bean named "simpleContext" , of the type "SimpleContext" which had an attribute named "user"



I hope that helped, just one thing to add to what you said, JSTL would actually call the get method on the attribute rather than trying to access the object directly e.g. it would try to call simpleContext.getUser() rather than trying to access the user attribute directly.

Sean
 
Renato Bobbio Calogero
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you gave me a great help! Sorry for the late reply, I did not realize there was a last response for the post !

Thank you very much
 
reply
    Bookmark Topic Watch Topic
  • New Topic