Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NetBeans project

OTG-467455Nov 20 2017 — edited Nov 21 2017

I was just looking at the files generated by a NetBeans project.

I notice that the following directories are created.

pastedImage_0.png

Inside the nbproject subdir there are some project , implementation and properties files.

Each subdir has a few files in them. If I were to use textpad and work from the command line one would not have all the se files.

Nick, can you please point me to where I can read up more on the purpose of each of these files.

Comments

Timo Hahn
Answer

You can you an EL that is pointing to a bean that returns the current year as a string. Like EL:

<af:outputText id="footSp" value="Copyright © #{Mybean.currentYear}">

and in the MyBean java class

public String getCurrentYear() {
// do the calculation to get the current year
String year = ...
return year
}

Now, each time you use this outputtext you get the copyright with the current year.

Timo

Marked as Answer by Timo Hahn · Jan 26 2023
Neha Narkhede

@timo-hahn1 Thanks for the reply.
So there is no alternative way to get year from direct EL expression? That way I can avoid bean binding.

Timo Hahn

Sure, you can create a method in the application module that returns the year. Then you can use the return value inside an EL.
The solution using a bean is simpler to implement.

Timo

1 - 3

Post Details

Added on Nov 20 2017
2 comments
159 views