Friday, November 21, 2014

including classes in Java

This should allow you to use a class in a .jsp page:

<%@page import="foo.bar.baz.qux.Signature"%>

 
 

Signature would live here:

C:\rootofyourproject\src\java\foo\bar\baz\qux\Signature.java

 
 

If Signature has this inside:

package foo.bar.baz.qux;
public class Signature {
   public static String Somethingerother = "meh";
}

 
 

You might use it in your .jsp page like so:

<% request.setAttribute("thingy", Signature.Somethingerother); %>

No comments:

Post a Comment