C Das

Greenhorn
+ Follow
since Mar 12, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by C Das

does anyone got any idea how can i accomplish my question above? i have not gotten any solution yet.. please help
15 years ago
JSP
first, thank you both for your replies.

no i cannot submit it yet as I have to let it pass thru response.encodeURL before submitting. so I guess I have to change strategy because it's impossible to do what I want.

do you have any suggestion as to how I can accomplish this.

I need to pass the constructed url to response.encodeURL because I'm using UrlRewriteFilter and for it to be able to translate the outbound url, you have to use either response.encodeURL or c:url so it can translate it to the clean url. The thing is, based on the selected dropdown list by the user, I have to append that to the url via javascript to form the final url. But I cannot use response.encodeURL with parameter from a javascript as it's just impossible to do it. So I'm not sure anymore of other implementation where I could achieve what I want.
15 years ago
JSP
hi, can someone help me please.

I need to transform a site to be SEO friendly. I'm using UrlRewriteFilter. As I understand it, for the outbound url to be translated by UrlRewriteFilter, I have to use either the scriptlet <%= response.encodeURL("something.do?param1=value1¶m2=value2") or the jstl <c:url value="something.do?param1=value1¶m2=value2" /> and these urls can then be translated properly to /something/value1/value2 automatically by UrlRewriteFilter.

The problem is, I'm building the url in javascript and so I cannot pass the javascript variable in both of them as they are server side. e.g.

document.form['formname'].action = '<%= response.encodeURL(javascriptUrl) %>' -----> not allowed

so my question is, how can I go about translating the url.

By the way, I assign the document.form.action upon onClick in the button like the following.

<input type="button" value="submit" onClick="var javascriptUrl = generateUrl(); document.form['formname'].action = '<%= response.encodeURL(javascriptUrl) %>'; document.form['formname'].submit();" />
hi, does anyone know how what is the equivalent of document.form[someform].name in scriptlet or jstl? What I want is to get the value of whatever the user selected in the dropdown box without using javascript. I know that in javascript I could just do something like this document.form['formname'].category and be able to display the value of the selected category.

<html:select property="category">
<html:options property="first" collection="categories" labelName="first" labelProperty="second" />
</html:select>

And also, I have to be able to refer to the category selected before form submission.

Thanks in advance for any help.

15 years ago
JSP