本文介绍了如何使用带有java类值的JSP获取动态href标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要让href标签动态化,以便href中的获取我将从上面的代码获得的String,并且无法想到我在JSP中导入类的任何解决方案能够去I need to get the href tag dynamic so that the " " in href gets the String which I will be getting from the above code and Unable to think of any solution I have imported the class in the JSP thats how far I'm able to goMMTUtil.getDomainComboDocumentationMap().get(objectName); 其中objectName是一个键,我需要从中获取值,以便它可以在href中使用 我尝试过:where objectName is a key and I need to get the value out of it So that it can be used in hrefWhat I have tried:<%UMRDocumentationDTO documentationDTO = new UMRDocumentationDTO();String objectName = documentationDTO.getId().getObjectName();String tc = MMTUtil.getDomainComboDocumentationMap().get(objectName);%> 但它仍然需要hreftc中上一行的结果but it still need the outcome of the above last line in the href "tc"<td><a href="tc" target="_blank"id="domainName_<s:property value="#rowstatus.index"/>"><s:propertyvalue="domainName" /></a></td>推荐答案在href中使用脚本let标签,Use script let tag inside href,<a href="<%=tc%>" target="_blank"></a> 这篇关于如何使用带有java类值的JSP获取动态href标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!