Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

how to add mailto using outputLink

843842Apr 20 2006 — edited Apr 21 2006
Hi,

I am creating a dynamic Table where Email address field is getting added dynamically.I need to know how can i add mailto with the email address.

I am doing following steps but it is appending the complete URL of the application before mailto:emailadress.

<h:outputLink value="mailto:#{emp.jobInfo.email}" id="emailLink">
<h:outputText value="#{emp.jobInfo.email}" />
</outputLink>

The output comes as http://servername:port/context path/mailto:emailadress

Looks like outputLink default adds the context path to the URL and to remove the context path we can add forward slash to remove the same.

I did some testing and found if i add 3 forward slashes infront of mailto the output i received is much better. http:///mailto:emailaddress . But still http:/// is still coming with the mailto and email part.I wanted to remove this also.Pls suggest. h:outputLink value="///mailto:#{emp.jobInfo.email}" id="emailLink">

If somebody has any solution to this problem pls respond.

Thanks, -Ritu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 19 2006
Added on Apr 20 2006
1 comment
442 views