Import Java package in JSP

I hope this is an appropriate forum for this query.
I want to be able to access a user-created Java package in JSP.
I have this code:
<%@page import="TPClass.*" %>
<%
xxx = TPClass
session.setAttribute("response",xxx.GetTPResponse());
%>
The error display points to TPClass in the import statement with the message "TPClass not found".
TPClass files are in the same location as the other project files.
I have creatyed and compiled the TPClass package.
Is there more I need to do?
Brenton

I think you are very new to java....
anyway
<%@page import="class name with full qualified package name"%>
like
<%@page import="com.x1.x2.TPClass"%>
<%
TPClass cls =new TPClass();
//then do whatever you want...
%>
hope u understand now.....

Similar Messages

  • Can i import java fx in jsp or html?

    can i import java fx in jsp or html?

    coolsayan.2009 wrote:
    just to test i did rigt-click on my web-based jsp project project->new item->other->javaFX stage and wrote the example code like:
    but got all red under lined word in all the lines what to do???Ouch! Not being familiar with NetBean, I am not sure, but I fear you mix stuff.
    "web-based jsp project" => so you write JSP or HTML stuff there, no? Like including the dtfx.js file and putting the javafx({ ... }) call in the proper places.
    "wrote the example code like (JavaFX code)" => Maybe it should be in a separate JavaFX project? Then generate the .jar file and use it in the above project.
    Now maybe I am misleading (if there is a a JavaFX stage in new items of the projects, perhaps NB allows it?) so I hope somebody knowing NB better than me will help you.
    Just in case: JavaFX code goes to .fx files; you cannot embed JFX code in JSP pages.

  • JAVA PACKAGES and JSP

    i Have two problems one is i am designing a website which consists of a form. I am trying to write the Connectiviy and all other insert statements in seperate java packages and include them in JSP files.
    i Have two java packages one is DBUtil(having two java files both dealing with connectovity) and another one is StudentUtIl which has java files that open the connections with database connection and insert data into DB., I am having a big Problem here. How can i call the function in the other java package in the files in this java package. i have openDB()and Close() in the other Db and i want to call these functions in JAVA classes in the other package. How to include a package. Both these packages are in the same File system mounted on a Local directory

    Thank you for the reply. I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

  • How to import a package in jsp

    i've searching here and i've not found answer to this, so i write it here.
    i've created a class to send mail, it imports the javax.mail.* and javax.activation.*, in a package named jspbeans.
    now, when i try to use this package in my jsp page (using tomcat), gives me the error:
    Package jspbeans not found in import
    import jspbeans.*;
    the code for my jsp page is:
    <%@ page language="java" %>
    <html>
    <head>
    <title>Sending mail from JSP</title>
    </head>
    <body>
    <%@ page import="jspbeans.*"%>
    <jsp:usebean id="sendmail" class="jspbeans.SendMail" scope="page"/>
    <jsp:setProperty name="sendmail" property="host" value="mail.wavelinksystems.com"/>
    <jsp:setProperty name="sendmail" property="to" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="from" value="[email protected]"/>
    <jsp:setProperty name="sendmail" property="msg" value="testing 1 2 3..."/>
    <jsp:setProperty name="sendmail" property="subject" value="test"/>
    <%//sendmail.send();%>
    <p>
    Mail has been sent to <jsp:getProperty name="sendmail" property="to"/>
    </body>
    </html>and the path of this jsp page is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspMailTest.jsp
    the path for the package is:
    C:\WINDOWS\Desktop\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\pruebas\jspbeans
    what am i doing wrong?
    what am i missing?
    how do i have to import the package?
    thanks

    it generates a
    java.lang.NoClassDefFoundError: javax/mail/MessagingException
    i changed the package to that directory and the import generates no errors, if i do nothing but the import, and soem printing, the page is generated, but when i try to assign the variables, generates that error, why is it?

  • Importing java classes into jsp page

    I'm trying to import java classes inside my jsp page, while doing that i am getting compilation error "package uma.natarajan.javaclasses" not found. I don't know where to copy the java files. i'm keeping my jsp files under public_html folder
              

    Hi uma,
              create uma\natarajan\javaclasses under weblogic_home\myserver and copy java
              classes(u want to import) to uma\natarajan\javaclasses and then u try.
              Concept is the java classes u import should be present in a classpath. Hope
              this may help u,
              Arun,
              [email protected]
              "uma natarajan" <[email protected]> wrote in message
              news:3a490bcb$[email protected]..
              > I'm trying to import java classes inside my jsp page, while doing that i
              am getting compilation error "package uma.natarajan.javaclasses" not found.
              I don't know where to copy the java files. i'm keeping my jsp files under
              public_html folder
              

  • Problem with importing my package in JSP

    This is the code for creating a package dbconnection:
    package dbconnection;
    import java.sql.*;
    public class DBConnection
         java.sql.Connection con=null;
         public void DBConnection(){ }
         public java.sql.Connection getDBConnection()
    try{
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              con=DriverManager.getConnection("jdbc:mysql://localhost/empdetails?user=root&password=harish");
              }//try in DBConnection
         catch(Exception e)
                   e.printStackTrace();
         }//catch in DBConnection
         finally{
              return con;
              }//finally in DBConnection
         }//getDBConnection
         // Closing Connection to Database
    public void closeConnection()
         try{
              con.close();
              //System.out.println("Connection closed");
         } //try in closeConnection
         catch(Exception e)
              e.printStackTrace();
         } // catch in closeConnection
    } // closeConnection
    This is the code for testing the above package to know whether the package getsimported or not:
    import dbconnection.*;
    import java.sql.*;
    import java.util.*;
    public class Testing1 {
         dbconnection.DBConnection dbc = new dbconnection.DBConnection();
         Statement st=null;
         Connection con=null;
         ResultSet rs = null;
         ResultSetMetaData rsmd= null;
         public Testing1() { }
         public void getDBConnection(){
              con = dbc.getDBConnection();
              System.out.println("Connection created");
                   try
                   st = con.createStatement();
                   System.out.println("Statement Created");
                   } // try
                   catch(Exception e)
                   e.printStackTrace();
                   } // catch
    public Vector getDetails()
         Vector v = new Vector();
         String s = null;
         int size = 0;
    rs = null;
    try
         getDBConnection(); // Get DB Connection
         rs=st.executeQuery("select * from dept");
    rsmd = rs.getMetaData();
    size = rsmd.getColumnCount();
    System.out.println("Column Count is "+size);
              while(rs.next())
    for(int i=1;i<=size;i++)
    s = rs.getString(i);
    // System.out.println(s);
                   v.addElement(s);
         catch(Exception e)
              e.printStackTrace();
         finally
              // closeConnection(); // Close DB Connection
         return v;
    } // close getAddressDetails
    public static void main(String a[])
         Testing1 mo = new Testing1();
         Vector vx = mo.getDetails();
         Enumeration ex = vx.elements();
         String str;int i=0;
         while(ex.hasMoreElements())
              str = (String) ex.nextElement();
              System.out.println("value :"+str);
    Now this is working fine when we run it normally. I am able to get the query done.
    When I simply call the class in a small JSP file to test its not working.
    I want the solution very urgently...
    I also want to tell u that i am using Tomcat server for which the classpath is also set correctly.
    Thankx,
    harish..

    The path in which I placed my DBConnection.class file is:
    C:\Tomcat\jakarta-tomcat-4.0.6\webapps\examples\WEB-INF\classes\testYou are suppose to place your class file in the package 'dbconnection'.
    So, puit your DBConnection.class in,
    C:\Tomcat\jakarta-tomcat-4.0.6\webapps\examples\WEB-INF\classes\dbconnection.
    Sudha

  • How to import java package in form 10g

    hello
    i have make a java package but its not looking so far possible to include it in java import list, how i can import it in form 10 g

    hi,
    if classpath does not work you can try to add your jar file at this registry key :
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_DevSuiteHome\FORMS_BUILDER_CLASSPATH
    Engin.

  • Importing Java Packages

    Hi all,
    I've just started a course at uni learning Java. On the Linux machines there it's easy importing a package - type import (name of package) then run the command javac with the classpath of the package.
    However, back at home this can't be done. I've tried pacing the package in the same directory as the java file, but still won't compile, stating that the package cannot be found. Any ideas?

    Ah, maybe I misunderstood, so I'll give you the answer to my other interprtation of the question.
    You need to set up your classpath on your computer, If your using windows you can go to:
    control Panel > system > Advanced > Environment Variables
    Than add:
    Variable Name: CLASSPATH
    VariableValue: .;c:java_SDK\;c:\java\
    obviously change your directory names according to where you compile your java files, the . at the start means "look in this directory"

  • Problem in import ejb package in jsp

    Hi friends
    I am doing one small project with Eclipse Europa,jsp , EJB. with XDoclet, weblogic server
    I first created all my jsp files as one project.Then i created one enterprise application project with XDocklet , after that i imported all the jsp files using import option in eclipse.
    at development time i am not getting any problem.after deployment when i try to run the jsp files i am getting error of
    Compilation of 'C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java' failed:
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    probably occurred due to an error in /jspPages/testing.jsp line 8:
    <%@page import = "order.headsess.*" %>
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 21:
    HeadHome home = null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 22:
    Head remote =null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 96:
    home =HeadUtil.getHome(env);
    Full compiler error(s):
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    import order.headsess.*; //[ /jspPages/testing.jsp; Line: 8]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    symbol : class HeadHome
    location: class jsp_servlet._jsppages.__testing
    HeadHome home = null; //[ /jspPages/testing.jsp; Line: 21]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    symbol : class Head
    location: class jsp_servlet._jsppages.__testing
    Head remote =null; //[ /jspPages/testing.jsp; Line: 22]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    symbol : variable HeadUtil
    location: class jsp_servlet._jsppages.__testing
    home =HeadUtil.getHome(env); //[ /jspPages/testing.jsp; Line: 96]
    ^
    4 errors
    Fri Oct 26 01:40:14 GMT+08:00 2007

    Hi friends
    I am doing one small project with Eclipse Europa,jsp , EJB. with XDoclet, weblogic server
    I first created all my jsp files as one project.Then i created one enterprise application project with XDocklet , after that i imported all the jsp files using import option in eclipse.
    at development time i am not getting any problem.after deployment when i try to run the jsp files i am getting error of
    Compilation of 'C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java' failed:
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    probably occurred due to an error in /jspPages/testing.jsp line 8:
    <%@page import = "order.headsess.*" %>
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 21:
    HeadHome home = null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 22:
    Head remote =null;
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    probably occurred due to an error in /jspPages/testing.jsp line 96:
    home =HeadUtil.getHome(env);
    Full compiler error(s):
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:20: package order.headsess does not exist
    import order.headsess.*; //[ /jspPages/testing.jsp; Line: 8]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:51: cannot resolve symbol
    symbol : class HeadHome
    location: class jsp_servlet._jsppages.__testing
    HeadHome home = null; //[ /jspPages/testing.jsp; Line: 21]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:52: cannot resolve symbol
    symbol : class Head
    location: class jsp_servlet._jsppages.__testing
    Head remote =null; //[ /jspPages/testing.jsp; Line: 22]
    ^
    C:\bea\weblogic81\samples\domains\examples\.\examplesServer\.wlnotdelete\extract\examplesServer_loginProcess_WebContent_login\jsp_servlet\_jsppages\__testing.java:226: cannot resolve symbol
    symbol : variable HeadUtil
    location: class jsp_servlet._jsppages.__testing
    home =HeadUtil.getHome(env); //[ /jspPages/testing.jsp; Line: 96]
    ^
    4 errors
    Fri Oct 26 01:40:14 GMT+08:00 2007

  • Import java-classes in JSP-page

    Hi,
    I'm starting with JSP and with trying one of the first examples in the book "beginning J2EE 1.4" from wrox, i got following problem.
    i'm trying to import a java-class in the package CH03 with
    <%@ page import="Ch03.FaqCategories" %>but he didn't find the package Ch03.
    I try already many things and i have no idea of the cause of the problem. So it's difficult to give information that leads to the solution.
    Maybe helpfull is the direcory-structure:
    jsp-page: /Ch03/welcome.jsp
    java-classe: /Ch03/WEB-INF/classes/Ch03/FaqCategories.class
    If you need source-codes or other information, just ask.
    Thanks,
    Dennis

    Thank you,
    Your help was one step into the good direction and that problem is solved.
    The application work now with studio one, but if i try it to work it with a stand-alone tomcat server it doesn't work anymore. I go first try to solve this problem by my self or at least try to describe the problem more exactly, before i ask for new help.
    but if you have any idea, that's always welcome...
    with regards,
    Dennis

  • How to import custom package in JSP

    Hi! everyone,
    I wrote a jsp file that imports some custom packages in a jar file. I've put that jar file in the classpath, the WEB-INF/classes directory, the orion directory etc...But I kept getting the "Package doesn't exist" compiling error in the borowser. Would you please help and tell me what I'm missing here?

    Thank you for your reply. I tried but it didn't work. Can you give me more hint on what to do?
    Placing the jar file in the /WEB-INF/lib directory
    should fix the problem.

  • Problem accessing variables from java file to JSP page

    Hello Everyone,
    I have small problem accessing my method variables from my java bean file to a JSP page. can some please take a look and tell me why I can't populate my JSP page, I've been trying all day to get this done!!!
    This is my Java file
    package dev;
    import java.io.*;
    import java.util.*;
    public class RoundDetail2
    public String string_gameID;
    public int string_card1;
    public String readDetail_topLayer;
    public static final String SUITS[] = {" ", "Clubs", "Hearts", "Spades", "Diamonds", "Joker", "FaceDown"};
    public static final String VALUES[] = {"Joker ","Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
    public static final String SuitVALUES[] = {" ","1","2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14"};
    public RoundDetail2() throws FileNotFoundException
    DataInputStream inFile=
                 new DataInputStream(
                    new BufferedInputStream(
                   new FileInputStream("C:/apps/jakarta-tomcat-4.0.6/webapps/ROOT/WEB-INF/classes/dev/Data_452SY2.txt")));
    try { 
                 while((readDetail_topLayer = inFile.readLine()) != null)
              StringTokenizer tokenizer_topLayer = new StringTokenizer(readDetail_topLayer,"\t", true);
                   while  (tokenizer_topLayer.hasMoreTokens())
                        string_gameID = tokenizer_topLayer.nextToken();
         catch(IOException e)
                    System.out.println(e.getMessage());
         Thanks KT

    ......How are you declaring the class in your JSP? ... are you instantiating it as a bean using the useBean tag, or just instantiating it in your code like normal.
    Maybe you could post the relevant JSP code too?
    Hello again,
    Only the last string is populating after the file has be tokenized. What I'll like to accomplish is passing the very first string in the file. I did not get too far in the JSP file setup because the code is still in it's testing stage, but any help will be highly appreciated.
    Here is the JSP code
    <%@page import="dev.*" %>
    <%@page session="true" language="java" import="java.io.*" %>
    <jsp:useBean id="wagerhist" scope="request" class="dev.RoundDetail2" />
    <html>
    <head>
    <title>Round Detail</title>
    <body>
      <table width="530" bordercolor="#000000" valign="top">
        <tr>
              <td align="left"  width="19%">Game ID<%=wagerhist.string_gameID%></td>
              <td align="left"  width="30%">  </td>
              <td align="left"  width="20%">card1</td>
              <td align="left"  width="31%">  </td>
            </tr>
      </table>
    </body>
    </html>

  • Java package and c++ header files

    What is the difference between importing java package and including header files in c++?

    I do not know .. have been away from C/C++ for a long time...
    As much as I remember you can only import one header file each time... also when you import a header file you can just call methods from the header file automatically ...
    However I could be very wrong on this .. really lost touch from C/C++ ...
    regards,
    Sim085

  • Import statement in .java files and .jsp files ..correction

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
    <%@page import="one"%>
    in My.jsp.
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.

    It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
    What you've done is a little different. I'm assuming a couple of things:
    1. you have no package declaration at the top of one.java or two.java
    2. you have the current directory "." in your classpath.
    Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
    So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
    When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine.

  • Import packages in JSP

    All my files are in C:\tomcat-4.1.24\webapps\ROOT\security, and I have a test.jsp in that same directory together with my package xmlHandler (in a folder xmlHandler) which contains DOMUtil.class ...
    It seems that I have a problem with this line in my jsp file ...
    <%@ page import = "xmlHandler.DOMUtil"%>
    Tomcat keeys saying this error ...
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] /usr/local/tomcat4/work/Standalone/localhost/_/security/test_jsp.java:7: package xmlHandler does not exist
    [javac] import xmlHandler.DOMUtil;
    [javac] ^
    [javac] 1 error
    What's wrong ? I just have problem with this line only ... =(

    <%@ page import = "javax.xml.parsers.*"%>
    <%@ page import = "org.jdom.*"%>
    <%@ page import = "java.io.IOException"%>
    <%@ page import = "org.jdom.JDOMException"%>
    <%@ page import = "org.jdom.input.DOMBuilder"%>
    <%@ page import = "org.jdom.output.XMLOutputter "%>
    <%@ page import = "org.xml.sax.InputSource"%>
    <%@ page import = "org.apache.xerces.parsers.DOMParser"%>
    <%@ page import = "xmlPublisher.ws3"%>
    <html>
    <body>
    <%
    String xmlFile = request.getParameter("xmlFile");
    String formDate = request.getParameter("formDate");
    String formRisk = request.getParameter("formRisk");
    String formDesc = request.getParameter("formDesc");
    String xmlFileDir = "c:/localhost/security/" + xmlFile;
    org.w3c.dom.Document domDoc = null;
    DOMParser parser = new DOMParser();
    try{
         parser.parse(new InputSource(xmlFile));
         domDoc = parser.getDocument();
    catch(Exception e){
         e.printStackTrace();
    try{
         DOMBuilder builder = new DOMBuilder();
         org.jdom.Document jdomDoc = builder.build(domDoc);
         XMLOutputter outputter = new XMLOutputter();
         outputter.output(jdomDoc, System.out);
    catch ( java.io.IOException e){
         e.printStackTrace();
    %>
    <h1>xmlFile is <%out.println(xmlFile);%></h1>
    <h1>formDate is <%out.println(formDate);%></h1>
    <h1>formRisk is <%out.println(formRisk);%></h1>
    <h1>formDesc is <%out.println(formDesc);%></h1>
    <h1>xmlFileDir is <%out.println(xmlFileDir);%></h1>
    </body>
    </html>

Maybe you are looking for