Help coderanch get a
new server
by contributing to the fundraiser

Krishna Nagadev

Ranch Hand
+ Follow
since Jan 04, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Krishna Nagadev

I think I didn't explain the problem properly.. Let me explain it again

I am implementing a Login Service for my application. Some times users may choose the page from public domain directly. So I want to capture that url initially and the request is directed to Login page. When user login is successful then I want to redirect him with the page what he requested earlier.

I can keep the originally requested url in session and I can redirect to it once the user successful in login.. This is temporary solution
Is there any other solution which dont uses session/cookie/url rewriting

Thanks,
14 years ago
Thanks for reply, I dont see the referer in header..
14 years ago
Hope I am not wrong, request.getRequestURI() and request.requestURL() tells you what was requested by the user but not who requested it (ie the origin of the requester). Lets say if your webapplication is routed from Google then, I want to know that the url of Google, not requested URL ie your application url
14 years ago
How to know from where the request has come from.

request.getHeader("referer") works only when the request is made from a click of link.

is there any way or solution that I can know from which url the request has routed to my action/servlet ?

Thanks in advance.
14 years ago
OK thanks. I will try that
14 years ago
I may require to forward the request because I need to resend the same parameters that I received as part of request. That is a different problem again ;)
Can you suggest me how to redirect to S2 Action instead of response.sendRedirect() from Interceptor ?

Thanks for your help again
14 years ago
Here is the intercept method of my interceptor.


14 years ago
Thanks David,

But I dont want to execute the Action, instead I want to redirect/forward to some other action from interceptor. if I choose PreResultListener then it will be called before the result is being executed. ie after execution of your Action. I dont want to happen in my case. Please let me know if any thoughts
14 years ago
Actions are wrapped with interceptors and these configuration we kept it in struts.xml

Instead of controlling it at configuration level, I want to bypass the execution of Action/next interceptors in the stack from interceptor itself.. dynamically .. is it really possible ?
Let me explain my problem in detail here..

I need to check a cookie at interceptor and need to execute different actions based on cookie value.. I tried in below way, I am able to redirect the response to desired action and page but with exceptions. Here is the code ..



Error Message
java.lang.IllegalStateException: Cannot create a session after the response has been committed
org.apache.catalina.connector.Request.doGetSession(Request.java:2301)
14 years ago
Facing the same problem..

instead of controlling it at configuration level, I want to bypass the execution of Action/next interceptors in the stack .. is it really possible ?
Let me explain my problem in detail here..

I need to check a cookie at interceptor and need to execute different actions based on cookie value.. I tried in below way, I am able to redirect the response to desired action and page but with exceptions. Here is the code ..


Error Message
java.lang.IllegalStateException: Cannot create a session after the response has been committed
org.apache.catalina.connector.Request.doGetSession(Request.java:2301)
14 years ago
It should be under .ear/META-INF/was.policy
17 years ago
Using RAD 7 and created jdbc provider and datasource (Universal Driver, type 2 driver)

The test Connection resulted in following exception

The test connection operation failed for data source sample_DS on server server1 at node meNode01 with the following exception: java.sql.SQLException: SQL10007N Message "-1390" could not be retrieved. Reason code: "3". DSRA0010E: SQL State = , Error Code = -1,390. View JVM logs for further details.

Any Help ?
17 years ago
Change your code like this.. this would help you out

function init()
{
var input = document.createElement("input");
input.type = "checkbox";
input.id = "test";
input.name = "test";

document.getElementById("data").appendChild(input);
document.getElementById('test').checked=true;
}
Rathi ji,

The following elements only supports 'disabled' attribute:
BUTTON, INPUT, OPTGROUP, OPTION, SELECT, and TEXTAREA.

<Div> in your case doesn't have this property, So set the disable property individually for all the controls which you want as suggested by Bear.

Cheers...
I have a Page where I need to popup a window. It needs to close once we select a link on the child window. Since Iam using the AJAX framework, I need to close the child window after processing the server response.

Iam using the child window reference to close the popup.

windowRef = window.open(url,"Search","toolbar=no");

//After processing the server response I need to close the popup

windowRef.close();

This code is working fine in IE, But in-case of firefox, the popup window is open till I place the mouse curser on it. otherwise it is not closing..


Any Help...