This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do you include one expression inside of another expression?

 
harold neiper
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ]
 
harold neiper
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic