You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "I. Venuti" <i....@caribel.it> on 2006/05/12 09:14:08 UTC

Need web pages for both PCs and palms... (JSF? ADF?...)

Hi,

 have to start a new web project, that will be accessed both from PCs 
and palms, smartphones and so on.
I thing that there could be 2 main architectural decisions:

1) use different pages for different devices (at least 2: one for PCS, 
one for others devices)
2) use a single page but with a technology what make possible to render 
differently for different devices

I'd like to choose option 2 and I started investigating JSF. As I know I 
could personalize the rendering fase for any component.
But this could be too long for now  (there should be at leat a perferct 
knowledge of JSF that seem to be achieved in too much time for project's 
scheduling).

So I was looking for a library that makes this available; it seems to me 
that only ADF from Oracle (donated to MyFaces, but for now not 
integrated!) make this option available. Unfortunatly ADF seems to have 
2 problems:

a) in any case I must design each page, with JDeveloper, with a single 
layout (so no run-time decision! Just a design choise!)
b) use of javascript for navigation (many mobile devices could not 
interact with this tecnology; is this true?)

After this (long! sorry) introduction my questions:

1) can you suggest a if a) and b) limitations are true for ADF? (or, 
maybe, it is my superficial knowledge of technology that makes them a 
problem!)
2) if a) and b) are true, is there any other library available for what 
I'm looking for?
3) if nor 1) and 2) could lead to a good choice for my project, any 
other suggestion about what J2EE technology could be appropriate for the 
project?

Thank for anyone who will  give me some idea and suggestion!
Have a nice day

Ivan


RE: Need web pages for both PCs and palms... (JSF? ADF?...)

Posted by Julian Ray <ju...@yahoo.com>.
Hi Ivan,

We use value bindings where possible to affect how common JSF components
work and where not possible, we provide two (or more) sets of features and
render the appropriate one on a switch. Note that each JSP has a backing
bean and we push as much of the logic into abstract classes to simplyfy the
code and automate the functionality.

Here is some code from our backing beans base classes. Note that the
listener gets the request before the JSF servlet and injects parameters into
the request. This could probably be done with a PhaseListener as well.

    /*
     * Returns the browser capability which is set via the
BrowserCapabilityFilter filter.
     */
    protected Integer getBrowserCapability() {
		Integer browserCapability =
Constants.BROWSER_FULL_CAPABILITY;
		if
(getContext().getExternalContext().getSessionMap().containsKey("BROWSER_CAPA
BILITY")) {
			browserCapability = (Integer)
getContext().getExternalContext().getSessionMap().get("BROWSER_CAPABILITY");
		}
		return browserCapability;
    }


    /*
     * Returns the maximum number of rows to display on a page. Value
     * depends on the browser type
     */
    public Integer getMaxRows() {
    	if
(Constants.BROWSER_FULL_CAPABILITY.equals(getBrowserCapability())) {
    		return new Integer(MAX_ROWS_FULL);
    	} else {
    		return new Integer(MAX_ROWS_LIMITED);
    	}
    }

-----Original Message-----
From: I. Venuti [mailto:i.venuti@caribel.it] 
Sent: Monday, May 15, 2006 11:11 AM
To: MyFaces Discussion
Subject: Re: Need web pages for both PCs and palms... (JSF? ADF?...)


> Our services use a listener to determine (actually make a best guess) 
> at the browser client and then loads stylesheets optimized for the 
> browser (using tomahawk's stylesheet control) and turns on/off 
> functionality in the pages and adjusts client/server updates etc.
>
>   
very interesting!
I think that the listener is looking for a specific infos in the request
header for guessing the browser client type, isn't it?

Also the stylesheet control allows different rendering for different
clients.
What isn't very clear id the client/server updates and on/off
dunctionalities.
I think that these actions are setted before the page is rendered; so how
you can achieve it?
Maybe using a different navigation path?

Thank a lot also to the other feedbacks!

Have a nice day

Ivan


Re: Need web pages for both PCs and palms... (JSF? ADF?...)

Posted by "I. Venuti" <i....@caribel.it>.
> Our services use a listener to determine (actually make a best guess) at the
> browser client and then loads stylesheets optimized for the browser (using
> tomahawk's stylesheet control) and turns on/off functionality in the pages
> and adjusts client/server updates etc.
>
>   
very interesting!
I think that the listener is looking for a specific infos in the request 
header for guessing the browser client type, isn't it?

Also the stylesheet control allows different rendering for different 
clients.
What isn't very clear id the client/server updates and on/off 
dunctionalities.
I think that these actions are setted before the page is rendered; so 
how you can achieve it?
Maybe using a different navigation path?

Thank a lot also to the other feedbacks!

Have a nice day

Ivan

Re: WebLogic 8.1

Posted by Burno <br...@francetelecom.com>.
hi,

wich version of MyFaces do you use ?
i have extensions filter bug

Bruno
--
View this message in context: http://www.nabble.com/Need-web-pages-for-both-PCs-and-palms...-%28JSF-ADF-...%29-t1605852.html#a4406598
Sent from the MyFaces - Users forum at Nabble.com.


Re: WebLogic 8.1

Posted by Adam Brod <AB...@intralinks.com>.
Quintin-

When Weblogic starts up a webapp, it will print out 'ServletContext 
"/myWebApp" initialized'.  If it says "null", it might just be that your 
webapp doesn't have a name or that the webapp is mapped to the root 
directory "/".  I don't think it is a problem.

Adam Brod
Product Development Team


Quintin Kerby <qk...@caci.com> 
05/12/2006 07:30 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"MyFaces Discussion" <us...@myfaces.apache.org>
cc

Subject
WebLogic 8.1







I developed a webapp using MyFaces, Spring, and Hibernate which runs 
beautifully on Tomcat 5.5 and JDK 1.5.  I now have to deploy to WebLogic 
which uses JDK 1.4.2. 

I had to take the following steps to get where I am (which is still not 
very far). 

1) Downgrade the web.xml from 2.4 to 2.3 
2) Remove Antlr.jar for Hibernate as WebLogic seems to have problems with 
it. 
3) Add servlet-api.jar and jsp-api.jar from the Tomcat common/lib 
directory 

