Viewing post parameters during debugging [message #189773] |
Thu, 15 March 2007 06:35  |
Eclipse User |
|
|
|
I am using Eclipse and Tomcat 5.5 and would like to inspect the post
parameters in the request object during debugging. So far I found the
raw post data (as integers, not text) under postData.
Is there a place in the request object where I can see the parameters
the way they appear in the original HTTP request received from the
client or just a more friendly display (name=value or something like
that) instead of a series of integers?
If that is not possible, what is the most convenient way to get to those
parameters during debugging within Eclipse?
Thanks
Shahim
|
|
|
Re: Viewing post parameters during debugging [message #189829 is a reply to message #189773] |
Thu, 15 March 2007 13:54   |
Eclipse User |
|
|
|
I don't think Tomcat 5.5 will touch the post data in the request until
you ask for a parameter. Trying to get a parameter should trigger
parsing of the post data and you should be able to find it in a
name=value map somewhere in the request. I'm afraid I don't remember
the names of the objects involved off the top of my head.
Cheers,
Larry
Shahim wrote:
> I am using Eclipse and Tomcat 5.5 and would like to inspect the post
> parameters in the request object during debugging. So far I found the
> raw post data (as integers, not text) under postData.
>
> Is there a place in the request object where I can see the parameters
> the way they appear in the original HTTP request received from the
> client or just a more friendly display (name=value or something like
> that) instead of a series of integers?
>
> If that is not possible, what is the most convenient way to get to those
> parameters during debugging within Eclipse?
>
> Thanks
> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #189976 is a reply to message #189829] |
Fri, 16 March 2007 00:38   |
Eclipse User |
|
|
|
Larry Isaacs wrote:
> I don't think Tomcat 5.5 will touch the post data in the request until
> you ask for a parameter.
Right, I did see that parametersParsed is initially false. It turns to
true after the first read of a parameter.
> Trying to get a parameter should trigger
> parsing of the post data and you should be able to find it in a
> name=value map somewhere in the request.
This is where I am having a problem. I tried a simple form and posted to
a servlet and in the debugging view I do see the parameters under
parameterMap.
When I try to find the same parameters in my real application they don't
show up. All I see is a pair of curly braces in the details pane and the
parametersParsed is true.
> I'm afraid I don't remember
> the names of the objects involved off the top of my head.
>
> Cheers,
> Larry
>
> Shahim wrote:
>> I am using Eclipse and Tomcat 5.5 and would like to inspect the post
>> parameters in the request object during debugging. So far I found the
>> raw post data (as integers, not text) under postData.
>>
>> Is there a place in the request object where I can see the parameters
>> the way they appear in the original HTTP request received from the
>> client or just a more friendly display (name=value or something like
>> that) instead of a series of integers?
>>
>> If that is not possible, what is the most convenient way to get to
>> those parameters during debugging within Eclipse?
>>
>> Thanks
>> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #190024 is a reply to message #189976] |
Fri, 16 March 2007 16:15   |
Eclipse User |
|
|
|
It probably wouldn't hurt download source for Tomcat and add source
directories to the Tomcat server's launch configuration. It is easy to
make incorrect assumptions about the Tomcat internals you are looking
at. I did a quick check and I believe the parameters object you want is
request:RequestFacade -> request:Request -> coyoteRequest:Request ->
parameters:Parameters. It appears the parameterMap field is a location
to store the result of a request.getParameterMap() call. If
getParameterMap() is not called, parameterMap is not populated.
Cheers,
Larry
Shahim wrote:
> Larry Isaacs wrote:
>> I don't think Tomcat 5.5 will touch the post data in the request until
>> you ask for a parameter.
>
> Right, I did see that parametersParsed is initially false. It turns to
> true after the first read of a parameter.
>
>> Trying to get a parameter should trigger parsing of the post data and
>> you should be able to find it in a name=value map somewhere in the
>> request.
>
> This is where I am having a problem. I tried a simple form and posted to
> a servlet and in the debugging view I do see the parameters under
> parameterMap.
>
> When I try to find the same parameters in my real application they don't
> show up. All I see is a pair of curly braces in the details pane and the
> parametersParsed is true.
>
>
>
>> I'm afraid I don't remember the names of the objects involved off the
>> top of my head.
>>
>> Cheers,
>> Larry
>>
>> Shahim wrote:
>>> I am using Eclipse and Tomcat 5.5 and would like to inspect the post
>>> parameters in the request object during debugging. So far I found the
>>> raw post data (as integers, not text) under postData.
>>>
>>> Is there a place in the request object where I can see the parameters
>>> the way they appear in the original HTTP request received from the
>>> client or just a more friendly display (name=value or something like
>>> that) instead of a series of integers?
>>>
>>> If that is not possible, what is the most convenient way to get to
>>> those parameters during debugging within Eclipse?
>>>
>>> Thanks
>>> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #190032 is a reply to message #190024] |
Fri, 16 March 2007 17:23   |
Eclipse User |
|
|
|
That's what I was looking for. Thanks Larry
I have not looked at the source yet and I'm still new to Eclipse. I need
to learn more about how to use Eclipse effectively to navigate through
large projects. I'm slowly getting there :-)
Thanks,
Shahim
Larry Isaacs wrote:
> It probably wouldn't hurt download source for Tomcat and add source
> directories to the Tomcat server's launch configuration. It is easy to
> make incorrect assumptions about the Tomcat internals you are looking
> at. I did a quick check and I believe the parameters object you want is
> request:RequestFacade -> request:Request -> coyoteRequest:Request ->
> parameters:Parameters. It appears the parameterMap field is a location
> to store the result of a request.getParameterMap() call. If
> getParameterMap() is not called, parameterMap is not populated.
>
> Cheers,
> Larry
>
> Shahim wrote:
>> Larry Isaacs wrote:
>>> I don't think Tomcat 5.5 will touch the post data in the request
>>> until you ask for a parameter.
>>
>> Right, I did see that parametersParsed is initially false. It turns to
>> true after the first read of a parameter.
>>
>>> Trying to get a parameter should trigger parsing of the post data and
>>> you should be able to find it in a name=value map somewhere in the
>>> request.
>>
>> This is where I am having a problem. I tried a simple form and posted
>> to a servlet and in the debugging view I do see the parameters under
>> parameterMap.
>>
>> When I try to find the same parameters in my real application they
>> don't show up. All I see is a pair of curly braces in the details pane
>> and the parametersParsed is true.
>>
>>
>>
>>> I'm afraid I don't remember the names of the objects involved off the
>>> top of my head.
>>>
>>> Cheers,
>>> Larry
>>>
>>> Shahim wrote:
>>>> I am using Eclipse and Tomcat 5.5 and would like to inspect the post
>>>> parameters in the request object during debugging. So far I found
>>>> the raw post data (as integers, not text) under postData.
>>>>
>>>> Is there a place in the request object where I can see the
>>>> parameters the way they appear in the original HTTP request received
>>>> from the client or just a more friendly display (name=value or
>>>> something like that) instead of a series of integers?
>>>>
>>>> If that is not possible, what is the most convenient way to get to
>>>> those parameters during debugging within Eclipse?
>>>>
>>>> Thanks
>>>> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #190040 is a reply to message #190032] |
Fri, 16 March 2007 17:42   |
Eclipse User |
|
|
|
Now that I know where to look, I went back and tried to find out why my
search for a variable/object with the name "parameters" didn't show it.
It turned out that I must open an object at least once for the search
function to be able to find its children.
This didn't make much sense to me. If I am using a search function to
find something, it usually means that I don't know where it is. My be I
am using the wrong search method but the one in the variables view
doesn't seem very helpful.
Am I missing something?
Is there a better way to search the variables in the variables view
during debugging?
Shahim
Shahim wrote:
> That's what I was looking for. Thanks Larry
>
> I have not looked at the source yet and I'm still new to Eclipse. I need
> to learn more about how to use Eclipse effectively to navigate through
> large projects. I'm slowly getting there :-)
>
> Thanks,
> Shahim
>
> Larry Isaacs wrote:
>> It probably wouldn't hurt download source for Tomcat and add source
>> directories to the Tomcat server's launch configuration. It is easy
>> to make incorrect assumptions about the Tomcat internals you are
>> looking at. I did a quick check and I believe the parameters object
>> you want is request:RequestFacade -> request:Request ->
>> coyoteRequest:Request -> parameters:Parameters. It appears the
>> parameterMap field is a location to store the result of a
>> request.getParameterMap() call. If getParameterMap() is not called,
>> parameterMap is not populated.
>>
>> Cheers,
>> Larry
>>
>> Shahim wrote:
>>> Larry Isaacs wrote:
>>>> I don't think Tomcat 5.5 will touch the post data in the request
>>>> until you ask for a parameter.
>>>
>>> Right, I did see that parametersParsed is initially false. It turns
>>> to true after the first read of a parameter.
>>>
>>>> Trying to get a parameter should trigger parsing of the post data
>>>> and you should be able to find it in a name=value map somewhere in
>>>> the request.
>>>
>>> This is where I am having a problem. I tried a simple form and posted
>>> to a servlet and in the debugging view I do see the parameters under
>>> parameterMap.
>>>
>>> When I try to find the same parameters in my real application they
>>> don't show up. All I see is a pair of curly braces in the details
>>> pane and the parametersParsed is true.
>>>
>>>
>>>
>>>> I'm afraid I don't remember the names of the objects involved off
>>>> the top of my head.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> Shahim wrote:
>>>>> I am using Eclipse and Tomcat 5.5 and would like to inspect the
>>>>> post parameters in the request object during debugging. So far I
>>>>> found the raw post data (as integers, not text) under postData.
>>>>>
>>>>> Is there a place in the request object where I can see the
>>>>> parameters the way they appear in the original HTTP request
>>>>> received from the client or just a more friendly display
>>>>> (name=value or something like that) instead of a series of integers?
>>>>>
>>>>> If that is not possible, what is the most convenient way to get to
>>>>> those parameters during debugging within Eclipse?
>>>>>
>>>>> Thanks
>>>>> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #190048 is a reply to message #190040] |
Fri, 16 March 2007 18:31   |
Eclipse User |
|
|
|
Do you mean "Find..." in the Variables view context menu? This one
isn't really a search. It allows you to specify a filter to limit the
list of currently displayed variables to make it easier to select one
when there is a whole bunch of variables. I'm not aware of a search
that searches into objects that are displayed in the variables view.
Cheers,
Larry
Shahim wrote:
> Now that I know where to look, I went back and tried to find out why my
> search for a variable/object with the name "parameters" didn't show it.
> It turned out that I must open an object at least once for the search
> function to be able to find its children.
>
> This didn't make much sense to me. If I am using a search function to
> find something, it usually means that I don't know where it is. My be I
> am using the wrong search method but the one in the variables view
> doesn't seem very helpful.
>
> Am I missing something?
>
> Is there a better way to search the variables in the variables view
> during debugging?
>
> Shahim
>
>
> Shahim wrote:
>> That's what I was looking for. Thanks Larry
>>
>> I have not looked at the source yet and I'm still new to Eclipse. I
>> need to learn more about how to use Eclipse effectively to navigate
>> through large projects. I'm slowly getting there :-)
>>
>> Thanks,
>> Shahim
>>
>> Larry Isaacs wrote:
>>> It probably wouldn't hurt download source for Tomcat and add source
>>> directories to the Tomcat server's launch configuration. It is easy
>>> to make incorrect assumptions about the Tomcat internals you are
>>> looking at. I did a quick check and I believe the parameters object
>>> you want is request:RequestFacade -> request:Request ->
>>> coyoteRequest:Request -> parameters:Parameters. It appears the
>>> parameterMap field is a location to store the result of a
>>> request.getParameterMap() call. If getParameterMap() is not called,
>>> parameterMap is not populated.
>>>
>>> Cheers,
>>> Larry
>>>
>>> Shahim wrote:
>>>> Larry Isaacs wrote:
>>>>> I don't think Tomcat 5.5 will touch the post data in the request
>>>>> until you ask for a parameter.
>>>>
>>>> Right, I did see that parametersParsed is initially false. It turns
>>>> to true after the first read of a parameter.
>>>>
>>>>> Trying to get a parameter should trigger parsing of the post data
>>>>> and you should be able to find it in a name=value map somewhere in
>>>>> the request.
>>>>
>>>> This is where I am having a problem. I tried a simple form and
>>>> posted to a servlet and in the debugging view I do see the
>>>> parameters under parameterMap.
>>>>
>>>> When I try to find the same parameters in my real application they
>>>> don't show up. All I see is a pair of curly braces in the details
>>>> pane and the parametersParsed is true.
>>>>
>>>>
>>>>
>>>>> I'm afraid I don't remember the names of the objects involved off
>>>>> the top of my head.
>>>>>
>>>>> Cheers,
>>>>> Larry
>>>>>
>>>>> Shahim wrote:
>>>>>> I am using Eclipse and Tomcat 5.5 and would like to inspect the
>>>>>> post parameters in the request object during debugging. So far I
>>>>>> found the raw post data (as integers, not text) under postData.
>>>>>>
>>>>>> Is there a place in the request object where I can see the
>>>>>> parameters the way they appear in the original HTTP request
>>>>>> received from the client or just a more friendly display
>>>>>> (name=value or something like that) instead of a series of integers?
>>>>>>
>>>>>> If that is not possible, what is the most convenient way to get to
>>>>>> those parameters during debugging within Eclipse?
>>>>>>
>>>>>> Thanks
>>>>>> Shahim
|
|
|
Re: Viewing post parameters during debugging [message #190056 is a reply to message #190048] |
Fri, 16 March 2007 19:10  |
Eclipse User |
|
|
|
Larry Isaacs wrote:
> Do you mean "Find..." in the Variables view context menu?
Yes, it looks like I misunderstood the use of Find. It also looks like
Find is really something between search and limit display because if I
collapse a node in the view the Find list still lists the objects that
are hidden. It lists all the variables that have been looked at, not
just the visible ones and it doesn't really limit the display, it just
takes you to that variable.
It would be nice to have a search feature.
Thanks,
Shahim
> This one
> isn't really a search. It allows you to specify a filter to limit the
> list of currently displayed variables to make it easier to select one
> when there is a whole bunch of variables. I'm not aware of a search
> that searches into objects that are displayed in the variables view.
>
> Cheers,
> Larry
>
> Shahim wrote:
>> Now that I know where to look, I went back and tried to find out why
>> my search for a variable/object with the name "parameters" didn't show
>> it. It turned out that I must open an object at least once for the
>> search function to be able to find its children.
>>
>> This didn't make much sense to me. If I am using a search function to
>> find something, it usually means that I don't know where it is. My be
>> I am using the wrong search method but the one in the variables view
>> doesn't seem very helpful.
>>
>> Am I missing something?
>>
>> Is there a better way to search the variables in the variables view
>> during debugging?
>>
>> Shahim
>>
>>
>> Shahim wrote:
>>> That's what I was looking for. Thanks Larry
>>>
>>> I have not looked at the source yet and I'm still new to Eclipse. I
>>> need to learn more about how to use Eclipse effectively to navigate
>>> through large projects. I'm slowly getting there :-)
>>>
>>> Thanks,
>>> Shahim
>>>
>>> Larry Isaacs wrote:
>>>> It probably wouldn't hurt download source for Tomcat and add source
>>>> directories to the Tomcat server's launch configuration. It is easy
>>>> to make incorrect assumptions about the Tomcat internals you are
>>>> looking at. I did a quick check and I believe the parameters object
>>>> you want is request:RequestFacade -> request:Request ->
>>>> coyoteRequest:Request -> parameters:Parameters. It appears the
>>>> parameterMap field is a location to store the result of a
>>>> request.getParameterMap() call. If getParameterMap() is not called,
>>>> parameterMap is not populated.
>>>>
>>>> Cheers,
>>>> Larry
>>>>
>>>> Shahim wrote:
>>>>> Larry Isaacs wrote:
>>>>>> I don't think Tomcat 5.5 will touch the post data in the request
>>>>>> until you ask for a parameter.
>>>>>
>>>>> Right, I did see that parametersParsed is initially false. It turns
>>>>> to true after the first read of a parameter.
>>>>>
>>>>>> Trying to get a parameter should trigger parsing of the post data
>>>>>> and you should be able to find it in a name=value map somewhere in
>>>>>> the request.
>>>>>
>>>>> This is where I am having a problem. I tried a simple form and
>>>>> posted to a servlet and in the debugging view I do see the
>>>>> parameters under parameterMap.
>>>>>
>>>>> When I try to find the same parameters in my real application they
>>>>> don't show up. All I see is a pair of curly braces in the details
>>>>> pane and the parametersParsed is true.
>>>>>
>>>>>
>>>>>
>>>>>> I'm afraid I don't remember the names of the objects involved off
>>>>>> the top of my head.
>>>>>>
>>>>>> Cheers,
>>>>>> Larry
>>>>>>
>>>>>> Shahim wrote:
>>>>>>> I am using Eclipse and Tomcat 5.5 and would like to inspect the
>>>>>>> post parameters in the request object during debugging. So far I
>>>>>>> found the raw post data (as integers, not text) under postData.
>>>>>>>
>>>>>>> Is there a place in the request object where I can see the
>>>>>>> parameters the way they appear in the original HTTP request
>>>>>>> received from the client or just a more friendly display
>>>>>>> (name=value or something like that) instead of a series of integers?
>>>>>>>
>>>>>>> If that is not possible, what is the most convenient way to get
>>>>>>> to those parameters during debugging within Eclipse?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Shahim
|
|
|
Powered by
FUDForum. Page generated in 0.04513 seconds