WebSphere Portal Server - [Urgent help]how to deal with "*.do" struts portlet path

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > August 2004 > [Urgent help]how to deal with "*.do" struts portlet path





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [Urgent help]how to deal with "*.do" struts portlet path
LV

2004-08-27, 6:29 pm

For example, if i use struct tag library
<html:link
action="FileValidation.do?taskID=FIL007&A=1&FOLDERID=1026&USERID=1004">AAAAAlllll2</html:link>,

the portal server will encode the path ito this form
<a
href="/wps/myportal/!ut/p/_s.7_0_A/7_0_9D/.cmd/ad/.ar/sa.spf_ActionListener/.c/6_0_69/.ce/7_0_FDQ/.p/5_0_FAL/.d/0? PC_7_0_FDQ_spf_strutsAction=%212fFileVal
idation. do%213ftaskID%3DFIL007%2126amp%3BA%3D1%2
126amp%3BFOLDERID%3D1026%2126amp%3BUSERI
D%3D1004#7_0_
FDQ">AAAAAlllll2</a>

but in one of the jsp page of my program , i need to define a string
variable
<html>
<head>
<script type="text/javascript">
<!--
var demoMenu =
<%
out.println( StringUtilities.RecursivelyGeneratedTree("0", directory) +
";" );
%>


it will then become a format like this after the server executing the
jsp page
<html>
<head>
<script type="text/javascript">
<!--
var demoMenu =
[[null, 'Google',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1010&USERID=1004',
'mainFrame', '',[null, 'asdas123',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1014&USERID=1004',
'mainFrame', '',[null, 'aaaa',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1024&USERID=1004',
'mainFrame', '',],[null, 'aaaggg',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1025&USERID=1004',
'mainFrame', '',].......



then the demoMenu will then pass as a parameter to a javascript func to
do some complex HTML code generation

Now my problem is need to convert the string from
var demoMenu =
[[null, 'Google',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1010&USERID=1004',
'mainFrame', '',[null, 'asdas123',
'FileValidation.do?taskID=FIL007&A=1&FOLDERID=1014&USERID=1004',
'mainFrame',..........

to the encode URL format like this:
var demoMenu =
[[null, 'Google',
'/wps/myportal/!ut/p/_s.7_0_A/7_0_9D/.cmd/ad/.ar/sa.spf_ActionListener/.c/6_0_69/.ce/7_0_FDQ/.p/5_0_FAL/.d/0? PC_7_0_FDQ_spf_strutsAction=%212fFileVal
idation. do%213ftaskID%3DFIL007%2126amp%3BA%3D1%2
126amp%3BFOLDERID%3D1026%2126amp%3BUSERI
D%3D1004#7_0_FDQ',

'mainFrame', '',[null, 'asdas123',
'/wps/myportal/!ut/p/_s.7_0_A/7_0_9D/.cmd/ad/.ar/sa.spf_ActionListener/.c/6_0_69/.ce/7_0_FDQ/.p/5_0_FAL/.d/0? PC_7_0_FDQ_spf_strutsAction=%212fFileVal
idation. do%213ftaskID%3DFIL007%2126amp%3BA%3D1%2
126amp%3BFOLDERID%3D1026%2126amp%3BUSERI
D%3D1004#7_0_FDQ,

'mainFrame',.......

Anyone have idea to solve this problem?

thx for reply

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com