Johannes Brodwall | 1 Jan 2007 02:11
Gravatar

Re: Maven 2 dependency on geronimo-spec:geronimo-spec-jta replaced with javax.transaction:jta

On 12/30/06, Jan Bartel <janb <at> mortbay.com> wrote:
>
> I can't find the jta-1.0.1B.jar in the maven2 repos, just the pom
> for it. I'll keep and eye on it and when the jar turns up, I'll
> change jetty to use it instead of the geronimo one.

Sorry - my bad. Hibernate has a dependency on JTA, so I had installed
it manually.

> Re the "provided" scope dependencies, can you explain what you mean
> by "running jetty-plus for a maven2 project"? If, for example, you're
> using the jetty maven plugin then those jars will automatically be on
> the runtime path. I'm happy to consider changing the scope, but I need
> to understand first why it needs to be done.

If I put jetty-plus as a dependency in a project, jetty and
jetty-naming are not added to the classpath. As you can see on
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html,
a provided dependency "is not transitive."

I have started making projects depend directly on jetty more often now
because 1) the embedded support in Jetty is really good, and I like to
write "my own application server" that includes jetty and 2) I can
start Jetty in a JUnit test and do embedded integration testing. For
more information on this "trick", see my blog at
http://www.brodwall.com/johannes/blog/2006/12/10/in-process-web-integration-tests-with-jetty-and-jwebunit/
(By the way - I am planning on expanding this into a full sized
article for ONJava.com, any comments would be very welcome). Here is
an example of a POM where I would like to remove the dependencies on
jetty and jetty-naming, so there's just the jetty-plus dependency
(Continue reading)

Johannes Brodwall | 1 Jan 2007 02:23
Gravatar

Re: Maven 2 dependency on geronimo-spec:geronimo-spec-jta replaced with javax.transaction:jta

You are right about JTA, Stefan. Thanks for pointing this out.

But notice that the page you referenced in out of date. Activation,
JDO2-api, javax.mail, EJB3 persistence-api, servlet-api, jsp-api,
jstl, and portlet-api are all in the Maven repository now.

AFAIK, the licensing issues have in theory been resolved, but there's
sadly still a lot missing from the Maven 2 repository.

~Johannes

