0

I have a .tag file that renders an HTML output but it expects an attribute. I need to pass the required data to that tag file using a javascript file. Is there a way to do that?

1
  • Please show us what you have tried so far. Commented Jul 11, 2018 at 13:47

2 Answers 2

1

.tag files are just Servlets (they run on the server) so the only way you have to pass values from JS to the .tag is launching a request with those values on it to the jsp that includes the .tag and access them via the Request object like: ${requestScope.myParam}

Sign up to request clarification or add additional context in comments.

Comments

1

No you can't. I wish it was that easy. You probably want to pass a client property to the tag (which reside on de server) but that's not going to work..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.