[JBoss-user] [JBoss Portal] - Re: Sample portlet project - with JSF

2006-07-06 Thread gilboay
hi,

I've tried to use the card-demo sample as a reference, and I still get a 
JasperException. Here are the errors:

13:59:54,462 ERROR [UIComponentTag] Faces context not found. getResponseWriter 
will fail. Check if the FacesServlet has been initialized at all in your 
web.xml.
13:59:54,462 ERROR [CommandFilter] Exception in command invocation
org.apache.jasper.JasperException
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
...

13:59:54,477 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at 
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
at 
org.apache.jsp.jsp.TestJSFPortlet.view_jsp._jspx_meth_f_view_0(org.apache.jsp.jsp.TestJSFPortlet.view_jsp:79)
at 
org.apache.jsp.jsp.TestJSFPortlet.view_jsp._jspService(org.apache.jsp.jsp.TestJSFPortlet.view_jsp:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3955854#3955854

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3955854

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Sample portlet project - with JSF

2006-07-06 Thread gilboay
ok ... it's working :)

However, i've noticed that you take two different approaches for JSF vs. JSP:

1) In the JSP sample you create a Portlet class (using JSR-168 API).

2) In the JSF sample you use a set of JSP pages (with JSF taglibs), with no 
intermediary Portlet class.

Is this the best practice, or is it just a short cut for convenincy ?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3955990#3955990

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3955990

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Sample portlet project - with JSF

2006-07-05 Thread gilboay
hi,

I am looking for a sample portlet project which can be imported to the Eclipse 
IDE (or any similar tools such as netbeans). The project should include a 
portlet which uses JSF (this is crucial), and that actually runs :)

I am using the latest versions of JBoss Portal and Eclipse.

any help here would be appreciated,

p.s.

I am still novice to the Java world, and not very apt (at the moment) in 
configuration matters.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3955479#3955479

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3955479

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Sample portlet project - with JSF

2006-07-05 Thread gilboay
hi,

I am looking for a sample portlet project which can be imported to the Eclipse 
IDE (or any similar tools such as netbeans). The project should include a 
portlet which uses JSF (this is crucial), and that actually runs :)

I am using the latest versions of JBoss Portal and Eclipse.

any help here would be appreciated,

p.s.

I am still novice to the Java world, and not very apt (at the moment) in 
configuration matters.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3955482#3955482

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3955482

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: RenderResponse.createActionUrl() does not work

2006-04-09 Thread gilboay
hi again -

This is not a markup problem. I've modified the code to generate valid HTML 
(enclosing all attributes with double quotes). The problem is with the actual 
value of the action attribute. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3936070#3936070

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936070


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: RenderResponse.createActionUrl() does not work

2006-04-06 Thread gilboay
hi,


I'd rather not used JSP at this point.

I'm trying this with a sample code from the book Building Portals with the 
Java Portlet API (Apress), by Jeff Linwood  Dave Minter.

