As U, I thought about using Static class in my JSP engine
( very good in order to transfer/encapsulate sensible data as the password
for a ftp service )
but It seems that STATIC stuff will not be string good manipulated in my JSP
engine ( the simple JSDWDK engine )

I think it is a default of the JSP engine.
so you can also use the <usebean> tag and "instanciate" this static class
not very rigorous , but it works!


Have fun
Guillaume
[EMAIL PROTECTED]


-----Original Message-----
From: Martin Leboeuf
To: [EMAIL PROTECTED]
Sent: 29/02/00 23:31
Subject: public static final variables in a jsp page

Hi !

I am using an ensemble of predefined constants, grouped together in a
WebAppConstants class, which looks like this :

package com.my.package.name;

public class MyConstants
{
   public final static int CONSTANT_NO_1 = 0;
   public final static int CONSTANT_NO_2 = 1;

   public final static String STRING_NO_1 = "string1";
}

If I try to use this class in my jsp pages with :

<%@ page import="com.my.package.name.MyConstants %>

I get runtime errors telling me that some Attribute has no value. This
error
message
seems to be random because the attribute specified in the error message
is
the name of
a html form, and changes if I move the import statement in my jsp page.

Any hint on that ?

Thanks for your help, Martin.
[EMAIL PROTECTED]

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to