I noticed the "ServletContext 'null' initialized."  Does anyone know 
WebLogic well enough to point me in the right direction? 

<snip> 
2006-05-12 19:15:17,882 [main] INFO 
org.springframework.aop.framework.DefaultAopProxyFactory - CGLIB2 
available: proxyTargetClass feature enabled 
2006-05-12 19:15:18,211 [main] INFO 
org.springframework.web.context.ContextLoader - Using context class 
[org.springframework.web.context.support.XmlWebApplicationContext] for 
root WebApplicationContext 
2006-05-12 19:15:18,211 [main] INFO 
org.springframework.web.context.ContextLoader - Root 
WebApplicationContext: initialization completed in 4313 ms 
2006-05-12 19:15:18,211 [main] INFO 
org.apache.myfaces.webapp.StartupServletContextListener - MyFaces already 
initialized 
2006-05-12 19:15:18,211 [main] INFO 
org.apache.myfaces.webapp.StartupServletContextListener - ServletContext 
'null' initialized. 
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000331> 
<Started WebLogic Admin Server "myserver" for domain "mydomain" running in 
Development Mode> 
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000360> 
<Server started in RUNNING mode> 
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000355> 
<Thread "ListenThread.Default" listening on port 7001, ip address *.*> 
------<Following occurs when I attempt to access one of the pages> 
<May 12, 2006 7:16:15 PM EDT> <Error> <HTTP> <BEA-101017> 
<[ServletContext(id=18611390,name=TaskManager,context-path=/TaskManager)] 
Root cause of ServletException. 
javax.faces.FacesException: javax.servlet.ServletException 
        at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421) 

        at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234) 

        at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352) 
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107) 
        at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) 

        at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) 

        at 
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) 
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92) 

        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) 

        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724) 

        at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 

        at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) 
        at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764) 

        at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644) 

        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) 
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) 
Caused by: javax.servlet.ServletException: javax.servlet.ServletException 
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121) 
        at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) 

        at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) 

        at 
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) 
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92) 

        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92) 

        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) 

        at 
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:326) 

        at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415) 

        ... 18 more 
> 

Quintin Kerby
CACI, Inc.
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

WebLogic 8.1

