Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14166

Re: Apache JDBC utils

From Jan Burse <janburse@fastmail.fm>
Newsgroups comp.lang.java.programmer
Subject Re: Apache JDBC utils
Date 2012-05-03 00:59 +0200
Organization albasani.net
Message-ID <jnse92$2nm$1@news.albasani.net> (permalink)
References (1 earlier) <jnr1u1$6g8$1@news.albasani.net> <jnrjt7$316$1@dont-email.me> <jns3sk$f24$1@news.albasani.net> <28822840.1257.1335993779644.JavaMail.geo-discussion-forums@pbbpz9> <kvior.21917$em4.13812@newsfe21.iad>

Show all headers | View raw


Daniel Pitts schrieb:
> He's using a JSP to generate a Java source file,
 > and your complaint is about scriptlets?

Yes, the argument that goes against <% %> since
they are not true XML tags doesn't work since
the Java source files are generated as
text/plain.

But a template language could nevertheless
be used that is based on XML. Only problem
here is if one wants to generate an instruction
from the template language itself. Which is
normaly not the case for Java code, since it
has hardly raw XML.

But In general the problem is agravated whenever
one wants to use a template language X to generate
code in the same template language X. For example
in a couple of places I use JSP to generate JSP.
The workaround here is to define a custom tag
that generates the <% and %>.

Here is the code for this Taglet:

/**
  * <p>This tag generates the <% %> pair.
  *
  * <p>Matula 1.3 (a beans and jsp generator)
  * <br>GPL 2003-2005, Jan Burse, XLOG Switzerland
  */
public class ScriptJava
     extends TagSupport {

   public int doStartTag() throws JspException {
     try {
       pageContext.getOut().print("<%");
     }
     catch (IOException x) {
       throw new JspException(x);
     }
     return TagSupport.EVAL_BODY_INCLUDE;
   }

   public int doEndTag() throws JspException {
     try {
       pageContext.getOut().print("%>");
     }
     catch (IOException x) {
       throw new JspException(x);
     }
     return TagSupport.EVAL_PAGE;
   }

}

Bye

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Apache JDBC utils markspace <-@.> - 2012-04-30 14:55 -0700
  Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-30 20:56 -0300
    Re: Apache JDBC utils markspace <-@.> - 2012-04-30 17:50 -0700
  Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-04-30 18:03 -0700
    Re: Apache JDBC utils markspace <-@.> - 2012-04-30 19:27 -0700
      Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 10:29 -0300
        Re: Apache JDBC utils markspace <-@.> - 2012-05-01 08:57 -0700
          Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 11:16 -0700
            Re: Apache JDBC utils markspace <-@.> - 2012-05-03 07:51 -0700
    Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:22 -0400
  Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 10:32 -0700
    Re: Apache JDBC utils markspace <-@.> - 2012-05-01 11:22 -0700
      Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-01 15:26 -0700
        Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 19:44 -0300
  Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 19:26 -0400
    Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-01 21:14 -0300
      Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:22 -0500
        Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:52 -0400
      Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:51 -0400
        Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 17:11 -0300
          Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 16:58 -0400
            Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-03 18:25 -0300
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 19:55 -0400
    Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-01 22:08 -0500
      Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 13:55 -0400
        Re: Apache JDBC utils Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-05-03 13:44 -0500
          Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 15:06 -0400
  Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-01 23:37 -0400
    Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 07:37 -0300
      Re: Apache JDBC utils "John B. Matthews" <nospam@nospam.invalid> - 2012-05-02 18:51 -0400
  Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 12:22 +0200
    Re: Apache JDBC utils markspace <-@.> - 2012-05-02 08:29 -0700
      Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-02 22:02 +0200
        Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 14:22 -0700
          Re: Apache JDBC utils Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-02 18:53 -0300
          Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:03 +0200
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:14 +0200
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:27 +0200
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:03 -0400
            Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-02 18:58 -0400
            Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:18 -0700
          Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 15:25 -0700
            Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 00:59 +0200
              Re: Apache JDBC utils Arne Vajhøj <arne@vajhoej.dk> - 2012-05-03 14:05 -0400
            Re: Apache JDBC utils Lew <lewbloch@gmail.com> - 2012-05-02 16:24 -0700
              Re: Apache JDBC utils Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-05-02 16:35 -0700
              Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:46 +0200
              Re: Apache JDBC utils Jan Burse <janburse@fastmail.fm> - 2012-05-03 01:49 +0200

csiph-web