掲示板

jsf portlet

17年前 に hamid sol によって更新されました。

jsf portlet

Junior Member 投稿: 49 参加年月日: 06/09/14 最新の投稿
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
16年前 に hamid sol によって更新されました。

RE: jsf portlet

Junior Member 投稿: 49 参加年月日: 06/09/14 最新の投稿
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
16年前 に Benjamin Bratkus によって更新されました。

RE: jsf portlet

Junior Member 投稿: 61 参加年月日: 06/03/06 最新の投稿
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
16年前 に hamid sol によって更新されました。

RE: jsf portlet

Junior Member 投稿: 49 参加年月日: 06/09/14 最新の投稿
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
16年前 に Benjamin Bratkus によって更新されました。

RE: jsf portlet

Junior Member 投稿: 61 参加年月日: 06/03/06 最新の投稿
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"
16年前 に hamid sol によって更新されました。

RE: jsf portlet

Junior Member 投稿: 49 参加年月日: 06/09/14 最新の投稿
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
16年前 に Benjamin Bratkus によって更新されました。

RE: jsf portlet

Junior Member 投稿: 61 参加年月日: 06/03/06 最新の投稿
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
16年前 に hamid sol によって更新されました。

RE: jsf portlet

Junior Member 投稿: 49 参加年月日: 06/09/14 最新の投稿
Hi ben ,
i'm still waiting...
thanks for your time
13年前 に satish M によって更新されました。

RE: jsf portlet

New Member 投稿: 23 参加年月日: 10/12/01 最新の投稿
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.
6年前 に wely cery によって更新されました。

RE: jsf portlet

Junior Member 投稿: 38 参加年月日: 17/03/06 最新の投稿
dont anyone know the solution for that ??