Here is the full listing of the portlet class:




  | package com.portalbook.portlets;
  | 
  | import java.io.IOException;
  | import java.io.Writer;
  | 
  | import javax.portlet.ActionRequest;
  | import javax.portlet.ActionResponse;
  | import javax.portlet.GenericPortlet;
  | import javax.portlet.PortletException;
  | import javax.portlet.RenderRequest;
  | import javax.portlet.RenderResponse;
  | 
  | public class AdvancedPortlet extends GenericPortlet
  | {
  | 
  | protected void doEdit(
  | RenderRequest renderRequest,
  | RenderResponse renderResponse)
  | throws PortletException, IOException
  | {
  | renderResponse.setContentType(text/html);
  | 
  | Writer writer = renderResponse.getWriter();
  | 
  | //get the existing parameters to use as defaults.
  | String title = renderRequest.getParameter(title);
  | String contents = renderRequest.getParameter(contents);
  | 
  | if (title == null)
  | {
  | title = ;
  | }
  | 
  | if (contents == null)
  | {
  | contents = ;
  | }
  | 
  | writer.write(H1Portlet Settings/H1);
  | writer.write(FORM ACTION=);
  | writer.write(renderResponse.createActionURL().toString());
  | writer.write();
  | 
  | writer.write(
  | Title: INPUT TYPE=text NAME=title VALUE=' + title + ' 
SIZE=25);
  | writer.write(
  | Contents: INPUT TYPE=text NAME=contents VALUE= '
  | + contents
  | + ' SIZE=25);
  | writer.write(P);
  | writer.write(INPUT TYPE=submit);
  | writer.write(/FORM);
  | 
  | }
  | 
  | protected void doHelp(
  | RenderRequest renderRequest,
  | RenderResponse renderResponse)
  | throws PortletException, IOException
  | {
  | //return a helpful message
  | renderResponse.setContentType(text/html);
  | 
  | Writer writer = renderResponse.getWriter();
  | writer.write(
  | This portlet allows you to change its content and title.);
  | }
  | 
  | protected void doView(
  | RenderRequest renderRequest,
  | RenderResponse renderResponse)
  | throws PortletException, IOException
  | {
  | renderResponse.setContentType(text/html);
  | Writer writer = renderResponse.getWriter();
  | String contents = renderRequest.getParameter(contents);
  | if (contents != null)
  | {
  | writer.write(contents);
  | }
  | else
  | {
  | //return the default contents
  | writer.write(This is the default portlet contents.  To change 
);
  | writer.write(this message, edit the portlet's settings.);
  | }
  | 
  | writer.write(p);
  | writer.write(
  | IMG SRC=
  | + renderResponse.encodeURL(
  | renderRequest.getContextPath() + /images/picture.jpg)
  | + );
  | 
  | writer.write(p);
  | writer.write(
  | IMG SRC=http://www.greenninja.com/images/teton1-small.jpg);
  | }
  | 
  | protected String getTitle(RenderRequest renderRequest)
  | {
  | String title = renderRequest.getParameter(title);
  | if (title != null)
  | {
  | return title;
  | }
  | //else return a default title, if we don't have one set yet.
  | return Advanced Portlet;
  | }
  | 
  | public void processAction(
  | ActionRequest actionRequest,
  | ActionResponse actionResponse)
  | throws PortletException, IOException
  | {
  | //check for parameters
  | String title = actionRequest.getParameter(title);
  | if (title != null)
  | {
  | actionResponse.setRenderParameter(title, title);
  | }
  | 
  | String contents = actionRequest.getParameter(contents);
  | if (contents != null)
  | {
  | actionResponse.setRenderParameter(contents, contents);
  | }
  | }
  | 
  | }
  | 

The doEdit() section works only if I apply the work-around described in the 1st 
event. 

thanx :)




View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3935453#3935453

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3935453


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding 

[JBoss-user] [JBoss Portal] - Re: RenderResponse.createActionUrl() does not work

2006-04-05 Thread gilboay
Generated URL means the actual url returned by the 
RenderResponse.createActionURL() method.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3935063#3935063

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3935063


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: RenderResponse.createActionUrl() does not work

2006-04-04 Thread gilboay
hi - 

i've tried both GET and POST - the same behaviour happens for both of them.

Any ideas?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3934656#3934656

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3934656


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - RenderResponse.createActionUrl() does not work

2006-04-03 Thread gilboay
hi,

I am using JBoss Portal v2.2 (default package bundled with Jboss AS).

I am running a sample portlet, in which in EDIT mode the user gets a text field 
to set the portlet's title. I use a form (drawn in the doEdit() method), which 
action is obtained by calling RenderResponse.createActionUrl().

form action=Generated URL
 input type=text name=title
 input type=submit
 /form

The URL generated looks something like this:

/portal/index.html?ctrl:cmd=actionctrl:window=default.myPage.myPortlet

This is the way to do it according to all the literature i've read on this.

However, this did not work. When submitting the form, the query string was 
trunctuated, and the result was a URL that looks like this (I see this using 
Live-HTTP-Headers):

/portal/index.html?title=...

And thus the request was never directed to the portlet by the portal. The only 
way for this to work was to manually add 2 (two) hidden inputs to the form as 
follows:

form action=Generated URL
  input type=text name=title

  input type=hidden name=ctrl:cmd value=action
  input type=hidden name=ctrl:window value=default.myPage.myPortlet

  input type=submit
 /form

What did I do wrong?


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3934462#3934462

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3934462


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user