wood burning stoves 2.0*
The moose likes Struts and the fly likes How to use OGNL independently with out frame woks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to use OGNL independently with out frame woks" Watch "How to use OGNL independently with out frame woks" New topic
Author

How to use OGNL independently with out frame woks

rajduvvi reddy
Greenhorn

Joined: Apr 18, 2010
Posts: 13
Hi, I am having some problem with OGNL.
I want to use OGNL independently with out using the frame work. How can i make use of OGNL with Simple JSP
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

You should be able to do that.
put the ognl jar file in classpath and see the OGNL developer guide http://www.opensymphony.com/ognl/html/DeveloperGuide/index.html for how to embed it into application


[Servlet tutorial] [Servlet 3.0 Cook Book]
rajduvvi reddy
Greenhorn

Joined: Apr 18, 2010
Posts: 13
As far as i know, OGNL is EL which has been internally used when we use struts2, We can write power full expression language which is given by OGNL

ex: <s:select label="Select" name="carMake" list="#{'make1':'Ford', 'make2':'Honda', 'make3':'Toyota'}" />

this line is JSP and it is Struts2 tag (but it is internally evaluated by using OGNL). now i want to use such expressions and want to evaluate them by using OGNL.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Read the OGNL documentation; using OGNL outside of S2 is trivial. If you want to use it in your own custom tags then just use it--but if you want to use it in somebody *else's* custom tags that'll be a lot more work.
rajduvvi reddy
Greenhorn

Joined: Apr 18, 2010
Posts: 13
To use it in, my own custom tags.. I need to configure "expression evaluator" to as OGNL, i didn't found any where how to configure that. If any body knows , Plzz help me in that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use OGNL independently with out frame woks
 
Similar Threads
OGNL with Struts2
JSP and dynamic values for textfield and datetimepicker
Struts2
Struts Basic EL question
bean tag problem