jsp-tags

How to add custom VariableResolver to JSP Context in Jsp 2.0 to support special EL?

Deadly 提交于 2019-12-24 11:26:56
问题 I'm building my own JSP Tag Library which need to support some features that Application developers can use like this: <w:user-label id="usrlb" value="${session.user}"/> <w:textbox id="tb" label="User Name" value="${usrlb.value.name}"/> which means I want my EL can interact with my Tag declaration. and also I need to add stack concept into this library to support "id namespace" or something. My current research leads me to wrap default JspFactory like this: JspFactory.setDefaultFactory(new

jsp:setproperty property=“*” not set all properties

瘦欲@ 提交于 2019-12-24 10:51:20
问题 i have jsp page which contains <jsp:useBean id="RcvMsgTransferTanseekBean" class= "com.test.RcvMsgTransferTanseekBean" /> <jsp:setProperty name="RcvMsgTransferTanseekBean" property="*" /> and bean which contain private String nId = ""; public void setNId (String value){ this.nId = value; } public String getNId(){ return this.nId; } i send request to that jsp page test.jsp?letId=479438&dstId=522375&nId=138393&subject=66666666666&letForInfo=1&shNotMan=true my problem is that the nId parameter

Exception coming while running JSP

…衆ロ難τιáo~ 提交于 2019-12-23 04:45:52
问题 I am getting this exception while running any JSP on my tomcat5.5 server.Do I need to add any JAR ??? Please Help. StackTrace: DEBUG http-8181-Processor25 org.apache.catalina.loader.WebappClassLoader - Loading class from parent FATAL http-8181-Processor25 org.apache.jasper.runtime.JspFactoryImpl - Exception initializing page context java.lang.NoSuchMethodError: org.apache.tomcat.util.http.ServerCookie.appendCookieValue(Ljava/lang/StringBuffer;ILjava/lang/String;Ljava/lang/String;Ljava/lang

dynamically build html input textbox similar to STRUTS and Jakarata Tag Lib

一个人想着一个人 提交于 2019-12-23 02:52:07
问题 Can a custom tag be utilized to clean up this form input element? <input name="action_for" type="text" value="<c:if test="${empty commitmentItem.action_for}"> <c:out value="${param.action_for}" escapeXml='false' /></c:if> <c:if test="${not empty commitmentItem.action_for}"> <c:out value="${commitmentItem.action_for}" /></c:if>" size="16" maxlength="16" /> I'd like to just type: <myTag:input field="action_for" obj="commitmentItem" /> or something similar. I just don't know how to access the

Spring MVC dropdown box

♀尐吖头ヾ 提交于 2019-12-23 02:36:16
问题 I have been trying to find out how to create a dropdown box in Spring MVC. Here is my controller: @ResourceMapping(value = "availableDataVis") public String getAvailableDataVis(Model model, @RequestParam("widgetId") String widgetId) { HashMap<String,Map<String,String>> hashMapOfDataVis = new HashMap<String,Map<String,String>>(); Map<String,String> m = new LinkedHashMap<String,String>(); m.put("pie", "Pie Chart"); m.put("categorizedVertical", "Column Chart"); hashMapOfDataVis.put("m", m); if

Retrieving Value from Row in Struts2 Table While using Displaytag

大憨熊 提交于 2019-12-23 01:36:13
问题 I am aware that this is somewhat a re-post, but I feel like re-posting my question will make things more clear. Here is the code for my table in my JSP page: <display:table name="table" pagesize="25" requestURI=""> <display:column title="Action" > <s:form theme="simple"> <s:hidden key="cpc" /> <s:submit action="remove" value="Remove" onclick="return confirm('Are you sure you want to delete this item?');"/> <s:submit action="displayEdit" value="Edit"/> </s:form> </display:column> <display

Spring 3 @NumberFormat not working with form:input Tag

久未见 提交于 2019-12-22 14:17:01
问题 I have a Spring 3 MVC app utilizing <mvc:annotation-driven /> . Having trouble getting a java.lang.Double property to display as currency in a <form:input> tag. The amount shows correctly, but no formatting applied. Any guidance? Spring config: <mvc:annotation-driven conversion-service="conversionService"> <mvc:argument-resolvers> <bean class="com.my.SessionUserHandlerMethodArgumentResolver"/> </mvc:argument-resolvers> </mvc:annotation-driven> <bean id="conversionService" class="org

How to explain usages of square brackets ([]) operator in EL expressions

百般思念 提交于 2019-12-22 10:48:35
问题 When I read Spring PetClinic sample application, I found they always put the add and modify functionalities into a single JSP file, and they use ${owner['new']} expression to customize elements on current page, for example " New Owner" or "Owner" for a label. Are there any other usages of [] operator in JSP (Spring) environment? The Controller file has the following snippet: @RequestMapping(value = "/owners/new", method = RequestMethod.GET) public String initCreationForm(Map<String, Object>

Jsp tags outside WEB-INF/tags

烈酒焚心 提交于 2019-12-22 04:43:15
问题 Is there any way to hold tag files out of /WEB-INF/tags folder? Maybe by using tld somehow and calling them with uri instead of tagdir? Reason for this request is that we are trying to run several sites from one codebase and we would like to have it like WEB-INF/site1/templates, tags, ... so if this is wrong idea to begin with, feel free to say so. 回答1: Apparently not: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags6.html even if using tld to say where the tag is, it can be either in

Passing a Java object value in Custom JSP tag

∥☆過路亽.° 提交于 2019-12-22 04:04:04
问题 I'm trying to pass a java variable from a custom jsp tag(Im using struts2 here to get the variable from the java class). Here is the error I'm getting. javax.servlet.ServletException: /pages/editBidForm.jsp(51,8) According to TLD or attribute directive in tag file, attribute parentId does not accept any expressions org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) .... Here is my jsp