This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes Hi.Guys!I need some help:) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Hi.Guys!I need some help:)" Watch "Hi.Guys!I need some help:)" New topic
Author

Hi.Guys!I need some help:)

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sorry for the bad grammar.

My environment is :

apache2.2.10
jdk1.6.0_11
mysql5.1.30
resin3.2.1

I add code in Apache httpd.conf


Now,I can install Jforum and visit it,but when I post a topic,It feeds back a NullPointerException



If somebody could give me some advise, I will be appreciated.Thx!
[originally posted on jforum.net by tyethin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I forget to give the Url.

http://www.kooxin.com/bbs/forums/list.page


Register,and post a topic,there is the err ;)
[originally posted on jforum.net by tyethin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Most likely, the error message displayed reflects a problem with the exception.html template and not the true cause. I.e., the error reporting code is throwing the NullPointer exception when it's trying to report the real error.

Check the application server logs to see if there is an underlying error. Probably right above the the NullPointer one.


[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thx for the help!

I got feed back from my friend,and I think it must be useful.

"when post a topic,the request content-length=-1 will throw a exception"

"If you want a Content-Length, you'll need to get resin to calculate it and send it out. "

> the problem is that apache set the header content-encoding to be chunked
> before send the response.
> this is a problem because the client is not http\1.1 compliant and doesn't
> work if there are no content-length header.
>
> infact using browser all works fine even though in the download window there
> are no information about content length.
>
> So I ask you if you know some workaround to unable the header
> content-encoding so the client can see content-length. ...[show rest of quote]
It's not the header itself that is the problem, it is the chunked encoding.

The first question I'd ask is why the chunked encoding is getting sent
in the first place. Apache should only send chunked if the client
states in the request-line that it is HTTP/1.1. Is the client lying
about what it supports?

Under the assumption that you have a broken client, you can use
BrowserMatch ClientUA downgrade-1.0
See:
http://httpd.apache.org/docs/2.2/env.html#special
You may also need nokeepalive, depending on the nature of the clients problems.

None of this will actually get you a Content-Length header. Apache
can't generate that in any reasonable way, because it doesn't know the
content-length before sending the response. If you want a
Content-Length, you'll need to get resin to calculate it and send it
out.

But even an HTTP/1.0 client should be able handle a non-chunked
response without content length. The server simply closes the
connection to indicate that all the content has been sent.
[originally posted on jforum.net by tyethin]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK- -;
It seems like that I have to abandon apache + resin.
fortunately,Jforum is work well in Resin Standalone.
[originally posted on jforum.net by tyethin]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi.Guys!I need some help:)
 
Similar Threads
null pointer exception after response.sendRedirect() in jsp page.
org.jtestcase. JTestCaseException : Error retrieving params.
Exception while creating form bean
How to solve DynamicClassLoader exception
Integrating Weblogic8.1 with Apache2.0