This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes How do you include one expression inside of another expression? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "How do you include one expression inside of another expression?" Watch "How do you include one expression inside of another expression?" New topic
Author

How do you include one expression inside of another expression?

harold neiper
Greenhorn

Joined: Jun 12, 2002
Posts: 18
I am wondering what the proper syntax would be for this. Essentially, I need the language portion of a forms action uri to be dynamic (determined in the template). Say for example I determine the locale to be en-US thus the language being 'en'. The code would look something like this:
String language = "en";
aForm.action = "<%=tc.makeCURL("/<%=language%>/residential/ocs/public/fu/type_email")%>";
resulting in:
aForm.action = "<%=tc.makeCURL("/en/residential/ocs/public/fu/type_email")%>";
resulting in:
aForm.action = "/en/residential/ocs/public/fu/type_email/0,,,00.html";
btw.... we are developing JSP in vignette environment
[ November 08, 2002: Message edited by: harold neiper ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56201
    
  13


or better yet, factor the logic of building the language-sensitive URL out of the JSP and into the Java code:

hth,
bear
[ November 08, 2002: Message edited by: Bear Bibeault ]

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
harold neiper
Greenhorn

Joined: Jun 12, 2002
Posts: 18
thanks! the first worked and the second option i like even more but the code is Vignettes and not sure if we can change (but we are questioning them)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How do you include one expression inside of another expression?
 
Similar Threads
Scripting Invalid
Run javascript method only once?
EL question about setting bean property
Not rendering EL in my custom tag
Need help with Validation.xml