Posted by Quintin Kerby <qk...@caci.com>.
I developed a webapp using MyFaces, Spring, and Hibernate which runs 
beautifully on Tomcat 5.5 and JDK 1.5.  I now have to deploy to WebLogic 
which uses JDK 1.4.2.

I had to take the following steps to get where I am (which is still not 
very far).

1) Downgrade the web.xml from 2.4 to 2.3
2) Remove Antlr.jar for Hibernate as WebLogic seems to have problems with 
it.
3) Add servlet-api.jar and jsp-api.jar from the Tomcat common/lib 
directory

I noticed the "ServletContext 'null' initialized."  Does anyone know 
WebLogic well enough to point me in the right direction?

<snip>
2006-05-12 19:15:17,882 [main] INFO 
org.springframework.aop.framework.DefaultAopProxyFactory - CGLIB2 
available: proxyTargetClass feature enabled
2006-05-12 19:15:18,211 [main] INFO 
org.springframework.web.context.ContextLoader - Using context class 
[org.springframework.web.context.support.XmlWebApplicationContext] for 
root WebApplicationContext
2006-05-12 19:15:18,211 [main] INFO 
org.springframework.web.context.ContextLoader - Root 
WebApplicationContext: initialization completed in 4313 ms
2006-05-12 19:15:18,211 [main] INFO 
org.apache.myfaces.webapp.StartupServletContextListener - MyFaces already 
initialized
2006-05-12 19:15:18,211 [main] INFO 
org.apache.myfaces.webapp.StartupServletContextListener - ServletContext 
'null' initialized.
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000331> 
<Started WebLogic Admin Server "myserver" for domain "mydomain" running in 
Development Mode> 
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000360> 
<Server started in RUNNING mode> 
<May 12, 2006 7:15:18 PM EDT> <Notice> <WebLogicServer> <BEA-000355> 
<Thread "ListenThread.Default" listening on port 7001, ip address *.*> 
------<Following occurs when I attempt to access one of the pages>
<May 12, 2006 7:16:15 PM EDT> <Error> <HTTP> <BEA-101017> 
<[ServletContext(id=18611390,name=TaskManager,context-path=/TaskManager)] 
Root cause of ServletException.
javax.faces.FacesException: javax.servlet.ServletException
        at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
        at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
        at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
        at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
        at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
        at 
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
        at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
        at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.servlet.ServletException: javax.servlet.ServletException
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
        at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
        at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
        at 
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
        at 
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
        at 
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:326)
        at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
        ... 18 more
>

Quintin Kerby
CACI, Inc.

Re: Need web pages for both PCs and palms... (JSF? ADF?...)

Posted by Julian Ray <ju...@yahoo.com>.
We have a number of "light-weight" apps which are designed to work across
both PDA browsers and more (fully?) capable browser platforms. We found that
one design can work although you end up compromising the GUI on both
paltforms and have to pay careful attention to navigation (JS does not work
on PDA browsers etc.) and layout.

Our services use a listener to determine (actually make a best guess) at the
browser client and then loads stylesheets optimized for the browser (using
tomahawk's stylesheet control) and turns on/off functionality in the pages
and adjusts client/server updates etc.


--
View this message in context: http://www.nabble.com/Need-web-pages-for-both-PCs-and-palms...-%28JSF-ADF-...%29-t1605852.html#a4366934
Sent from the MyFaces - Users forum at Nabble.com.


Re: Need web pages for both PCs and palms... (JSF? ADF?...)

Posted by Craig McClanahan <cr...@apache.org>.
On 5/12/06, I. Venuti <i....@caribel.it> wrote:
>
> Hi,
>
> have to start a new web project, that will be accessed both from PCs
> and palms, smartphones and so on.
> I thing that there could be 2 main architectural decisions:
>
> 1) use different pages for different devices (at least 2: one for PCS,
> one for others devices)
> 2) use a single page but with a technology what make possible to render
> differently for different devices
>
> I'd like to choose option 2 and I started investigating JSF. As I know I
> could personalize the rendering fase for any component.
> But this could be too long for now  (there should be at leat a perferct
> knowledge of JSF that seem to be achieved in too much time for project's
> scheduling).
>
> So I was looking for a library that makes this available; it seems to me
> that only ADF from Oracle (donated to MyFaces, but for now not
> integrated!) make this option available. Unfortunatly ADF seems to have
> 2 problems:
>
> a) in any case I must design each page, with JDeveloper, with a single
> layout (so no run-time decision! Just a design choise!)
> b) use of javascript for navigation (many mobile devices could not
> interact with this tecnology; is this true?)
>
> After this (long! sorry) introduction my questions:
>
> 1) can you suggest a if a) and b) limitations are true for ADF? (or,
> maybe, it is my superficial knowledge of technology that makes them a
> problem!)
> 2) if a) and b) are true, is there any other library available for what
> I'm looking for?
> 3) if nor 1) and 2) could lead to a good choice for my project, any
> other suggestion about what J2EE technology could be appropriate for the
> project?
>
> Thank for anyone who will  give me some idea and suggestion!
> Have a nice day


