Right click on project, then:
->Properties->Web Project Settings->Context root:
If you are building war for glassfish through maven (mvn package), you may create file glassfish-web.xml in the same folder as web.xml and write down:
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<!-- Doesn't work when build with Eclipse -->
<context-root>/YourContextPath</context-root>
</glassfish-web-app>
sobota, 17 sierpnia 2013
sobota, 13 lipca 2013
Icon for primefaces commandButton
I found placing my own icon in <p:commandButton> a little confusing. When I try to do this I got no icon at all, or strange mark looked like this:
When I've done a little research I found this:
I can have an icon in a three way:
#1. Button as a picture. There is no value/description visible. Only an icon/picture.
<p:commandLink action="#{someBean.someAction()}">
<h:graphicImage name="images/new_create.png" />
</p:commandLink>
#2. Button with an icon/picture as a background. So one see a description like "New" and the picture of icon in background.
<p:commandButton value="New!" styleClass="ui-back-but-new"/>
and respectively in css:
.ui-back-but-new{
background: url("#{resource['images/new_create.png']}") no-repeat top left !important;
}
#3. Button with an icon placed left to its description (value attrib).
<p:commandButton value="New" icon="ui-but-new-icon"/>
and respectively in css:
.ui-but-new-icon{
background-image: url("#{resource['images/new_create.png']}") !important;
}
The problem was...:
All my problems came from wrong path to the icon image. It is probably the most frequent mistake. I have coded it as images/new_create.png in css statements. Structure of folders was /resources/images/new_create.png.
The proper path could be given in a three ways:
The effect #1, #2, #3:
When I've done a little research I found this:
I can have an icon in a three way:
#1. Button as a picture. There is no value/description visible. Only an icon/picture.
<p:commandLink action="#{someBean.someAction()}">
<h:graphicImage name="images/new_create.png" />
</p:commandLink>
#2. Button with an icon/picture as a background. So one see a description like "New" and the picture of icon in background.
<p:commandButton value="New!" styleClass="ui-back-but-new"/>
and respectively in css:
.ui-back-but-new{
background: url("#{resource['images/new_create.png']}") no-repeat top left !important;
}
#3. Button with an icon placed left to its description (value attrib).
<p:commandButton value="New" icon="ui-but-new-icon"/>
and respectively in css:
.ui-but-new-icon{
background-image: url("#{resource['images/new_create.png']}") !important;
}
The problem was...:
All my problems came from wrong path to the icon image. It is probably the most frequent mistake. I have coded it as images/new_create.png in css statements. Structure of folders was /resources/images/new_create.png.
The proper path could be given in a three ways:
- url("#{resource['images/new_create.png']}")
- url(../resources/images/new_create.png)
- url(/MyAppName/resources/images/new_create.png)
The effect #1, #2, #3:
czwartek, 11 kwietnia 2013
Howto enable silverlight in ubuntu firefox
You can install moonlight from site but still - there will be no effects. You don't have apropirate codecs. In the next step you need to open page with samples. Then clik on one of given samples and allow to install codec. Thats all.
Howto remove a broken add-on from Thunderbird
When you add a broken add-on to Thunderbird it may cause Thunderbird to prevent you from doing anything, so you cannot remove add-on which is causes Thunderbird crash. Write in terminal:
thunderbird -safe-mode
Then you can remove and add-on.
source
thunderbird -safe-mode
Then you can remove and add-on.
source
wtorek, 12 marca 2013
freemind Unable to find an appropriate java runtime. See java_wrappers(7)
I've installed freemind on ubuntu 12.04. It did not started. I've got a message:
[warning] /usr/bin/freemind: No java runtime was found
Unable to find an appropriate java runtime. See java_wrappers(7)
I checked if I have java. Yes. Oracle 7.
I installed Open JDK 6.
I checked:
sudo update-alternatives --config java
I got:
* 0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 tryb auto
1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 tryb ręczny
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 tryb ręczny
Freemind started to work.
[warning] /usr/bin/freemind: No java runtime was found
Unable to find an appropriate java runtime. See java_wrappers(7)
I checked if I have java. Yes. Oracle 7.
I installed Open JDK 6.
I checked:
sudo update-alternatives --config java
I got:
* 0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 tryb auto
1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 tryb ręczny
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 tryb ręczny
Freemind started to work.
środa, 20 lutego 2013
Usuwania znaków [tab] z dokumentu w LibreOffice
1. Ctrl-H.
2. Opcje rozszerzone.
3. Wyrażenia regularne.
4. Pole szukaj: \t
5. Poza zastąp zostawić puste.
2. Opcje rozszerzone.
3. Wyrażenia regularne.
4. Pole szukaj: \t
5. Poza zastąp zostawić puste.
Zamiana miękkiego CR na twardy w dokumencie LibreOffice
1. Ctrl-H - zastąp.
2. Rozwinąć opcje rozszerzone.
3. Zaznaczyć wyrażenia regularne.
4. W polu szukaj wpisać: \n
5. W polu wstaw wpisać: \n
2. Rozwinąć opcje rozszerzone.
3. Zaznaczyć wyrażenia regularne.
4. W polu szukaj wpisać: \n
5. W polu wstaw wpisać: \n
Subskrybuj:
Posty (Atom)

