• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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

 
Village Idiot
Posts: 484
jQuery Oracle Java
  • 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

 
Marshal
Posts: 67365
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
Author
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
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elaborate please?
 
David Newton
Author
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
Posts: 484
jQuery Oracle Java
  • 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
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.)
 
I don't always make ads but when I do they're tiny
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!