I would look at things this way ... completely independent of the
implementation technologies you might consider, it is unreasoable to expect
that the same UI design that works on a browser (with a typical screen
resolution of 1024x768 or better) is going to work well on a device like a
mobile phone or PDA with substantially smaller screen real estate (maybe
something like 384x256).  It is just not going to happen.  Human factors are
going to lead you to designing a different interaction flow based on these
sorts of physical limitations.

Instead, what you should be looking for is a technology that lets you share
the knowledge of how to *build* an application, and resue the same building
blocks.  In the case of JSF in general, and the ADF Faces components in
particular, you should be looking at the value add of the fact that "a
button is a button" no matter what delivery technology is involved.
Therefore, the skills of your developers who know how to build a web app can
be transferrable ... they don't need to learn a completely different set of
components for two different environments.  And, of course, you should
strive to share the back end logic between these two environments, because
that should *not* depend on the view tier interactions that are used.

But you are *definitely* going to need different interaction patterns with
users for these two very different execution environments.  It doesn't
matter if you look at JSF or JavaEE technologies, or somethihng totally
different ... what you are looking for is not practical from a human
interaction factors viewpoint.


Ivan
>
>

Craig McClanahan

Re: Need web pages for both PCs and palms... (JSF? ADF?...)

Posted by Marco Mistroni <mm...@gmail.com>.
Hello,
 i give my 2 cents here.....
mayb i m 'old' fashioned and not very 'updated', but i did what you are
trying to
do back in Y2K. At that stage i used JSP written in XML with a HTML/WML XSLT
processor
for rendering.
in that case, i suppose if you follow that approach there will be no
difference between using
JSF/JSP/ADF...

@work we are doing the same, we are writing JSP in XML that will be rendered
by a XSLT engine..

IMO, you should go for 1 page for both devices, it will save you maintenance
hassle....

HTH
 marco

On 5/12/06, I. Venuti <i....@caribel.it> wrote:
>
> Hi,
>
> have to start a new web project, that will be accessed both from PCs
> and palms, smartphones and so on.
> I thing that there could be 2 main architectural decisions:
>
> 1) use different pages for different devices (at least 2: one for PCS,
> one for others devices)
> 2) use a single page but with a technology what make possible to render
> differently for different devices
>
> I'd like to choose option 2 and I started investigating JSF. As I know I
> could personalize the rendering fase for any component.
> But this could be too long for now  (there should be at leat a perferct
> knowledge of JSF that seem to be achieved in too much time for project's
> scheduling).
>
> So I was looking for a library that makes this available; it seems to me
> that only ADF from Oracle (donated to MyFaces, but for now not
> integrated!) make this option available. Unfortunatly ADF seems to have
> 2 problems:
>
> a) in any case I must design each page, with JDeveloper, with a single
> layout (so no run-time decision! Just a design choise!)
> b) use of javascript for navigation (many mobile devices could not
> interact with this tecnology; is this true?)
>
> After this (long! sorry) introduction my questions:
>
> 1) can you suggest a if a) and b) limitations are true for ADF? (or,
> maybe, it is my superficial knowledge of technology that makes them a
> problem!)
> 2) if a) and b) are true, is there any other library available for what
> I'm looking for?
> 3) if nor 1) and 2) could lead to a good choice for my project, any
> other suggestion about what J2EE technology could be appropriate for the
> project?
>
> Thank for anyone who will  give me some idea and suggestion!
> Have a nice day
>
> Ivan
>
>