aspose file tools*
The moose likes Servlets and the fly likes servlet cannot be found if one parameter is too long Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet cannot be found if one parameter is too long" Watch "servlet cannot be found if one parameter is too long" New topic
Author

servlet cannot be found if one parameter is too long

Baijun Jiang
Greenhorn

Joined: Oct 13, 2005
Posts: 17
In my application a jsp A interact post some parameters(a form) to Servlet B. Normally B's doPost method can handle it properly. However, when one of the parameter from A to B becomes longer(eg. 2000 characters), an crazy error occurs: "The page cannot be displayed".
I did some tests regarding this problem. It seems that
1. If A sends the form to a jsp page C, C can receive it and display the parameters correctly.
2. Even if after I rewrite the content inside B's doPost method to be empty, B still cannot be found by the server.
3. I hosted the application in 2 different PCs. I got the same errorfrom both of them.

Does anyone encounter this kind of thing before? what might be the solution?


SCEA, CISA.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Are you getting the thing inside doPost() method of servlet B?
How do you come to know that the servlet can not be found?
What error are you getting other than "The page can not be displayed"?

However, "The page can not be displayed" doesn't mean that your servlet can't be found.
Baijun Jiang
Greenhorn

Joined: Oct 13, 2005
Posts: 17
Hi. It is simply a DNS error. After I right click and then select property. The url shown is res://C:\WINNT\system32\shdoclc.dll/dnserror.htm#http://localhost/CAAS-test/servlet/detailFunction
Therefore I conclude that the servlet cannot be found.

This error does not relate to any content written by me in the servlet, coz in one of my test the doPost method is empty but I still get the same problem.
[ December 22, 2005: Message edited by: Baijun Jiang ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Which servlet container you are using?
Any other apps are running or not?
Baijun Jiang
Greenhorn

Joined: Oct 13, 2005
Posts: 17
Of course... I use a tomcat server.
and Yes, I have many applications running in the same server.But I do not think it is a problem coz I also tested the application in a server which has no other app running on it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet cannot be found if one parameter is too long