jsp, java, classpath, help :)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vegardlu
    New Member
    • Oct 2007
    • 1

    #1

    jsp, java, classpath, help :)

    hi, I got some problems with connecting my Java .class files to my jsp page.

    this is what I have:

    1 class named Test.class

    it looks like this:

    Code:
    public class Test {
        public static String printTest() {
            return "endelig virker det";
    }
    }
    1 JSP file like this:

    Code:
    <%@page import="tried many things here*" %>
    
    <html>
    <head>
    </head>
    
    <body>
    <%
    
    out.println("test");
    out.println(Test.printTest());
    %>
    </body
    
    </html>
    it seems I cant find out where I should place the files, how I should orgenize the folder etc, have tried many diffrent options. after reading a bit it looks like I should place the .class file in a WEB-INF folder, but I use my universetys servers, and I cant find a folder with this name.

    if anyone got some tips on how to solve this I would be greatful
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by vegardlu
    hi, I got some problems with connecting my Java .class files to my jsp page.

    this is what I have:

    1 class named Test.class

    it looks like this:

    Code:
    public class Test {
        public static String printTest() {
            return "endelig virker det";
    }
    }
    1 JSP file like this:

    Code:
    <%@page import="tried many things here*" %>
    
    <html>
    <head>
    </head>
    
    <body>
    <%
    
    out.println("test");
    out.println(Test.printTest());
    %>
    </body
    
    </html>
    it seems I cant find out where I should place the files, how I should orgenize the folder etc, have tried many diffrent options. after reading a bit it looks like I should place the .class file in a WEB-INF folder, but I use my universetys servers, and I cant find a folder with this name.

    if anyone got some tips on how to solve this I would be greatful
    Find out the class_path of your Server :-)
    I think you can get help from them instead of us.

    Kind regards,
    Dmjpro.

    Comment

    Working...