Re: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence

2006-06-28 Thread Martin van den Bemt

Save the produkt.txt as an UTF-8 file...

Mvgr,
Martin

Chen, Wei wrote:

Hi all,
 
I have a file which cnotains an html-string which contains German 
characters as follow:
 
produkt.txt

-
tabletrtd*ö*ffnen/tdtd*ä*ndern/td/tr/table
 
 
And I want to show as follow:
 
myTest.xhtml

-
?xml version=1.0 encoding=UTF-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
 xmlns:ui=http://java.sun.com/jsf/facelets;
 xmlns:h=http://java.sun.com/jsf/html;
 xmlns:f=http://java.sun.com/jsf/core;
 xmlns:cr=http://creditreform.de/crefoteam;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleMyTest/title
/head
body
ui:composition template=/jsp/template/innerSiteTemplate.xhtml
...
 ui:define name=leftContent
  h2Schuldnerliste/h2
  center
   *ui:include src=file:./produkt.txt /*
  /center
 /ui:define
...
/ui:composition
/body
/html

But I got exceptions as follow. But if I change the German character to 
English it will be ok. Who knows how can I overcome it?


|java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence.
at 
weblogic.apache.xerces.impl.io.UTF8Reader.invalidByte(III)V(UTF8Reader.java:693)
at 
weblogic.apache.xerces.impl.io.UTF8Reader.read([CII)I(UTF8Reader.java:418)
at 
weblogic.apache.xerces.impl.XMLEntityManager$EntityScanner.load(IZ)Z(XMLEntityManager.java:3307)
at 
weblogic.apache.xerces.impl.XMLEntityManager$EntityScanner.scanQName(Lweblogic.apache.xerces.xni.QName;)Z(XMLEntityManager.java:2350)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement()Z(XMLDocumentFragmentScannerImpl.java:702)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(XMLDocumentFragmentScannerImpl.java:1477)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(XMLDocumentFragmentScannerImpl.java:329)
at 
weblogic.apache.xerces.parsers.DTDConfiguration.parse(Z)Z(DTDConfiguration.java:525)
at 
weblogic.apache.xerces.parsers.DTDConfiguration.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(DTDConfiguration.java:581)
at 
weblogic.apache.xerces.parsers.XMLParser.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(XMLParser.java:152)
at 
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(AbstractSAXParser.java:1175)
at 
weblogic.xml.jaxp.WebLogicXMLReader.parse(Lorg.xml.sax.InputSource;)V(WebLogicXMLReader.java:135)
at 
weblogic.xml.jaxp.RegistryXMLReader.parse(Lorg.xml.sax.InputSource;)V(RegistryXMLReader.java:152)
at 
javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.helpers.DefaultHandler;)V(SAXParser.java:345)
at 
javax.xml.parsers.SAXParser.parse(Ljava.io.InputStream;Lorg.xml.sax.helpers.DefaultHandler;)V(SAXParser.java:143)
at 
com.sun.facelets.compiler.SAXCompiler.doCompile(Ljava.net.URL;Ljava.lang.String;)Lcom.sun.facelets.FaceletHandler;(SAXCompiler.java:222)
at 
com.sun.facelets.compiler.Compiler.compile(Ljava.net.URL;Ljava.lang.String;)Lcom.sun.facelets.FaceletHandler;(Compiler.java:105)
at 
com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(Ljava.net.URL;)Lcom.sun.facelets.impl.DefaultFacelet;(DefaultFaceletFactory.java:189)
at 
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(Ljava.net.URL;)Lcom.sun.facelets.Facelet;(DefaultFaceletFactory.java:138)
at 
com.sun.facelets.impl.DefaultFacelet.include(Lcom.sun.facelets.impl.DefaultFaceletContext;Ljavax.faces.component.UIComponent;Ljava.net.URL;)V(DefaultFacelet.java:293)
at 
com.sun.facelets.impl.DefaultFacelet.include(Lcom.sun.facelets.impl.DefaultFaceletContext;Ljavax.faces.component.UIComponent;Ljava.lang.String;)V(DefaultFacelet.java:273)
at 
com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(Ljavax.faces.component.UIComponent;Ljava.lang.String;)V(DefaultFaceletContext.java:136)
at 
com.sun.facelets.tag.ui.IncludeHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;)V(IncludeHandler.java:60)
at 
com.sun.facelets.tag.CompositeFaceletHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;)V(CompositeFaceletHandler.java:47)
at 
com.sun.facelets.tag.ui.DefineHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;)V(DefineHandler.java:58)
at 
com.sun.facelets.tag.ui.CompositionHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;Ljava.lang.String;)Z(CompositionHandler.java:128)
at 
com.sun.facelets.impl.DefaultFaceletContext$1.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;Ljava.lang.String;)Z(DefaultFaceletContext.java:253)
at 

Re: AW: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence

2006-06-28 Thread Martin van den Bemt

Just use the OutputStreamWriter to specify the encoding.

Mvgr,
Martin

Chen, Wei wrote:

Hi Martin,

My file is simply a txt-file and is generated/saved in run-time by the program. How can I save as an UTF-8 file? 


Regards




-Ursprüngliche Nachricht-
Von: Martin van den Bemt [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 28. Juni 2006 12:25

An: MyFaces Discussion
Betreff: Re: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 
sequence

Save the produkt.txt as an UTF-8 file...

Mvgr,
Martin

Chen, Wei wrote:


Hi all,

I have a file which cnotains an html-string which contains German 
characters as follow:


produkt.txt
-
tabletrtd*ö*ffnen/tdtd*ä*ndern/td/tr/table


And I want to show as follow:

myTest.xhtml
-
?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC 
-//W3C//DTD XHTML 1.0 Transitional//EN

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:h=http://java.sun.com/jsf/html;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:cr=http://creditreform.de/crefoteam;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 / 
titleMyTest/title /head body ui:composition 
template=/jsp/template/innerSiteTemplate.xhtml

...
ui:define name=leftContent
 h2Schuldnerliste/h2
 center
  *ui:include src=file:./produkt.txt /*
 /center
/ui:define
...
/ui:composition
/body
/html

But I got exceptions as follow. But if I change the German character 
to English it will be ok. Who knows how can I overcome it?


|java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence.
at 
weblogic.apache.xerces.impl.io.UTF8Reader.invalidByte(III)V(UTF8Reader.java:693)
at 
weblogic.apache.xerces.impl.io.UTF8Reader.read([CII)I(UTF8Reader.java:418)
at 
weblogic.apache.xerces.impl.XMLEntityManager$EntityScanner.load(IZ)Z(XMLEntityManager.java:3307)
at 
weblogic.apache.xerces.impl.XMLEntityManager$EntityScanner.scanQName(Lweblogic.apache.xerces.xni.QName;)Z(XMLEntityManager.java:2350)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement()Z(XMLDocumentFragmentScannerImpl.java:702)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z(XMLDocumentFragmentScannerImpl.java:1477)
at 
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z(XMLDocumentFragmentScannerImpl.java:329)
at 
weblogic.apache.xerces.parsers.DTDConfiguration.parse(Z)Z(DTDConfiguration.java:525)
at 
weblogic.apache.xerces.parsers.DTDConfiguration.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(DTDConfiguration.java:581)
at 
weblogic.apache.xerces.parsers.XMLParser.parse(Lweblogic.apache.xerces.xni.parser.XMLInputSource;)V(XMLParser.java:152)
at 
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(Lorg.xml.sax.InputSource;)V(AbstractSAXParser.java:1175)
at 
weblogic.xml.jaxp.WebLogicXMLReader.parse(Lorg.xml.sax.InputSource;)V(WebLogicXMLReader.java:135)
at 
weblogic.xml.jaxp.RegistryXMLReader.parse(Lorg.xml.sax.InputSource;)V(RegistryXMLReader.java:152)
at 
javax.xml.parsers.SAXParser.parse(Lorg.xml.sax.InputSource;Lorg.xml.sax.helpers.DefaultHandler;)V(SAXParser.java:345)
at 
javax.xml.parsers.SAXParser.parse(Ljava.io.InputStream;Lorg.xml.sax.helpers.DefaultHandler;)V(SAXParser.java:143)
at 
com.sun.facelets.compiler.SAXCompiler.doCompile(Ljava.net.URL;Ljava.lang.String;)Lcom.sun.facelets.FaceletHandler;(SAXCompiler.java:222)
at 
com.sun.facelets.compiler.Compiler.compile(Ljava.net.URL;Ljava.lang.String;)Lcom.sun.facelets.FaceletHandler;(Compiler.java:105)
at 
com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(Ljava.net.URL;)Lcom.sun.facelets.impl.DefaultFacelet;(DefaultFaceletFactory.java:189)
at 
com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(Ljava.net.URL;)Lcom.sun.facelets.Facelet;(DefaultFaceletFactory.java:138)
at 
com.sun.facelets.impl.DefaultFacelet.include(Lcom.sun.facelets.impl.DefaultFaceletContext;Ljavax.faces.component.UIComponent;Ljava.net.URL;)V(DefaultFacelet.java:293)
at 
com.sun.facelets.impl.DefaultFacelet.include(Lcom.sun.facelets.impl.DefaultFaceletContext;Ljavax.faces.component.UIComponent;Ljava.lang.String;)V(DefaultFacelet.java:273)
at 
com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(Ljavax.faces.component.UIComponent;Ljava.lang.String;)V(DefaultFaceletContext.java:136)
at 
com.sun.facelets.tag.ui.IncludeHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;)V(IncludeHandler.java:60)
at 
com.sun.facelets.tag.CompositeFaceletHandler.apply(Lcom.sun.facelets.FaceletContext;Ljavax.faces.component.UIComponent;)V(CompositeFaceletHandler.java:47)
at 
com.sun.facelets.tag.ui.DefineHandler.apply(Lcom.sun.facelets.FaceletContext

Re: [other]Borland want to sell its IDE products.....

2006-02-09 Thread Martin van den Bemt



Werner Punz wrote:

Sean Schofield schrieb:

I personally love JBuilder but it is very pricey. 


I think you brought up the main point, now that the enterprise stuff
finally again is moving into sane domains pricewise (Thanks to Sun and
MyEclipse) Borland simply cannot afford to charge this money for their
stuff anymore.
Borland started as a tools vendor with moderate prices at a time where
tools simply cost a fortune. So lots of people who wanted to learn
programming started to use their tools, lots of professionals as well
who could not afford the heavy priced alternatives.

Once Kahn was kicked out they lost this strategy and pushed a high price
strategy with Enterprise plastered all over it (probably a stupid idea
of some MBAs taking over internally)



I think the problem started when Niels Jensen left and started JPI (one of the founders of Borland, 
don't know when the others left, Kahn is not the founder btw). Normally when the soul leaves the 
company, the company changes.


Mvgr,
Martin


Re: [other]Borland want to sell its IDE products.....

2006-02-09 Thread Martin van den Bemt

It takes some high level bookkeeping to determine the real value..

Mvgr,
Martin

Legolas Woodland wrote:
I think , who will buy these stuff , All company that has money to by 
these product line has their own stuff (IBM ,BEA ,SUN ,MS,ORACLE) , is 
there any other company that has enough cash to buy those products ?
how much those products costs ? for example how much should buyer pay to 
get Jbuilder ?

can any one suggest , or read something some where ?

Martin van den Bemt wrote:




Werner Punz wrote:


Sean Schofield schrieb:

I personally love JBuilder but it is very pricey. 



I think you brought up the main point, now that the enterprise stuff
finally again is moving into sane domains pricewise (Thanks to Sun and
MyEclipse) Borland simply cannot afford to charge this money for their
stuff anymore.
Borland started as a tools vendor with moderate prices at a time where
tools simply cost a fortune. So lots of people who wanted to learn
programming started to use their tools, lots of professionals as well
who could not afford the heavy priced alternatives.

Once Kahn was kicked out they lost this strategy and pushed a high price
strategy with Enterprise plastered all over it (probably a stupid idea
of some MBAs taking over internally)



I think the problem started when Niels Jensen left and started JPI 
(one of the founders of Borland, don't know when the others left, Kahn 
is not the founder btw). Normally when the soul leaves the company, 
the company changes.


Mvgr,
Martin







Re: JSF 1.2 support/plans

2006-01-14 Thread Martin van den Bemt

There is an Apache licensed EL, here at apache tomcat (at least that is the 
plan) :

http://www.mail-archive.com/dev%40tomcat.apache.org/msg02077.html

So it may be easier to talk to the tomcat people on their plans..

Mvgr,
Martin

Martin Marinschek wrote:

Yes,

we all know the improvements JSF 1.2 has to offer, and all committers
want to have a JSF 1.2 compliant version out as soon as possible.

If you can help us make it possible to rely on Sun's CDDL licensed
code, we'll have a chance to actually work on it.

regards,

Martin

On 1/14/06, Craig McClanahan [EMAIL PROTECTED] wrote:


On 1/13/06, Simon Kitching [EMAIL PROTECTED] wrote:



On Fri, 2006-01-13 at 14:01 -0500, Balunas, Jay wrote:


Hello all,

I have been lurking for some time, and have been investigating JSF for a


new project at my company.  Please forgive me is this has come up already -
I did search through several pages of archives and could not find a
reference to 1.2 support roadmaps


Because this will be a new project starting in about a month, and first


release around end of summer (August -September) I have been investigating
both the current 1.1.1 version of myFaces, and looking into what 1.2 JSF
provides.  We are planning on using Ajax and from what research I have done
JSF 1.2 has some hooks for making Ajax requests less of a hack into the life
cycle.


We are also investigating Suns implementation, but I would prefer to


stick with myFaces as the support and community seems stronger.


Note that all the following is not official; I'm a myfaces committer,
but not part of the project management committee. This info is just my
view from what I observe happening...

Firstly, the JSF 1.2 spec is not yet released; it's at proposed final
draft, and has been for many months.


Indeed, no one can actually release a General Availability
implementation of a JCP spec that is not final yet.  But that doesn't stop
you from working on such an implementation, on the assumption that it will
eventually go final (since JSF 1.2 is part of JavaEE 5, I think that's a
pretty good bet :-).



I doubt very much if MyFaces will manage to release a 1.2-compatible
version in the next six months. Sun have made JSF 1.2 dependent on a new
version of the EL expression language library, and on a new version of
JSP. Until those exist MyFaces can't even begin to implement much of JSF
1.2.

And I'm not aware of any progress on implementing the next JSP version
by Apache Tomcat or other such projects. As far as I am aware, Sun is
the only one with an implementation of this near completion. That would,
in fact, prevent the official release of the spec for many
organisations; it's common to require at least 2 successful
implementations of a spec before it is considered ready for release. I'm
not sure that Sun works by those rules though.

MyFaces is intending to add some JSF1.2 type features into the current
1.1-compatible release. Encrypted client-side sessions are already done
for example.

In addition, there is still a lot of work to be done to stabilise the
current 1.1-compatible release. I personally would like to see effort
put into this before moving on to the next spec version.


One option for the MyFaces community to consider, with regards to JSF 1.2,
is to utilize some portions of the JSF 1.2 reference implementation, which
(unlike the JSF 1.1 RI) is under the CDDL license.  The implementation of
the new EL APIs seems like an obvious candidate for this.  In turn, though,
this would require pushing on Apache to accept dependencies on CDDL-licensed
code -- from my conversation with insiders, there seems to be no conceptual
problem with CDDL's terms; it's caught up in a larger strategic initiative
on dealing with non-Apache-licensed software.  If the MyFaces community
wants to, this would be an obvious case where it would benefit the world.
I'd happily go advocate that scenario, if the MyFaces community felt that
this was the right direction to go.

It isn't by any means required that such a dependency last forever -- if it
makes sense to create your own implementation, that's perfectly fine.
Consider using the RI code a short term strategy to get a release out the
door more quickly than would otherwise be possible.  If the code works, and
does everything you need, then no harm in relying on it.  If it doesn't,
replace it -- that's what open source is about.

But I need to reiterate a comment above, because it is not obvious to me
that the MyFaces development community has figured out all the implications
yet:

* JSF 1.2 will be (when it is released -- trust me, that is not a long time
away :-) a *required*
 API to be supported by any Java EE 5 server.

* That means, any app server vendor who is planning on implementing Java EE
5 is going
 to need to make a JSF technology choice sooner, rather than later.

* At the moment, there is only one viable JSF 1.2 implementation that I am
aware of.
 In the absence of any other choice, this will become the 

Re: JSF Chart Creator and JSF Client Side Validators

2006-01-05 Thread Martin van den Bemt



About Licensing:
If we do not distribute the JFreeChart-Library with the component and just 
document the dependency, would this make it possible to include the component?


No.


Mvgr,
Martin


Re: JSF Chart Creator and JSF Client Side Validators

2006-01-05 Thread Martin van den Bemt
This was never allowed to begin with (although projects made some 
mistakes in the past, which were corrected). The discussion on legal is 
to make it allowable, which as you probably have noted, is taking some time


Mvgr,
Martin

Martin Marinschek wrote:

No?

As in no, the discussion in legal has already been settled, and this
is not allowed?

regards,

Martin

On 1/5/06, Martin van den Bemt [EMAIL PROTECTED] wrote:



About Licensing:
If we do not distribute the JFreeChart-Library with the component and just
document the dependency, would this make it possible to include the component?


No.


Mvgr,
Martin





--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



Re: JSF Chart Creator and JSF Client Side Validators

2006-01-05 Thread Martin van den Bemt

I hope before the java language gets obsolete ;)

Mvgr,
Martin

Martin Marinschek wrote:

Thanks for the update on the discussion - wonder at what time this
will have settled ;)

regards,

Martin




Re: JSF Chart Creator and JSF Client Side Validators

2006-01-05 Thread Martin van den Bemt

Werner Punz wrote:

Martin van den Bemt wrote:


I hope before the java language gets obsolete ;)

Mvgr,
Martin

Martin Marinschek wrote:



Thanks for the update on the discussion - wonder at what time this
will have settled ;)

regards,

Martin





Btw. interesting point of view, as Martin already has said, because
java, to begin with was/is not under an APL2 compatible licens ;-)



afaik the java language itself hasn't got that problem, just the 
implementations.


Mvgr,
Martin


Re: MyFaces Cherokee

2005-12-15 Thread Martin van den Bemt

The goal is that cherokee works with all jsf implementations, if you mean that 
by standalone that is..

Mvgr,
Martin

Nicklas Karlsson wrote:


I think the big priority now is Maven, a new release and incorporating
Tobago into MyFaces.  Once we've absorbed Tobago, the next logical
step seems to be the ADF donation.  There is a lot of work to do there
to bring the ADF stuff into alignment with MyFaces but Oracle has said
they are willing and able to do the work.


Are the donated parts such that they are runnable as standalone? If so, 
you've got to watch out so it doesn't take on a life of its own :-)





Re: MyFaces Cherokee

2005-12-14 Thread Martin van den Bemt

I didn't see the blog entry, but the donation was officially announced at 
JavaPolis by Jonas Jacobi, John Fallows and Martin Marinschek and at apachecon 
in San Diego (by someone else :)..
Besides the contribution, I think Jonas and John will be a great addition to 
the Apache / Apache MyFaces community!


Mvgr,
Martin

Simon Kitching wrote:
Yep, it was there. And now it's gone. Presumably the few hundred people 
there at the presentation also saw it.


I'm guessing it's just a matter of Oracle wanting the initial 
announcement to be from their PR department rather than on a blog. 
Personally, I'd prefer to hear it direct from someone who actually 
*created* ADF rather than a PR hack but we all know corporates...


Hopefully it's all for real and the official announcement will come 
out shortly. The ADF library looks very cool, though properly 
integrating with MyFaces in both technical and social senses is likely 
to be a big job



Nicklas Karlsson wrote:

Umm. Where did the fresh entry about Oracle donating 100+ JSF 
components from ADF Faces to the MyFaces Cherokee-project go? There 
was a mentioning that the offical documents hadn't been signed yet. 
Did anyone else see it before it vanished?


On 12/13/05, *Nicklas Karlsson* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Any more information on this?

http://www.orablogs.com/jjacobi/








Re: AW: website down

2005-11-28 Thread Martin van den Bemt

Nagios should ping the right persons..

Mvgr,
Martin

Matthias Kahlau wrote:

Hi!

I can confirm this, but don't know who to notify.


Regards,
Matthias



-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag
von Dennis Byrne
Gesendet: Montag, 28. November 2005 11:09
An: users@myfaces.apache.org
Betreff: website down


http://myfaces.apache.org/ and http://apache.org/ appear to 
be down for me.  

Can someone confirm this?  If anyone knows who to notify, 
please do.


Dennis Byrne





Re: Development problems with JSF

2005-11-28 Thread Martin van den Bemt
Just clear the session or remove myfaces specific session attributes 
(that's what I do to make sure everything is reparsed).
I thought the session attribute for the page is named after the jsp 
filename on the physical filesystem.


Mvgr.
Martin

Eurig Jones wrote:

Hi,

I've been having a lot of trouble this week developing my JSF 
application. I've found it very time consuming to update/test my code 
due to sessions (i guess its a session related problem anyway).


Everytime I do an update (to a JSF tag for example), I find that I have 
to reload the application, and restart the browser to get it to run 
correctly. Its ok when I edit some backend code, but its extremely 
annoying having to reload and close browser all the time when I update a 
tag value. The session seems to keep the bean values after you reload.


How do you lot get around this problem?

I'm using MyEclipse with the latest MyFaces release.

Regards,
Eurig



Re: Development problems with JSF

2005-11-28 Thread Martin van den Bemt
In my case I use my own myfaces servlet, check if the site is in 
development mode, and just remove the jsf specific values from the session.

Something like this :

HttpSession session = ((HttpServletRequest) 
request).getSession();

if (session != null) {
Enumeration en = session.getAttributeNames();
while (en.hasMoreElements()) {
String name = (String) en.nextElement();
if (name.indexOf(target) != -1) {
// remove this key...
System.out.println(NOT REMOVING SESSION 
ATTRIBUTE :  + name);

session.removeAttribute(name);
// and stop the while loop.
break;
}

}
}

target = the jsf session key (just print out everything in the session 
to see how the key is contrsucted)


Since this a pretty abnormal use case, maybe this can be done in some 
prerendering phase in myfaces, but I really don't have a clue how to 
handle that, but you want this to happen before the session is read by 
myfaces and in a place where you can get a hold of the HttpSession.


Mvgr,
Martin

Eurig Jones wrote:
How do i clear the session?? Can you do this everytime you reload the 
app or something? I'm not sure how to remove myfaces specific session 
attributes either.


Martin van den Bemt wrote:

Just clear the session or remove myfaces specific session attributes 
(that's what I do to make sure everything is reparsed).
I thought the session attribute for the page is named after the jsp 
filename on the physical filesystem.


Mvgr.
Martin

Eurig Jones wrote:


Hi,

I've been having a lot of trouble this week developing my JSF 
application. I've found it very time consuming to update/test my code 
due to sessions (i guess its a session related problem anyway).


Everytime I do an update (to a JSF tag for example), I find that I 
have to reload the application, and restart the browser to get it to 
run correctly. Its ok when I edit some backend code, but its 
extremely annoying having to reload and close browser all the time 
when I update a tag value. The session seems to keep the bean values 
after you reload.


How do you lot get around this problem?

I'm using MyEclipse with the latest MyFaces release.

Regards,
Eurig






Re: Development problems with JSF

2005-11-28 Thread Martin van den Bemt
The system I have integrated myfaces in has a development mode and tried 
to make myfaces comply to that idea... :)
The solution I did was qd, so you can always make a solution that works 
for you..


Mvgr,
Martin

Eurig Jones wrote:
I see what you're doing here. The problem is is that you dont want to 
remove the values after every single call to your myFaces servlet, just 
the very first one after a code change.


Also, I didn't realise MyFaces had a development mode. If so, what does 
it do exactly?


Thanks,
Eurig

Martin van den Bemt wrote:

In my case I use my own myfaces servlet, check if the site is in 
development mode, and just remove the jsf specific values from the 
session.

Something like this :

HttpSession session = ((HttpServletRequest) 
request).getSession();

if (session != null) {
Enumeration en = session.getAttributeNames();
while (en.hasMoreElements()) {
String name = (String) en.nextElement();
if (name.indexOf(target) != -1) {
// remove this key...
System.out.println(NOT REMOVING SESSION 
ATTRIBUTE :  + name);

session.removeAttribute(name);
// and stop the while loop.
break;
}

}
}

target = the jsf session key (just print out everything in the session 
to see how the key is contrsucted)


Since this a pretty abnormal use case, maybe this can be done in some 
prerendering phase in myfaces, but I really don't have a clue how to 
handle that, but you want this to happen before the session is read by 
myfaces and in a place where you can get a hold of the HttpSession.


Mvgr,
Martin

Eurig Jones wrote:

How do i clear the session?? Can you do this everytime you reload the 
app or something? I'm not sure how to remove myfaces specific session 
attributes either.


Martin van den Bemt wrote:

Just clear the session or remove myfaces specific session attributes 
(that's what I do to make sure everything is reparsed).
I thought the session attribute for the page is named after the jsp 
filename on the physical filesystem.


Mvgr.
Martin

Eurig Jones wrote:


Hi,

I've been having a lot of trouble this week developing my JSF 
application. I've found it very time consuming to update/test my 
code due to sessions (i guess its a session related problem anyway).


Everytime I do an update (to a JSF tag for example), I find that I 
have to reload the application, and restart the browser to get it 
to run correctly. Its ok when I edit some backend code, but its 
extremely annoying having to reload and close browser all the time 
when I update a tag value. The session seems to keep the bean 
values after you reload.


How do you lot get around this problem?

I'm using MyEclipse with the latest MyFaces release.

Regards,
Eurig









Re: [ANNOUNCEMENT] JavaPolis

2005-11-25 Thread Martin van den Bemt

Absolutely.. Though not sure what session I am going to take yet..
I will be there the whole week btw. Curious who else from apache is going..
Although I don't think I will do any beer (cola is ok though), since I 
have to drive home afterwards :)


Mvgr,
Martin

Martin Marinschek wrote:

Hi *,

all of you who go to the JavaPolis this year: I'd like to invite you
to come to the session in Room 1, 9:30-12:30, 12th December 2005:

J2EE Web Apache MyFaces, by Martin Marinschek, John Fallows and Jonas Jacobi

and to the BOF in the evening at 21:30-22:30:

JSF and Apache MyFaces - User Feedback

if you guys want, we might head out for a beer afterwards. Anyone interested?

regards,

Martin



Re: java.lang.IllegalStateException: org.apache.myfaces.webapp.webxml.WebXml.init must be called before!

2005-11-10 Thread Martin van den Bemt

Seems like you are missing :
!-- Listener, that does all the startup work for myfaces 
(configuration, init). --

listener
listener-class
org.apache.myfaces.webapp.StartupServletContextListener
/listener-class
/listener
from the web.xml ?

Mvgr,
Martin

Khurram Ahmed wrote:
I have developed an application using my faces version 1.0.9 using 
tomcat as my servlet container, i was able to deploy the application on 
Oracle Application Server 10.1.3 Developer preview 4, however i am 
unable to run the same application on oracle application server 
10.1.2.0.2 and encounter the following errors



500 Internal Server Error

java.lang.IllegalStateException: 
org.apache.myfaces.webapp.webxml.WebXml.init must be called before!

at org.apache.myfaces.webapp.webxml.WebXml.getWebXml(WebXml.java:131)
at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:385)
at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:246)

at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.EvermindPageContext.forward(EvermindPageContext.java:224)

at _index._jspService(_index.java:48)
[SRC:/index.jsp:5]
at com.orionserver[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)

at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind[Oracle Application Server Containers for J2EE 10g 
(10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

at java.lang.Thread.run(Thread.java:534)

I am getting the same error in my server log, what exactly could be the 
reason for this error? Has anyone faced a similar error and found a 
solution?


Re: java.lang.IllegalStateException: org.apache.myfaces.webapp.webxml.WebXml.init must be called before!

2005-11-10 Thread Martin van den Bemt
StartupServletContextlistener is the only place that actually calls 
WebXml.init() (besides from the MyFacesGenericPortlet), so even though 
you may actually have this thing configured in the web.xml, it seems you 
may have misconfigured or your container doesn't understand the concept 
of servlet context listeners. If the latter is true, try using the 
MyFacesServlet in your web.xml mapping, since that should try to 
initialize faces if it is not initialized already (talking 1.09 here, 
don't know about later versions)


Mvgr,
Martin

Khurram Ahmed wrote:
Well ive already configured the StartupServletContextListener that isnt 
the problem, id also like to add that ive posted to this mailing list 
after looking around for all possible answers to the question that i 
could come up with on my own or on google




On 11/10/05, *Martin van den Bemt* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Seems like you are missing :
 !-- Listener, that does all the startup work for myfaces
(configuration, init). --
 listener
 listener-class
 org.apache.myfaces.webapp.StartupServletContextListener
 /listener-class
 /listener
from the web.xml ?

Mvgr,
Martin

Khurram Ahmed wrote:
  I have developed an application using my faces version 1.0.9 using
  tomcat as my servlet container, i was able to deploy the
application on
  Oracle Application Server 10.1.3 Developer preview 4, however i am
  unable to run the same application on oracle application server
  10.1.2.0.2 and encounter the following errors
 
 
  500 Internal Server Error
 
  java.lang.IllegalStateException:
  org.apache.myfaces.webapp.webxml.WebXml.init must be called before!
  at org.apache.myfaces.webapp.webxml.WebXml.getWebXml(WebXml.java
:131)
  at
 

org.apache.myfaces.application.jsp.JspViewHandlerImpl.getServletMapping(JspViewHandlerImpl.java:385)
  at
 

org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java
:246)
  at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 

(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(
ServletRequestDispatcher.java:330)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 

(10.1.2.0.2)].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 

(10.1.2.0.2)].server.http.EvermindPageContext.forward(EvermindPageContext.java:224)
  at _index._jspService(_index.java:48)
  [SRC:/index.jsp:5]
  at com.orionserver[Oracle Application Server Containers for J2EE 10g
  (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java :350)
  at
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java :853)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 

(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 

(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
  (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(
HttpRequestHandler.java:830)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
 
(10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
  at com.evermind[Oracle Application Server Containers for J2EE 10g
  (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(
ReleasableResourcePooledExecutor.java:192)
  at java.lang.Thread.run(Thread.java:534)
 
  I am getting the same error in my server log, what exactly could
be the
  reason for this error? Has anyone faced a similar error and found a
  solution?




Re: Cannot parse tomahawk.jar configuration

2005-10-27 Thread Martin van den Bemt

The message comes from the sun jsf implementation, not myfaces.
See these 2 lines :
 com.sun.faces.config.ConfigureListener.parse(ConfigureListener.java:1182)
 at
 
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:228) 




Mvgr,
Martin

Louis Burroughs wrote:


I have been running MyFaces on Tomcat 5.0.30.  I do not believe my setup 
has changed, but today I started getting the error below:


com.sun.faces.config.ConfigureListener - Can't parse configuration 
file:jar:file:/C:/workspaces/ptw_workspace/PtwV2/WebContent/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml 


java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.init(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at 
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:784) 

at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:736) 

at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:661) 

at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:905) 

at 
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown 
Source)
at 
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at 
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at 
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
at 
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at 
com.sun.faces.config.ConfigureListener.parse(ConfigureListener.java:1182)
at 
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:228) 

at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3831) 

at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4323)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)

at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Any hints?  or is this a tomcat issue?

Louis M. Burroughs III


Re: faces-config.xml

2005-10-21 Thread Martin van den Bemt

Have a look at the org.apache.myfaces.config package...

Mvgr,
Martin

Dennis Byrne wrote:
I want to run unit tests on faces-config.xml .  I am prepared 
to do this w/ DOM, but what I'd like to do is use the 
digester stuff used in the internals.


Can anyone point me in a direction for this ?
Dennis Byrne



Re: Conditional include in JSF page

2005-10-19 Thread Martin van den Bemt
It would be nice if you found a way to say how you achieved it, so 
others can learn from that too...


Mvgr,
Martin

[EMAIL PROTECTED] wrote:

I found a way. If You have an elegant solution You tell it me.



-- Original-Nachricht --
Reply-To: MyFaces Discussion users@myfaces.apache.org
Date: Tue, 18 Oct 2005 23:56:34 +0200
From: [EMAIL PROTECTED]
Subject: Conditional include in JSF page
To: users@myfaces.apache.org



Hello

Who can give me a working solution for a conditional include.
In the config file a have this entry

managed-bean
  descriptionPartner/description
  managed-bean-namePartner/managed-bean-name
  managed-bean-classorg.partneragency.web.PartnerBean/managed-bean-class
  managed-bean-scoperequest/managed-bean-scope
/managed-bean

In the partner bean I the loggedIn property which is true if the partner
is logged in.
I need a working code like this
  if not loggedIn then
include page login.jsp

What can I realize this?

Thanks

Urs







Re: survey: what tool are you using for JSF ?

2005-10-19 Thread Martin van den Bemt

They started working on it http://www.eclipse.org/webtools/jsf/.
Though no visual editor is planned yet..

Mvgr,
Martin

Conway. Fintan (IT Solutions) wrote:

Hi Ted,

Does the Web Tool Platform plugin have a JSF GUI tool?  If it has I
would be very interested in using it.

Many thanks,

Fintan

-Original Message-
From: Ted Jones [mailto:[EMAIL PROTECTED] 
Sent: 18 October 2005 18:02

To: MyFaces Discussion
Subject: RE: survey: what tool are you using for JSF ?


We are using Eclipse 3.1 with the Web Tool Platform plugin
(http://www.eclipse.org/webtools/wst/main.html). Very fast and WST has a
lot of great features.

-Original Message-
From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 17, 2005 12:43 PM

To: MyFaces Discussion
Subject: Re: survey: what tool are you using for JSF ?

NB 5.0 here too. I develop my JSF pages as .xml files, so in fact any
editor would work.

Randahl


Francesco Consumi wrote:



Hi people,

I'm asking what kind of IDE/Tool are you using for developing your JSF




Web apps.
We're using NetBeans 5.0, but I'm beginning to think it isn't too
fast.









* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *





Re: prevent a user from double clicking on a submit button

2005-10-12 Thread Martin van den Bemt

The javascript solution is to return false in the event..

Mvgr,
Martin

Felix Japs wrote:

Hi,

how to prevent a user from double clicking on a submit button or a link.
Exists a JavaScript solution or a solution for the server side?

bye

Felix