[Building Sakai] How to Send an Http Parameter to a tool

Aaron Zeckoski aaronz at vt.edu
Fri Mar 5 06:16:54 PST 2010


This is the basic form:
http://server:port/portal/site/siteId/page/pageId?toolstate-toolpid=/newpage?thing=value

or maybe like this is easier to read:
http://{server}:{port}/portal/site/{siteId}/page/{pageId}?toolstate-{toolpid}={toolUrl}

You have to replace:
server
port
siteId
pageId
toolpid
toolUrl - this is the encoded path plus query params (e.g.
/something.jsp?msg=hello)

If you want an example of some code that generates this look here in
the getToolViewURL method:
entitybroker/impl/src/java/org/sakaiproject/entitybroker/impl/devhelper/DeveloperHelperServiceImpl.java

Can you paste in the final URL you are generating?
-AZ


On Fri, Mar 5, 2010 at 12:48 PM, Artur k Vieira <arturkvieira at gmail.com> wrote:
>
> Hello Steve, thanks for replying.
> I tryed the following, but i still get null when I use
> request.getParameter() in my page.
>
> This is my java class that construct the url to redirect to sakai:
>
>
>
>
>
> StringBuilder url = new StringBuilder();
>                                                url.append(SERVER_URL);
>                                                url.append("/portal/site/");
>                                                url.append(workSite);
>                                                url.append("/page/");
>                                                url.append(pageId);
>                                                        url.append("?toolstate-");
>                                                        url.append(placementId);
>                                                        url.append("=");
>                                                        try{
>                                                                    url.append(URLEncoder.encode("position=17","UTF-8"));
>
>
>                                                        url.append("^&sakai.session=");
>                                                        url.append(sessionId);
>
>
>
> The session ID I get using the web services, and use it to redirect the user
> to my tool without having to put the login and password in this phase. I am
> sure about my placement id, it's correct, but for some reason it sems that
> sakai is ignoring it, and gets only the other elements of my URL.This means
> that the user is directed to the page that I want but i cant retrieve the
> "position" parameter, that I am passing in a static way.
> Do you know if I am constructing the url in the right way? Isnt there
> somenthing missing or wrong there?
>
> Thank you very much for your time
>
> --
> View this message in context: http://old.nabble.com/How-to-Send-an-Http-Parameter-to-a-tool-tp27748224p27793480.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>



-- 
Aaron Zeckoski - Software Engineer - http://tinyurl.com/azprofile


More information about the sakai-dev mailing list