20030219 Wednesday February 19, 2003

JSP 1.2 <-> JSP 2.0 Here's something that I need: A way to convert JSP 1.2 pages to JSP 2.0 pages. Basically, this only really involves changing all the <c:out value="${...}" /> tags to be simply ${...}. I have a couple motivations for this. The first is that Wrox wants struts-resume and security-example to be written using JSP 2.0 (it is a JSP 2.0 book after all). However, I'm afraid that most developers won't be able to use 2.0 for quite some time, considering that the J2EE 1.4 (with JSP 2.0) won't be released until this summer. So I'd like a way to create a JSP 1.2 version and a JSP 2.0 version of my these applications from the same source code. What would be best - to write the source in JSP 1.2 and then parse it for <c:out /> tags and strip them accordingly? I'd rather write the source in JSP 2.0 and then add in the <c:out /> tags using Ant, since it'd be much simpler. Then again, I've already written a fair amount using JSTL with 1.2. Comments and suggestions are encouraged! Posted in Java at Feb 19 2003, 04:45:02 PM MST 2 Comments

Comments:

Couldn't you do the 1.2 JSPs in XHTML and then just apply an XSLT stylsheet with to create the 2.0 ones? : <xsl:template match="c:out"> &nbsp;&nbsp;<xsl:value-of select="@value"/> </xsl:template> and just copying for all other elements?

Posted by Måns af Klercker on February 25, 2003 at 04:40 AM MST #

hmm.... Servlet/JSPs are a part of the J2EE spec, howver we do not have to wait until the complete J2EE stack is available to start migrating to JSP 2.0. All we need for that is an engine that implements the spec, and Tomcat is as usual just what the doctor ordered... cheers.

Posted by Laurent Michalkovic on May 18, 2003 at 03:14 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is the Lead UI Architect at LinkedIn. The opinions on this site are mine, not my employers.
« November 2008
SunMonTueWedThuFriSat
      
1
2
3
6
7
8
9
10
11
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today

Recent Entries

Tag Cloud