• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp expression in side vbscript  RSS feed

 
Piradharsan Navaratnam
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I am facing a situation where i have to assign a vbscript variable with the value i get from a java method. how can i implement this.

Can i call vbscript in side java scriplets.???

For example say i have a vbscript valiable
dim name

i need to assign the variable with the value like
name = <%= MyClass.getName()%>
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like it might work. If that's a string, you'll want to enclose it in double quotes, though:
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If <%= MyClass.getName()%> is to be a client side VBScript expression you would also need to escape the <%= and %> portions of the string so that the JSP compiler on the server doesn't treat this as a JSP expression.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!