File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JSP- Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP-"page" directive is a response header?" Watch "JSP-"page" directive is a response header?" New topic

JSP-"page" directive is a response header?

Subhadip Chatterjee
Ranch Hand

Joined: Dec 12, 2006
Posts: 93
Hi folks,
i was wondering if you can clarify on this fact...i mean,i assume "page" directive is for page attributes to be identified and set by the Server. So, it's more of a META info. But is it coming in Http response as header information???
[ January 11, 2007: Message edited by: Bear Bibeault ]

Refreshing life every moment...
Robert Berg

Joined: Dec 29, 2006
Posts: 10
No, it is not. It's merely holding some attributes the servlet container uses to process the page. But those aren't added as header information.

<a href="" target="_blank" rel="nofollow">Exception: null</a>
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100
Page attributes dont go as header but they appear in the generated servlet for example <@page import= appears as the import statements in the beginning of the generated servlet.

RAGHU<br /> <br />"When the going gets tough, the tough get going"
Subhadip Chatterjee
Ranch Hand

Joined: Dec 12, 2006
Posts: 93
That's true, bro...i also knew that, but what happened is whenever i am deploying my application into an app. server, it's firewall/proxy somehow manages to recognize the "page" info from the JSPs as HTTP response header. Hence if in JSP, the "page" attributes are spread in more than one line, the Application portal is throwing error, that WAS 5.0.x understands that as "multiline HTTP response headers" and thrwoing out "internal server error". I understood this, after i rewrite the "page" attributes in one line.

If you guys have come across such a dumb scenario, please feed me on that.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Unless something is really wrong, the page attribute should never be part of your output.
Are you saying that the JSP source is being returned when you make a request?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Subhadip Chatterjee
Ranch Hand

Joined: Dec 12, 2006
Posts: 93
Hi Ben,
i don't really know, 'cauz the Application is getting deployed in a diffrent location, and they have a App server hosting a B2B portal. Through this portal, whenever they are trying to access such kinda pages (JSP with "page" dierctive-multiline), they are ,getting "Internal server errors". And when i was doing a Trial-error method, i found this "page" directive stuff is the reason for that. It really doesn't make any sense, but still as far as the Application is concerned, it's working now. What can i say to that?Strange, man.
[ January 11, 2007: Message edited by: Subhadip Chatterjee ]
I agree. Here's the link:
subject: JSP-"page" directive is a response header?
It's not a secret anymore!