aspose file tools*
The moose likes Struts and the fly likes How to set a html:text value equal to an expression? (SOLVED) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set a html:text value equal to an expression? (SOLVED)" Watch "How to set a html:text value equal to an expression? (SOLVED)" New topic
Author

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

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

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



True wisdom is in knowing you know nothing - Socrates
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60978
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The real solution is to properly initialize the action form, though.
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Can you elaborate please?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Initialize the action form with the value from the application context.
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I am not familiar with what you mean, i will have to do some studying. Thanks for the advice
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(Or at the very least use EL, or the EL tags in a pre-JSP 2.0 container.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set a html:text value equal to an expression? (SOLVED)