On 12/31/06, Stefan Armbruster <ml001 <at> armbruster-it.de> wrote:
> Hi,
>
> jta is not in the official m2 repos due to license issues. See
> http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html for
> details. In short: You have to download the stuff from Sun yourself
> (http://java.sun.com/products/jta) and manually add it to your repo.
>
> Stefan
>
> Am Samstag, 30. Dezember 2006 22:59 schrieb Jan Bartel:
> > Hi Johannes,
> >
> > I can't find the jta-1.0.1B.jar in the maven2 repos, just the pom
> > for it. I'll keep and eye on it and when the jar turns up, I'll
> > change jetty to use it instead of the geronimo one.
> >
> > Re the "provided" scope dependencies, can you explain what you mean
> > by "running jetty-plus for a maven2 project"? If, for example, you're
(Continue reading)

Leos Literak | 2 Jan 2007 17:43
Picon
Favicon

jetty 6 and international characters

Hi,

I've just decided to upgrade from jetty 4.1 to 6.0.2.
The conversion seemed to be smooth until I entered
non-ascii characters. Then my application started
to behave differently than within 4.1.

My desktop is running Linux with cs_CZ locale.
I access request parameters this way:
String tmp = request.getParameter("note");
String note = new String(tmp.getBytes("ISO-8859-1"));
This way it always worked and I received data
in correct coding. If I used different methods,
(new String(tmp.getBytes(),"ISO-8859-1"))
then 'note' variable contained ? characters instead
of national characters (example: žížala -> ???ala)

But when I run same code in same environment under
jetty6, tmp is already damaged and it contains ??ala
(notice only two ??) and getBytes() cannot fix the coding.

The locale information is same with both 4.1 and 6.0.2
default locale = cs_CZ
request locale = cs
So I guess that this is either jetty or its configuration
issue.

Can you help me, please?

Leos
(Continue reading)

Filip Jirsák | 2 Jan 2007 20:47
Picon

Re: jetty 6 and international characters

> 
> Hi,
> 
> I've just decided to upgrade from jetty 4.1 to 6.0.2.
> The conversion seemed to be smooth until I entered
> non-ascii characters. Then my application started
> to behave differently than within 4.1.

Hi,
the problem is in method
org.mortbay.jetty.HttpURI.decodeQueryTo(MultiMap, String)
which decodes URL parameters always as they are in UTF-8 encoding.
HTTP spec says URL should be in UTF-8, but all web browser I know
send query parameters from forms in the same encoding as source
page (which contains HTML form) has. Few days ago I found similar
bug in decoding URL - when URL contains encoded some non-ascii characters
(for example GET /example.com/Z%C3%A1pisy/), these characters are lost
within decoding URL. In this case there is a problem in
mixing bytes and characters in Jetty. I'll look at my tests and
workarounds for this problem and will try to prepare
some patch for this.
Filip Jirsák

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jetty-support mailing list
(Continue reading)

Jan Bartel | 2 Jan 2007 23:42

Re: jetty 6 and international characters

Hi Leos,

There is a FAQ entry about character encoding from the
jetty5 site that has not yet been ported to the jetty6
wiki, but is still useful background reading:
http://jetty.mortbay.org/jetty5/faq/faq_s_900-Content_t_International.html

For jetty6, you can do either of the following to get 
the request params in the encoding you want to use:

1. call request.setQueryEncoding() before reading any of
   the content or params. See:
   http://jetty.mortbay.org/apidocs/org/mortbay/jetty/Request.html#setQueryEncoding(java.lang.String)

2. set the system property "org.mortbay.util.URI.charset" to
   the encoding you want to use.

Hope that helps,
Jan

Leos Literak wrote:
> Hi,
> 
> I've just decided to upgrade from jetty 4.1 to 6.0.2.
> The conversion seemed to be smooth until I entered
> non-ascii characters. Then my application started
> to behave differently than within 4.1.
> 
> My desktop is running Linux with cs_CZ locale.
> I access request parameters this way:
(Continue reading)

Chris Haynes | 3 Jan 2007 00:22
Picon

Re: jetty 6 and international characters


On Tuesday, January 2, 2007 at 7:47:27 PM, Filip Jirsák wrote:

> Hi,
> the problem is in method
> org.mortbay.jetty.HttpURI.decodeQueryTo(MultiMap, String)
> which decodes URL parameters always as they are in UTF-8 encoding.
> HTTP spec says URL should be in UTF-8,
> 
> 

Please do tell us which RFC says that the URL should be in UTF-8. 

> ...
> Filip Jirsák

Chris Haynes

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support
Greg Wilkins | 3 Jan 2007 02:06
Gravatar

Release candidate 6.1.0rc3


Release candidate 6.1.0rc3 is now available via http://jetty.mortbay.org

This one would have been 6.1.0 except that we changed to used
the standard builds of the javax.servlet jars - so we want to check
that nothing is badly broken.

There is also a cool new testing feature that we slipped in, see
  http://blogs.webtide.com/gregw/2006/12/16/1166307599250.html

Unless there is a significant problem, 6.1.0 will follow shortly

jetty-6.1.0rc3 - 2 Jan 2006
 + JETTY-195 fixed ajp ssl_cert handling
 + JETTY-197 fixed getRemoteHost
 + JETTY-203 initialize ServletHandler if no Context instance
 + JETTY-205 setuid fix
 + setLocale does not use default content type
 + Use standard releases of servlet and jsp APIs.
 + implement resource injection and lifecycle callbacks declared in web.xml
 + extras/servlet-tester

--

-- 
Greg Wilkins<gregw <at> webtide.com>  US: +1  3104915462   IT: +39 3349267680
http://www.webtide.com           UK: +44(0)2079932589 AU: +61(0)417786631

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
(Continue reading)

Leos Literak | 3 Jan 2007 07:20
Picon
Favicon

Re: jetty 6 and international characters

Filip Jirsák wrote:
> the problem is in method
> org.mortbay.jetty.HttpURI.decodeQueryTo(MultiMap, String)
> which decodes URL parameters always as they are in UTF-8 encoding.

actually the URL is plain us-ascii, the parameters are URL encoded:
localhost:8080/charset?note=%BE%ED%BEala

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support

Leos Literak | 3 Jan 2007 07:41
Picon
Favicon

Re: jetty 6 and international characters

Thank you Jan for your help. I had just few minutes now,
so I tested few combinations only.

1) I created real form to submit parameter via POST
2) I implemented filter for the servlet to verify that
nobody calls setQueryEncoding earlier
3) I tried to call this method with ISO-8859-1, -2 and UTF-8
and immediatelly I grabbed request.getParameter(), nonetheless
I always received same result: ??ala.
4) I tested setting this property in the filter init() method,
but again it had no influence.

Leos

Jan Bartel wrote:
> There is a FAQ entry about character encoding from the
> jetty5 site that has not yet been ported to the jetty6
> wiki, but is still useful background reading:
> http://jetty.mortbay.org/jetty5/faq/faq_s_900-Content_t_International.html
> 
> For jetty6, you can do either of the following to get 
> the request params in the encoding you want to use:
> 
> 1. call request.setQueryEncoding() before reading any of
>    the content or params. See:
>    http://jetty.mortbay.org/apidocs/org/mortbay/jetty/Request.html#setQueryEncoding(java.lang.String)
> 
> 2. set the system property "org.mortbay.util.URI.charset" to
>    the encoding you want to use.
> 
(Continue reading)

Filip Jirsák | 3 Jan 2007 11:02
Picon

Re: jetty 6 and international characters

Chris Haynes <chris <at> harvington.org.uk> writes:

> 
> Please do tell us which RFC says that the URL should be in UTF-8. 
> 

Good question :-) It is neither in RFC 2616 nor in some related RFC, so it was
my mistake. But UTF-8 as recommendation for URL is in HTML 4.01 Specification -
http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.1 and in W3C's
Internationalized Resource Identifiers -
http://www.w3.org/International/O-URL-and-ident.html

So there is still no recommendation for characters set in HTTP URL. (I mean
character set after % hex hex decoding, raw URL is always us-ascii.)

Filip Jirsák

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support

Gmane