jsp

hai all

i am facing problem while requesting a jspfile.

i am requesting this jsp file from URL.

it is giving error on server as below.....

java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '4096' bytes instead of stated: '4421' bytes.

if have any solution mail me to

prashanthp@globsyn.co.in

[373 byte] By [ponugoti_p] at [2007-9-26 1:37:18]
# 1

Hi ponugoti p,

Here I am giving you some information about requesting jsp file from url

Requesting a JSP Page

A JSP page can be requested either directly--through a URL--or indirectly--through another Web page or servlet.

Directly Request a JSP Page

As with a servlet or HTML page, the end-user can request a JSP page directly by URL. For example, assume you have a HelloWorld JSP page that is located under the myapp application root directory in

the Web server, as follows:

myapp/dir1/HelloWorld.jsp

If it uses port 8080 of the Web server, you can request it with the following URL:

http://hostname:8080/myapp/dir1/HelloWorld.jsp

(The application root directory is specified in the servlet context of the application. "Servlet Contexts" summarizes servlet contexts.)

The first time the end-user requests HelloWorld.jsp, the JSP container triggers both translation and execution of the page. With subsequent requests, the JSP container triggers page execution only; the

translation step is no longer necessary.

Indirectly Requesting a JSP Page

JSP pages, like servlets, can also be executed indirectly--linked from a regular HTML page or referenced from another JSP page or from a servlet.

When invoking one JSP page from a JSP statement in another JSP page, the path can be either relative to the application root--known as context-relative or application-relative--or relative to the

invoking page--known as page-relative. An application-relative path starts with "/"; a page-relative path does not.

Be aware that, typically, neither of these paths is the same path as used in a URL or HTML link. Continuing the example in the preceding section, the path in an HTML link is the same as in the direct

URL request, as follows:

<a href="/myapp/dir1/HelloWorld.jsp" /a>

The application-relative path in a JSP statement is:

<jsp:include page="/dir1/HelloWorld.jsp" flush="true" />

The page-relative path to invoke HelloWorld.jsp from a JSP page in the same directory is:

<jsp:forward page="HelloWorld.jsp" />

I hope this will help you out.

Still you are having the problem please post the code.

Regards,

TirumalaRao.

DeveloperTechnicalSupport,

Sun MicroSystem,India.

rao_indts at 2007-6-29 2:23:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi,Please refer this URL for Protocol Exception. http://www.openly.com/link.openly/Docs/HTTPClient/httpurlconnection.htmlI hope you will get some idea.ThanksBakrudeen
bakrudeen_indts at 2007-6-29 2:23:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

thank u,

my actual problem is on server side.

the jsp page i am requesting is returning a lot of data.

i think the default method of request is "get".

and data that can send through get is limited(4096bytes)

when i am requesting my page it is returning more than the 4096 bytes. I am getting the page but with less data. actual error is on server.i am using weblogic server.If i request the page on form submission then i can specify method="POST" on form tag.

but since i am requesting this page from URL i am not able to change the method. Is there is any way to change the default method on server.

ponugoti_p at 2007-6-29 2:23:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...