|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
URL encoding and decoding |
« View previous topic :: View next topic » |
Author |
Message
|
MQRR |
Posted: Fri Nov 12, 2004 12:45 pm Post subject: URL encoding and decoding |
|
|
Centurion
Joined: 10 Aug 2003 Posts: 110
|
Hi everyone,
I have strange situation in case of url encoding. I am encoding the id before passing it to Main class.
here is the output in that class that i am printing before sending to to it built in handler. (i am using httpservletrequest.getQueryString() it gives me the url without decoding it, so that i could check if it was already encoding it)
requested URL by Main class:command=showInstanceProperties&commandParameters=id=UAAAAAEAOsB%2FAAAAAAAAAAAAAAABABvAAAAAAAAAAAAAUA%3D%3D
but still I am getting the object not found exception.
So what I did is i used httpservletrequest.getParameter("id") to see what Built in handler might be getting when it does this. I am getting the following output:
id dispatched to Built in Handler==> UAAAAAEAOsB%2FAAAAAAAAAAAAAAABABvAAAAAAAAAAAAAUA
Wierd part is this not same on my local windows machine, where i do the development. With great difficulty i could produce an instance having special characters id and tested it , it is working perfectly fine. the getparamter is givign me the decoded id. But when i do the same test after deploying the application on aix box, i am getting the above problem.
?????????
any thoughts into this would great help. I even checked servlet specification to see if there is difference but everything is same both are using 2.3 |
|
Back to top |
|
 |
hos |
Posted: Sun Nov 14, 2004 11:00 pm Post subject: |
|
|
Chevalier
Joined: 03 Feb 2002 Posts: 470
|
Very interesting. I am working on a similar default Web Client problem on AIX. I am trying to sort out the involved software products: Web Client, WebSphere, AIX, Browser, JDK.
Can you tell me your version and maintenance level of these products?
Can you try to use Windows browser to access your application on AIX?
Can you use a different AppServer (Tomcat?) on AIX?
Thanks Volker |
|
Back to top |
|
 |
MQRR |
Posted: Wed Nov 17, 2004 8:13 pm Post subject: |
|
|
Centurion
Joined: 10 Aug 2003 Posts: 110
|
hi volker,
sorry for the late reply. I was caught in solving the issue.
In my case after working on it for couple of days, I solved it. I am not very what the issue is, but mostly it is with how request dispatcher is working. I am forwarding the request from an action class to Main class using the requestdispatcher. I was doing something in the following manner,
String parameters = "Main?" +"command=checkInWorkItem&" + "id="
+ URLEncoder.encode(workitemId);
RequestDispatcher dispatchMain =
mainServletContext.getRequestDispatcher(parameters );
dispatchMain.forward(request, response);
When I am encoding the id this way, The AIX environment is not recognizing that parameter as encoded one. I guess there are definately some variations how the environments behave in recognizing the encodings, becuase the same thing is recognized in my local WSAD environment. I solved this by avoiding building a url in the action class.
SO there are two questions, how does this dispatcher works when some parameters are passes along with it after encoding and wht are the differences between AIX and windows regarding encoding and decoding.
And regarding your questions,
Can you tell me your version and maintenance level of these products?
local machine(windows):(this is where everything works fine)
I am using webspherr 5.1.1 with all latest service packs applied.
Webclient 3.4 sp 5 ( i know it i need to update this )
J2RE 1.4.1
AIX box: (version , if it is necessary let me know i will find out)
webspherr 5.1.1 with all latest service packs applied.
Webclient 3.5 , service pack i do not know (if it is necessary let me know i will find out)
Can you try to use Windows browser to access your application on AIX?
I did not quite get this question. I am doing that right now.
I deploy the application onto the AIX box and connect to the application that is running on aix box using my windows browser if i want to test how this works on aix environment.
Can you use a different AppServer (Tomcat?) on AIX?
no i can not. It is out of question. I am not the system administrator, and i do not have any control on it. sorry.
MQRR |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|