Question

I'm trying to use Struts framework in my project. I want to use the html:button to send parameter in the link but I don't understand how to make it.

In other words, I want to translate this line:

<input type="button" onClick="window.location.href='resum.do?action=ViewMessage&&id_message=<%= id_msg %>'" value="View"/>

to Struts taglib, something like this:

<html:button property="" onclick="window.location.href='resum.do?action=ViewMessage&&id_message=<%= id_msg %>'" value="View"></html:button>

But it didn't work.

Was it helpful?

Solution

The html:button tag is used only inside the form tag. See the docs

This tag is only valid when nested inside a form tag body.

Also set the property attribute.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top