Bear Bibeault wrote: We need more information to determine not only how to approach the problem, but what the problem actually is in the first place.
We are not using any redirect in our servlets. When ever user hits the URL request goes to security server first and then it sends it back to our server. Once request comes to our server, we handle it in normal way with customer framework(Based on Struts concept). Application is normal but there is a security server on top of it which actually drives the request. I don't how they are doing it but so for me it behaves like every request it hijacks and redirects to our server.
I am not trying to set my own data in "accept-language", It is my last hope if I can send "en_us" and "es" for each language selection into "accept-language" header field then security server will maintain it and I can read it when request comes back.
and you are right it looks like above approach will not work to set own data (Other company is doing it, and security server sends user first name/login name and some other information in http-header, so they are expecting us to send some data back to them in header) but right now I am just looking how I can set en_us or es in "accept-language" from servlet.
Sorry about not giving all information. Actually we provide an option to switch language on every page, Once user clicks the button, It calls one method to set language parameter.
Exactly it works as by clicking button it goes to Security server and from there it comes to my method which sets language parameter in session and then page gets loaded in that language.
But later when user clicks next or submit session gets cleaned by security server. To maintain I need to pass attribute with particular name in request header only. Security server is design as it will keep only particular things and only inside header, all other things inside session and request gets removed by it and that is how it is designed to keep web protected. Now design can not be changed as Security server is managed by some other company and they are asking us to set language parameter in request header. I am trying to set header when it comes back first time in switching language method or I can write it in servlet so it can be maintained and I won't have to set it every time but I don't know what is syntax to do it.
Actually every time page gets submitted first request goes to security server. At that time I need to pass a language parameter to maintain. If I set that perticular parameter in header while redirecting back it will keep that parameter in header. And I need it to maintain user selected language to load pages for that language. So far I was passing it in session or in request which does not pass through it. So I need to set language attribute to Http header.
there is a difficult situation I have. My portal was working fine alone but now client placed a security server on top of our web server which cleans session and rewrites some data back to it. Now to communicate with it I need to pass some information in http header. Can any one please let me know how we can write to http header.
So far I was reading info by request.getheader() function but never needed to write to header. I saw that request has only get header but I could not find any methoss by which you can add parameter to request header.
Thanks every one for you response. The actual problem was there is one more security server on top of our web server which writes to response and then redirects to our server. That's why it was throwing error. And for solution I just set a new page action refereshed the page and it worked. Thanks again for all your comments.
THanks for responding.
Actually it works like this current jsp is just an intermediate page and request is coming from client server. I think client server is redirecting the request.I knew why that error is coming but what could be the solution for it?
Is there any API or functionality which opens a specific page of MS Office document (mainly .DOC)
We can open a specific page of attached pdf and this functionality is supported by its API.
Like at attaching document user enters a page number 4 and we create a hyper link for it and by clicking on it Page 4 opens directly first time.
i am facing problem with enter key . I have an image and i call a finction on onclick event. In this function a value prviously stored in database is being passed as argument(value is text content).
but when i get enter key in text content it gives unterminated string constant.
In one appliation i am facing a criticle problem. all attachements attached with document are displayed in one frame of JSP(there is a main JP and 3 frames in side it for 3 different type of information). When user click on name request goes on server, it return with data (stored in blob field in database) on main jsp by request. Then on main page data is being set in session. In frame page after taking data from session by session.getattribute i remove it from session and writes it in outputstream object and File download box comes with option open/save/cancel. on clicking open attachment opens.
This works fine here at my local server and testing server properly for all type of attachment. At client side on testing server it works fine for doc,txt,pdf but for ppt,pptx and docx, after clicking on OPEN or SAVE in file download box, internal frame page reloads again and it tries to get data from session again but as first time data is been removed from session it shows "No attachment Found".
How it can be possible?? Is it possible that this problem is dew to any browser settings or server settings?
We use IE 7 browser. Here is the code of inner frame JSP.
I am getting all file name / content type proprrly first time. No request submmited at server when this JSP reloads.