[Beginners Corner] - Re: How do i deploy servlet using JBoss4.2.0.GA, pls help ??
by PeterJ
1) I recommend against placing any Java applications within Program Files. Various Java libraries have problems with spaces in the directory name, and unless you enjoy chasing down weird problems, you should put JBoss elsewhere. On my PC, JBoss is at f:\jboss\jboss-4.0.5.GA.
2) You do not need a classpath, the run.bat will set it up for you. I recommend that you never set a global CLASSPATH, it will only cause problems.
3) Your JAVA_HOME is incorrect. First, it references a JRE, your really should have a JDK. And your JRE is really old. You should download and use the latest 1.4 or 1.5 JDK from Sun and install it (do not use JDK 6, JBoss is not yet qualified to run with that and it can cause problems). Do not install the JDK in Program Files. Mine is at d:\apps\jdk1.5.0_11. (Yeah, I have a lot of disk drives, but on my laptop at home I use the same naming convention but everything is on the c: drive). Second, set JAVA_HOME to the installation directory, not to the jvm.dll. For example, on my PC I have:
JAVA_HOME=d:\apps\jdk1.5.0_11
4) It is not necessary to set JBOSS_HOME.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049944#4049944
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049944
17 years, 6 months
[JBoss Seam] - :selectItems and extended EL?
by NeillR
OK,
Here is what I wanna do:
I have a drop down list in my page. Inside my <h:selectOneMenu> tag I have a <s:selectItems> to iterate over a collection of instances of class Book. The varaible I have defined in the s:selectItems to do this is called "book"
Now I want each selectItem in the list to have a label set to a description of the current book in the iteration. I also want the description to be configurable from a message in a bundle.
One way I have tried is to set the label attribute to '#{messages.book_description} and have book_description=#{book.author}-#{book.title} in the messages.properties file. But this just quotes me "#{book.author}-#{book.title}" I.e does not do the value replacement for the book.
Another thing I have tried is to have a seam component with a function defined on it "calculateBookDescription(Book book)" and then set the label attribute to "#component.calculateBookDescription(book)".
Actually, this would be my preferred route I think because it means the book description can be constructed with a function that has acces to data from a wider context than just stuff available on a Book instance. For example I could have a a description like: "Author {0} - Title {1} - BundlePrice {2}", where BundlePrice depends upon a shopping cart total value or something like that.
Anyway, this doesn't work either. I get a ParseException saying:
Caused by: com.sun.el.parser.ParseException: Encountered "(" at line 1, column 34.
Was expecting one of:
"}" ...
"." ...
"[" ...
">" ...
My guess is this is because the <s:selectItems> label attribute does not support Method expressions, only Value expressions and the Seam EL only works for Value expressions.
Any ideas about how I could achieve the desired functionality (getting a dynamic description on the label attribute) would be much appreciated!!
Cheers
Neill
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049943#4049943
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049943
17 years, 6 months