Dev - Catalina Requests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - Catalina Requests

cjhowe
How can I get a printout in freemarker the contents of what's being passed as a request?

${request} results in  org.apache.catalina.connector.RequestFacade@3dcf03.  I need to know the contents of (I guess) 3dcf03.

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Catalina Requests

David E. Jones

If you are going through the screen widget we have a special request  
wrapper that makes the request attributes available as a Map. So,  
just use ${requestAttributes}, or for parameters ${requestParameters}.

-David


On Dec 1, 2005, at 7:28 PM, Chris Howe wrote:

> How can I get a printout in freemarker the contents of what's being  
> passed as a request?
>
> ${request} results in  
> org.apache.catalina.connector.RequestFacade@3dcf03.  I need to know  
> the contents of (I guess) 3dcf03.
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Catalina Requests

cjhowe
Thanks David.

the ${requestAttributes} returns an error that it was expecting a string, date or number  instead of a HashModel

Error on line 26, column 3 in sidedeepcategory.ftl Expecting a string, date or number here, Expression requestAttributes is instead a freemarker.ext.servlet.HttpRequestHashModel The problematic instruction: ---------- ==> ${requestAttributes} [on line 26, column 1 in sidedeepcategory.ftl]

"David E. Jones" <[hidden email]> wrote:

If you are going through the screen widget we have a special request
wrapper that makes the request attributes available as a Map. So,
just use ${requestAttributes}, or for parameters ${requestParameters}.

-David


On Dec 1, 2005, at 7:28 PM, Chris Howe wrote:

> How can I get a printout in freemarker t! he contents of what's being
> passed as a request?
>
> ${request} results in
> org.apache.catalina.connector.RequestFacade@3dcf03. I need to know
> the contents of (I guess) 3dcf03.
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Catalina Requests

cjhowe
Better yet,

If I could get this answered, I'll be done with this personal roadblock.
I have the following class

    public static void setTrail(ServletRequest request, String currentCategory) {
        Map requestParameters = UtilHttp.getParameterMap((HttpServletRequest) request);
        String previousCategory = (String) requestParameters.get("pcategory");

...
...
I'm trying to set "pcategory" in a beanshell file.  request.setAttribute("pcategory", pcategory); doesn't work because I'm trying to replace the parameter pcategory, not the attribute pcategory.  I'm slow to find the solution.  Thanks for any help out there!

Chris Howe <[hidden email]> wrote:
! Thanks David.

the ${requestAttributes} returns an error that it was expecting a string, date or number  instead of a HashModel

Error on line 26, column 3 in sidedeepcategory.ftl Expecting a string, date or number here, Expression requestAttributes is instead a freemarker.ext.servlet.HttpRequestHashModel The problematic instruction: ---------- ==> ${requestAttributes} [on line 26, column 1 in sidedeepcategory.ftl]

"David E. Jones" <[hidden email]> wrote:

If you are going through the screen widget we have a special request
wrapper that makes the request attributes available as a Map. So,
just use ${requestAttributes}, or for parameters ${requestParameters}.

-David


On Dec 1, 2005, at 7:28 PM, Chris Howe wrote:

> How can I get a printout in freemarker t! he contents of what's be! ing
> passed as a request?
>
> ${request} results in
> org.apache.catalina.connector.RequestFacade@3dcf03. I need to know
> the contents of (I guess) 3dcf03.
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Catalina Requests

Andrew Zeneski
You cannot change the values of parameters in the request object; they are read only. Only attributes can be set/removed. You will need to change the value of pcategory in what every is making the request.

On Dec 1, 2005, at 11:40 PM, Chris Howe wrote:

Better yet,

If I could get this answered, I'll be done with this personal roadblock.
I have the following class

    public static void setTrail(ServletRequest request, String currentCategory) {
        Map requestParameters = UtilHttp.getParameterMap((HttpServletRequest) request);
        String previousCategory = (String) requestParameters.get("pcategory");

...
...
I'm trying to set "pcategory" in a beanshell file.  request.setAttribute("pcategory", pcategory); doesn't work because I'm trying to replace the parameter pcategory, not the attribute pcategory.  I'm slow to find the solution.  Thanks for any help out there!

Chris Howe <[hidden email]> wrote:
! Thanks David.

the ${requestAttributes} returns an error that it was expecting a string, date or number  instead of a HashModel

Error on line 26, column 3 in sidedeepcategory.ftl Expecting a string, date or number here, Expression requestAttributes is instead a freemarker.ext.servlet.HttpRequestHashModel The problematic instruction: ---------- ==> ${requestAttributes} [on line 26, column 1 in sidedeepcategory.ftl]

"David E. Jones" <[hidden email]> wrote:

If you are going through the screen widget we have a special request
wrapper that makes the request attributes available as a Map. So,
just use ${requestAttributes}, or for parameters ${requestParameters}.

-David


On Dec 1, 2005, at 7:28 PM, Chris Howe wrote:

> How can I get a printout in freemarker t! he contents of what's be! ing
> passed as a request?
>
> ${request} results in
> org.apache.catalina.connector.RequestFacade@3dcf03. I need to know
> the contents of (I guess) 3dcf03.
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev