jspx

JSPX namespaces not visible for EL functions?

岁酱吖の 提交于 2019-12-05 18:57:21
I'm attempting to use JSPX (pure XML syntax for JSP) and running into what seems like it should work, but doesn't. I'm importing taglibs using namespace declarations in the jsp:root element, then using these later on for elements as well as EL functions: <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/ xmlns:c="urn:jsptld:/WEB-INF/tld/c.tld" xmlns:fn="urn:jsptld:/WEB-INF/tld/fn.tld"> ... <c:if test="${fn:length(list) > 0"> ... </c:if> ... </jsp:root> I get an exception saying "The attribute prefix fn does not correspond to any imported tag library". Other pages work fine, but this

Conditional HTML attribute in JSPX

。_饼干妹妹 提交于 2019-12-05 18:09:16
What's the right way to print an html attribute conditionally using JSPX? These both throw validation errors on p tag: /* first try */ <p ${true ? 'name="foobar"' : ''}>hello</p> /* second one */ <c:set var="somevar" scope="page"> <c:if test="${true}"> name="foobar" </c:if> </c:set> <p ${somevar}>hello</p> Element type "p" must be followed by either attribute specifications, ">" or "/>". at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) EDIT: appended full code <?xml version="1.0" encoding="UTF-8" standalone="no"?> <div xmlns:c="http://java.sun.com/jsp

How to output <option selected=“true”> from JSPX?

心不动则不痛 提交于 2019-12-05 11:13:15
A few html tags interpret "any" value of a give attribute as "true" -> option tags come to mind. I frequently end up doing something like this: <c:choose> <c:when test="${isSelected}"/> <option selected="true">Opt1</option> </c:when> <c:otherwise/> <option>Opt1</option> </c:otherwise> </c:choose> I know I can declare a custom to encapslate this behaviour but that also gets pretty ugly, unless I code it in java. Is there a smarter way to do this ? One way to approach this would be to use custom tag(s). I like the approach that the JSP2X converter takes, defining custom tags in your WEB-INF/tags

Conditionally set an attribute on an element with JSP Documents (JSPX)

拜拜、爱过 提交于 2019-12-03 19:09:24
问题 In HTML forms, buttons can be disabled by defining the "disabled" attribute on them, with any value: <button name="btn1" disabled="disabled">Hello</button> If a button is to be enabled, the attribute should not exist as there is no defined value that the disabled attribute can be set to that would leave the button enabled. This is causing me problems when I want to enable / disable buttons when using JSP Documents (jspx). As JSP documents have to be well-formed XML documents, I can't see any

websphere 7 (and Spring Roo) incompatible with javax.el.ELException

こ雲淡風輕ζ 提交于 2019-12-03 08:51:18
问题 I have a application where the frontend is based on the Spring Roo 1.1.2 jspx files. Every think works fine in Tomcat 6, but if I deploy the same application in a Websphere 7 (class loader: parent last), then I get a exception: java.lang.ClassCastException: java.lang.NullPointerException incompatible with javax.el.ELException [13.04.11 09:53:55:493 UTC] 00000026 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods

websphere 7 (and Spring Roo) incompatible with javax.el.ELException

喜你入骨 提交于 2019-12-02 21:25:49
I have a application where the frontend is based on the Spring Roo 1.1.2 jspx files. Every think works fine in Tomcat 6, but if I deploy the same application in a Websphere 7 (class loader: parent last), then I get a exception: java.lang.ClassCastException: java.lang.NullPointerException incompatible with javax.el.ELException [13.04.11 09:53:55:493 UTC] 00000026 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet /WEB-INF/layouts/default.jspx in application cyber. Exception created : com.ibm

Should I be doing JSPX instead of JSP? [closed]

自古美人都是妖i 提交于 2019-12-02 16:58:13
Using JDeveloper , I started developing a set of web pages for a project at work. Since I didn't know much about JDev at the time, I ran over to Oracle to follow some tutorials. The JDev tutorials recommended doing JSPX instead of JSP , but didn't really explain why. Are you developing JSPX pages? Why did you decide to do so? What are the pros/cons of going the JSPX route? The main difference is that a JSPX file (officially called a 'JSP document') may be easier to work with because the requirement for well-formed XML may allow your editor to identify more typos and syntax errors as you type.

metadata tag not working in jsf

六眼飞鱼酱① 提交于 2019-12-02 09:45:34
I am trying to set a variable with viewparam but I can't seem to get the code to compile in eclipse. It seems like it's not finding the tags. I have the mojarra 2.2 used and I am inlcuding jsf-api-2.2.4 and impl also. <?xml version="1.0" encoding="UTF-8" ?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" version="2.0"> <jsp:directive.page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" /> <jsp:text> <![CDATA[ <?xml version="1.0" encoding="UTF-8" ?> ]]> </jsp:text> <jsp:text> <![CDATA[ <

Including JS files (JQuery) in JSPX files

♀尐吖头ヾ 提交于 2019-12-01 03:56:00
I'm creating a dynamic web project in Eclipse (almost from scratch) and I created a JSPX file where I put <head>... <script type="text/javascript" src="route/to/scripts/jquery.js"></script> <script type="text/javascript" src="route/to/scripts/jquery.ui.js"></script> <script type="text/javascript" src="route/to/scripts/something.js"></script> </head> I intend to use Jquery UI sortable and I found out that using JSPX, only the first script loads in Firefox and IE (while in opera it works...). If I use plain JSP, whether HTML of XHTML, it loads all the JS files. Is there any way to include all

Support both jsp and jspx in spring 3.0

与世无争的帅哥 提交于 2019-11-30 23:23:19
i've set up a roo application. The default view resolver built-in in roo is for jspx files. Is it possible to support also jsp files?. I tried configuring two viewResolvers but it seems that no urlBasedViewResolvers can coexist, its either one or the other. Changing the order does not affect the behaviour. If I set order =1 to the jspx then if i search for any .jsp file it gives me 404. The same if I search for jspx but jsp viewResolver is set with order =1. Is there anyway to do this? Thanks! here is my webmvc-config.xml <bean id="viewResolver" class="org.springframework.web.servlet.view