Message Boards
jsf portlet
hamid sol, modified 17 Years ago.
jsf portlet
Junior Member Posts: 49 Join Date: 9/14/06 Recent Posts
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
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, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 49 Join Date: 9/14/06 Recent Posts
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...
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...
Benjamin Bratkus, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 61 Join Date: 3/6/06 Recent Posts
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
ben
hamid sol, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 49 Join Date: 9/14/06 Recent Posts
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
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
Benjamin Bratkus, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 61 Join Date: 3/6/06 Recent Posts
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"
< 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, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 49 Join Date: 9/14/06 Recent Posts
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
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
Benjamin Bratkus, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 61 Join Date: 3/6/06 Recent Posts
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
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, modified 16 Years ago.
RE: jsf portlet
Junior Member Posts: 49 Join Date: 9/14/06 Recent Posts
Hi ben ,
i'm still waiting...
thanks for your time
i'm still waiting...
thanks for your time
satish M, modified 13 Years ago.
RE: jsf portlet
New Member Posts: 23 Join Date: 12/1/10 Recent Posts
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.
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, modified 6 Years ago.
RE: jsf portlet
Junior Member Posts: 38 Join Date: 3/6/17 Recent Posts
dont anyone know the solution for that ??