jspx

Should I be doing JSPX instead of JSP?

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 ...

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

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 ca...

Eclipse's WTP translation output

How can I view the intermediate translation done to JSP and JSPX pages by WTP? I'm getting weird syntax errors in my Problems tab of Eclipse in a project that has plenty of .jspx pages. They don't affect anything in the running application (Tomcat 6.0) and they appeared only over the last 2 weeks, after an update. The reason why I'd l...

Does tomcat 5.5 treat .jsp and .jspx files in the same way?

I'm working on a java web-application, trying to be xml-friendly and writing my jsp files using the jspx/xml syntax. It took me hours of dissecting examples and configuration files to find out that with tomcat 5.5 files using the new syntax should end in .jspx, or tomcat won't translate tag libraries and stuff. Both file extensions map ...

use struts tags inside attributes in jspx files

I have some old jsp code that uses the struts tags inside attributes, like this: <link href="<s:url value='/styles/layout.css'/>" rel="stylesheet" type="text/css" media="all"/> I can't get this to work in jspx files though. Is there a good alternative to sort of get the same functionality without too much clutter? ...

Custom JSTL tags with body

Hi, We are going to use JSTL and custom JSTL-tags for some sort of template-engine in our JSP/spring-project. Is there a way to create a tag that looks similar like this: <div id="site"> <div id="header">Some title</div> <div id="navigation"> SOME DYNAMIC CONTENT HERE </div> <div id="content"> ${content} </div> <div id...

ADF: Calling a method through a managed beans in JSP

Hi, I am running into issues with passing parameters to managed beans in JSP within Oracle ADF. Here is an example JSP test page I am trying to pass parameters to a test method in a POJO: <?xml version='1.0' encoding='windows-1252'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com...

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

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 kno...

How do I reliably access the HttpServletRequest in a jspx when it's behind a proxy?

I've got a jspx that needs to know the current HttpServletRequest's getServerName(). The jspx can fetch this with #{mybean.serverName} from its bean, like this: public String getServerName() { HttpServletRequest request = (HttpServletRequest) FacesInstance.getCurrentInstance().getExternalContent().getRequest(); return request.getS...

JSPX namespaces not visible for EL functions?

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:j...

jspx script element on GlassFish v3

The .war is served from GlassFish v3. I am trying to include a javascript file from my jspx. <script type="text/javascript" src="/base/interface/Service.js"></script> I get the following in my http response <script src="/base/interface/Service.js" type="text/javascript" /> The problem is that it should include the </script> tag. I...

How can I call a JSP 2.0 *.tag file from a traditional JSP custom tag?

I have written a JSP custom tag, implemented in a class that extends TagSupport, and I'd like to invoke another custom tag that was written as a *.tag file. Is this possible? If so, how can it be done? ...

JSPX scriplet inside HTML input type textbox

Hi, I have the following in my jspx file: <jsp:scriplet> int myvar = 2; </jsp:scriptlet> How can I put variable myvar into a textbox (id=myinput) value using JSTL or scriptlet (I can do this using session variable) <input type="text" id="myinput" value="...the value of myvar..."/> Thanks ...

Google map in jsp document

Hi, I am trying to implement google map api into one of my web page which is generated by jsp document, and I am having trouble getting it work. I found some jsp taglibrary by www.lamatek.com/GoogleMaps, but it doesn't seem to work.(I mean even examples on their web site don't work) Has anyone done work on google map in jsp document...

JSP Document/JSPX: what determines how tabs/space/linebreaks are removed in the output?

I've got a "JSP Document" ("JSP in XML") nicely formatted and when the webpage is generated and sent to the user, some linebreaks are removed. Now the really weird part: apparently the "main" .jsp always gets all its linebreak removed but for any subsequent .jsp included from the main .jsp, linebreaks seems to be randomly removed (some ...

differences between aspx and jspx? and which one?

Hi everyone, What are the differences between aspx and jspx? and Why should I choose aspx or jspx? what is the best software to develop web poject with jspx? Thank you for your reply. ...

How to comment in jspx page

How to comment the code in jspx page? I have tried several methods, <!-- --> <%-- --> but it doesn't not work! So I have to: <c:if test="${false}">code</c:if>, it is really urgly, Is there any other ways? Any help is appreciated! ...

How to output "&" from jspx?

How can the below element be output from jspx? **&nsp;** , output space in jspx **if(a && a!=b)**, JavaScript file in jspx ...

Appengine not compiling my .jspx files

I have a little app that runs fine on local dev appengine, but appengine itself is not processing my .jspx files. The jspx files are in WEB-INF so they should not be excluded by appengine (as a static resource) I am using Apache Tiles to define my views. So the html produced looks like this: <html xmlns:jsp="http://java.sun.com/...

How to avoid hard linking Frontend assets In Spring MVC

I am new to spring MVC coming with experience using PHP MVC frameworks and ROR. I am having a hard time finding the appropriate way to organize and include front end assets into the view templates. Here is the default code Roo produces for the default style sheet: <spring:theme code="styleSheet" var="roo_css"/> <spring:url value="/${r...