aspose file tools*
The moose likes Struts and the fly likes Difference b/w '%{x} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference b/w Watch "Difference b/w New topic
Author

Difference b/w '%{x}", "${x}", "%{#x}"

Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
Please can anyone tell me the difference between:

1.%{xURL},
2.${y.id},
3.%{#attr.y.status}.

eg1: <s:a href="%{xURL}">${y.id} </s:a>
eg2:<s:text name="%{#attr.y.status}" />
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

Hi,

1.%{xURL} is used for take a value from current list value which is set to Action class.

2.${y.id} is JSTL tag for value.

3.%{#attr.y.status} is used for when you want to take the value for OGNL value stack.



Thanks,
Nishan Patel.


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
Ok then how to differentiate, i mean like which one to use when?...
I am sorry if this is wrong question,as i am new to this
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

hi,

That is depend on you where to use it.

All of three are use in Jsp page.

${y.id} is JSTL tag which is sun product.

and

%{xURL} and %{#attr.y.status} both are Struts 2.0 tag.

Thanks,
Nishan Patel.
Rachel Kumar
Ranch Hand

Joined: Oct 21, 2008
Posts: 51
Hi,
if you are familiar with the struts tags plese can you help me out in My post "Highlight table row on Return Press".

I know the logic but i am not sure of the implemenation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference b/w '%{x}", "${x}", "%{#x}"
 
Similar Threads
Adding attributes
Help me format this tag
Modal dialog for a popup
struts2 properties file reload
url tag