• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set a html:text value equal to an expression? (SOLVED)

 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to do something like this:



but that gives me an error about expecting quotation marks I think it was.

Then I found something online that I thought was the answer, so I tried:



But I get an error saying an equal sign is expected.

I just want to put the ServletContext attribute into this text box. I seem to remember doing this in the past, but with jsf using faces-config and #{} or something like that. Is there a way to do what I am trying to do, and how so?



edit - amazingly I found the answer by just trying different combinations that I thought could work lol

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65124
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The real solution is to properly initialize the action form, though.
 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elaborate please?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initialize the action form with the value from the application context.
 
Matt Kohanek
Village Idiot
Ranch Hand
Posts: 484
Java jQuery Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not familiar with what you mean, i will have to do some studying. Thanks for the advice
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(Or at the very least use EL, or the EL tags in a pre-JSP 2.0 container.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic