suchit pandya

Ranch Hand
+ Follow
since Oct 27, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by suchit pandya

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.
7 years ago
Or we can set Accept-Language of header, might be some solution can come if I can set value in "Accept-Language" which is optional header field.
7 years ago
We can not set it from web page but is there any way that we can set it from servlet? OR it will be very difficult to set from servlet?
I might can manage it from servlet..
7 years ago
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.
7 years ago
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.
7 years ago
HI guys,

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 in advance.
7 years ago
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.
7 years ago
JSP
Hi Bill
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?
7 years ago
JSP


This is all my JSP is having and still it throws an error "java.lang.illegalstateexception cannot forward. response already committed". Can any one please help me with this?
7 years ago
JSP
Hi..

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.

Thanks in Advance
9 years ago
Thanks for posting i solved it.

by replacing \r\n of the string by /r and then re replace /r by \r\n in called function.
10 years ago
JSP


it is coming like this in view source.
because on \n "ff"goes in new line.

can we decode encode \n by any escape character or any there way??
10 years ago
JSP
Hi,

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.



Thanks in advance
10 years ago
JSP
Actually This page is included in another JSP as frame. In that Data is coming in request but request is not accessable in this frame page so i have to write data in session.

When user clicks on Attachment name I neeed to read it.
In main JSP it is been called like.

10 years ago
Hi,

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.

Thanks in advance.
10 years ago