Foros de discusión

jsf portlet

hamid sol, modificado hace 17 años.

jsf portlet

Junior Member Mensajes: 49 Fecha de incorporación: 14/09/06 Mensajes recientes
Hello,
i managed too deploy my jsf portlet into LR.
When i click on a link I get exceptions and i see in my stacktrace

" org.apache.jasper.JasperException: URL path must start with a '/' or include '://' "

or

"org.apache.jasper.JasperException: URL path must start with a '/' or include '://' "

Has anyone already seen such an exception or any idea what it means?
thnaks
hamid sol, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 49 Fecha de incorporación: 14/09/06 Mensajes recientes
hello this error took me almost 4 weeks to solve it!
Maybe this is only interesting for jsf developer.

My jsf app worked fine on a standalone tomcat container.But after deploying the app to LR i got that error.
The point is LR doesn't accept links that don't start with a "/" , "#" or "://", I've to note that jsf
produces from the h:outputLink component a (a href="" ...) tag. So if there isn't any "/" or others ,
LR isn't able to construct the page.
I had 2 pages,the first worked fine but the second page had h:outputLinks components, and LR crashed every time trying to construct the second page.

Hope I could help others a bit...
thumbnail
Benjamin Bratkus, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 61 Fecha de incorporación: 6/03/06 Mensajes recientes
i've developed a jsf portlet app successfull to liferay 4.1 i haven't any problems with my links or buttons. so can you give me some more details what you wanted to do with your buttons /links ?

ben
hamid sol, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 49 Fecha de incorporación: 14/09/06 Mensajes recientes
sorry that i response you so lately.
I didn't think that someone would answer me.

I use LR 4.2.2 myfaces ant tomahawk 1.1.5 (both) and do file uploads with tomahawk t:inputFileUpload component.

for instance when i want to show an image i use
<h:graphicImage value="image.jsf?#{staffAction.member.id}"/>
where image.jsf contains
<%
staffAction = session.getAttribute("staffAction");
if (staffAction != null) {
staffAction.showImage();
}
%>
The graphicImage is where i get that exception, i mentioned before.
Tell me if you need more details.
thans for your time
thumbnail
Benjamin Bratkus, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 61 Fecha de incorporación: 6/03/06 Mensajes recientes
for diplaying an image within a jsf side i normally use the

< h:graphicImage rendered="#{profileDetail.readAllowed}" url="../../path/to/my/pic/here.jpg" alt="active"/ > Tag.

.... or you can do it like

define this in your side:

< %@ taglib uri="http://java.sun.com/portlet" prefix="portlet"% >
< portlet:defineObjects />
and retrieve your path like
renderResponse.encodeURL(renderRequest.getContextPath() + "/path/to/my/pic/here.jpg"
hamid sol, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 49 Fecha de incorporación: 14/09/06 Mensajes recientes
Hi Ben,
yes I also use h:graphicImage.
The matter is that my image is saved as BLOB (binary Large Object) in my DB. (I've managed to upload files as binaries within LR into DB ) But i donot know how to get the binary from DB an show it on the page.I do not have a directory where my pictures are saves, i've to get them from DB. In a standalone tomcat i could use a httpSevletResponse:
HttpServletResponse responses = (HttpServletResponse) context.getExternalContext().getResponse();

to send the binaries to the browser but i can't use a httpServletResponse in portals/Portlet.

I'm able to bring the blob from DB but have you an idea how i could show it ?i mean which objects do i need to send binaries and show them on portlets?
thanks
thumbnail
Benjamin Bratkus, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 61 Fecha de incorporación: 6/03/06 Mensajes recientes
hi hamid,

i know this issue - we have developed a j2ee app with a similar issue. i ll write you @ tuesday when i am back in office.

best regards,

ben
hamid sol, modificado hace 16 años.

RE: jsf portlet

Junior Member Mensajes: 49 Fecha de incorporación: 14/09/06 Mensajes recientes
Hi ben ,
i'm still waiting...
thanks for your time
satish M, modificado hace 13 años.

RE: jsf portlet

New Member Mensajes: 23 Fecha de incorporación: 1/12/10 Mensajes recientes
Hi Ben,

I am also facing the same issue.
We are developing j2ee hibernate portlet.
In that I have deployed the portlet.
While accessing the portlet i am getting the following exception.

java.lang.IllegalArgumentException: URL path must start with a '/' or include '://'

Pleae help in this.
I am waiting for your reply.

Thanks,
Satish.
wely cery, modificado hace 6 años.

RE: jsf portlet

Junior Member Mensajes: 38 Fecha de incorporación: 6/03/17 Mensajes recientes
dont anyone know the solution for that ??