JDOM and JSP

View: New views
3 Messages — Rating Filter:   Alert me  

JDOM and JSP

by Jabba Laci :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

With JDOM I produce XHTML files that are also JSP files. I would like
to do the following:

<xf:submission action="URL?file=<%= request.getParameter("file") %>" />

JSP should process the line to produce this:

<xf:submission action="URL?file=data.xml" />

Here, "xf:submission" is a JDOM Element object. My concern is that
JDOM transforms "<" to "<". Do you have an idea how to solve it?

Thanks,

Laszlo
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Parent Message unknown Re: JDOM and JSP

by Jabba Laci :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> If you're using JSP >= 2.0 (for example Tomcat >= 5.0), you can avoid that
> old <%= notation.
>
> Instead, you can write:
>
> <xf:submission action="URL?file=${request.file}"/>

Hi,

Thank you, I needed exactly this. However, instead of ${request.file},
we need to write ${param.file} (that's what I figured out).

Thanks again,

Laszlo
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: JDOM and JSP

by Geoff Rimmer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you're using JSP >= 2.0 (for example Tomcat >= 5.0), you can avoid that old <%= notation.

Instead, you can write:

<xf:submission action="URL?file=${request.file}"/>

and this is now a valid piece of XML.

See http://jcp.org/aboutJava/communityprocess/final/jsr152/index.html for details of the JSP 2.0 spec.

Geoff

On 8 Jan 2009, at 17:56, Jabba Laci wrote:

Hi,

With JDOM I produce XHTML files that are also JSP files. I would like
to do the following:

<xf:submission action="URL?file=<%= request.getParameter("file") %>" />

JSP should process the line to produce this:

<xf:submission action="URL?file=data.xml" />

Here, "xf:submission" is a JDOM Element object. My concern is that
JDOM transforms "<" to "&lt;". Do you have an idea how to solve it?

Thanks,

Laszlo
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...


_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...