473,396 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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:

Expand|Select|Wrap|Line Numbers
  1. public class Test {
  2.     public static String printTest() {
  3.         return "endelig virker det";
  4. }
  5. }
1 JSP file like this:

Expand|Select|Wrap|Line Numbers
  1. <%@page import="tried many things here*" %>
  2.  
  3. <html>
  4. <head>
  5. </head>
  6.  
  7. <body>
  8. <%
  9.  
  10. out.println("test");
  11. out.println(Test.printTest());
  12. %>
  13. </body
  14.  
  15. </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
Oct 2 '07 #1
1 1326
dmjpro
2,476 2GB
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:

Expand|Select|Wrap|Line Numbers
  1. public class Test {
  2.     public static String printTest() {
  3.         return "endelig virker det";
  4. }
  5. }
1 JSP file like this:

Expand|Select|Wrap|Line Numbers
  1. <%@page import="tried many things here*" %>
  2.  
  3. <html>
  4. <head>
  5. </head>
  6.  
  7. <body>
  8. <%
  9.  
  10. out.println("test");
  11. out.println(Test.printTest());
  12. %>
  13. </body
  14.  
  15. </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.
Oct 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Lem | last post by:
I get the error Exception in thread "main" java.lang.NoClassDefFoundError when I type java app2 in the command prompt. I've tried moving to the jre directory and typed java c:\app2\app2, but it...
8
by: Fu Bo Xia | last post by:
the java.lang.Object.forName method takes a java class name and returns a Class object associated with that class. eg. Class myClass = Object.forName("java.lang.String"); by if i only know the...
0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
2
by: dave | last post by:
(Forgive all caps... they are there to differentiate btw question and code) THIS IS THE ERROR I KEEP GETTING. IT COMPILES BUT WHEN IT RUNS, THE FOLLOWING POPS UP: Exception in thread "main"...
4
by: Abdelhalim MIMOUNI | last post by:
hi, i'm new to java, and using sun last JDK, and i'm trying to understand how work this feature when we want to compile at command line ? i'm trying to set the classpath to the directory of the...
3
by: Bernd Oninger | last post by:
When I run the successfully compiled java source shown at the end I got a runtime error: Exception in thread "main" java.lang.NoClassDefFoundError: org/jdom/Content Where is the missing class ?...
7
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install...
2
by: ramasubramanian.rahul | last post by:
hi i am trying to call some java APIs from c . i use the standatd JNI calls to load the JVM from a c program and call all java functions by using a pointer to the jvm which was returned by the JNI...
6
by: =?Utf-8?B?VkIgSm9ubmll?= | last post by:
ASP.NET 2.0 / Visual Studio 2005 / VB.Net 2.0 I have a web interface that needs to launch a java application. What a long strange trip it has been... I am using Process.Start process start...
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.