Jsp classpath

hello every one,
i have designed a project in the JSP with some Javabeans classes, what when ever i m started my indexfile in which i m using some of my beans files. the error is coming that beans class is not found i.e is the beans is not instantiated. can anyone tell me how to set the classpath or where to keep my classes folder .
as i m using the tomcat server
the following tree structure is:
c:\tomcat\binary
webapps\examples\jsp\purejsp( is my folder which having the all the JSP files the image folder and the classes folder
tree structure of the my folder
purejsp
(contain all the JSP files )
contain the imgae folder ( having all the images )
contain the web-inf folder which having the classes folder having the all java beans classes
plz mail me how to set the class path asap
mail id is callyash@rediffmail com

You don't have a right dir structure. Did you set 'purejsp' in the context path in your server.xml? Make these changes if not,
1. Place all your jsps in webapps\examples\jsp folder.
2. Place web-inf and its subdirectories in webapps\examples folder.
3. Keep your other folder (images, srcs etc) in webapps\examples.
Because, context path will be already set for 'examples'. So, this examples must have web-inf dir. Now use the url, http://localhost:port/examples/jsp/your_jsp.jsp. This jsp can now identify the beans in web-inf\classes dir. You need to import those beans before you use them in your jsp.
Sudha

Similar Messages

  • Build JSP-structure problem in JspC

    Hi,
    I am trying to deploy my project and I need to compile JSPs and create WEB-INF directory and web.xml file.
    My build environment:
    Win 2000
    Java 1.4.1
    Tomcat 4.0.3
    My problem is as follows:
    I use an ANT script :
    <java classname="org.apache.jasper.JspC" classpath="${jsp.classpath}" fork="yes" failonerror="yes">
    <jvmarg value="-Dcatalina.home=${catalina.home}"/>
    <arg line="-d ${jsp.path.precompile.src} -uriroot ${jsp.path.webapp} -webxml ${jsp.path.precompile}\web.xml -webapp ${jsp.path.webapp}"/>
    </java>
    I have an an compile this JSP structure:
    -main_folder
    - folder_1
    - folder_2
    - folder_2_1
    - folder_3
    - folder_3_1
    - folder_3_1_1
    but every time I start the script, the JSPs are compiled to JAVA in one default package. But I have in some subfolders the same JSPa like in the other folders ("index.jsp, error_page.jsp") and after compiling to JAVA this JSP are lost, because are overwritten from the other ...
    In the old Tomcat 3.2 was OK!
    I don't know how to tell to the JspC to use the folder structure as a package definition for the JAVA files.
    Please help me !!!

    Tis a defect in the way jasper/ant handles subdirectories in the packages that needs to be resolved. If you have your jsp files in a flat directory, you're fine. If you don't, you'll need this bug resolved: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4750
    Please feel free to vote for it. :)
    A workaround is to create a separate ant <jspc> task for each directory and subdirectory.

  • Error when compiling JSF JSP

    I'm getting the following error when I try to compile an application containing a JSF JSP in JDeveloper 10.1.3. The error is:
    Error: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZ)V
    I've checked the files in the classpath and the TagAttributeInfo class is located in <install>/j2ee/home/lib/servlet.jar. I decompiled the class and it does have a constructor that takes (String, boolean, String, boolean, boolean).
    The only change I made between when things worked and now is that I tried to add a JSF JSP that used the ADF classes. But once I started getting this compilation error, I removed the ADF classes from the project, so they shouldn't be causing any problems anymore.
    Any ideas what's wrong?
    Thanks

    Hello,
    May be that your classpath doesn't include that location ?
    Have you tried to put the TagAttributeInfo.class file into your current folder
    (or may be in ..\<your_project>\Classes\.. path ) ?
    To check if your classpath does actually include your path, you could run:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Dummy JSP-CLASSPATH</title>
    </head>
    <body>
    <%
    out.println("<h1><em>JSP Showing your CLASSPATH</h1></em>");
    out.println("<hr></hr><p>");
    out.println(System.getProperty("java.class.path"));
    %>
    </body>
    </html>
    Hope this will help you.
    Stephan

  • How to pre-compile jsp and deploy to tomcat

    Hi All,
    I wuld like to know how to pre-compile JSPs and deploy to tomcat. I am using ANT tool to build and deploy the war file.
    Thanks in Advance.
    Regards,
    --Nagesh.                                                                                                                                                                                                                                                                                                                                               

    for Tomcat 5.0 (You'll need to edit to fit your needs)
        <path id="jsp.classpath">       
            <!-- point classpath to directory containing jasper-compiler.jar and
                   jasper-runtime.jar -->
            <fileset dir="C:\tomcat\common\lib">
                <include name="**/*.jar"/>
            </fileset>
            <fileset dir="C:/tomcat/common/endorsed">
                <include name="**/*.jar"/>
            </fileset>       
        </path> 
        <target name="jsp" >
        <!--
             The Ant JSPC task doesn't work with Tomcat 5.0
             so in the meantime we need to define our own task.
          -->
        <taskdef name="jspc50" classname="org.apache.jasper.JspC">
            <classpath>
                    <path refid="jsp.classpath"/>    
            </classpath>
        </taskdef>
        <jspc50 outputDir="${build.classes}"
                package="jsp"
                uriroot="${project.dir}/web/webApp"
                webXmlFragment="c:/web.xml"
                verbose="9"
                validateXml="false">           
        </jspc50>
        <javac srcdir="${build.classes}/jsp"
               destdir="${build.classes}"
               debug="true"
               optimize="false"
               includes="**/*.java"
               source="1.4">
                <classpath>
                    <path refid="classpath"/>
                    <path refid="jsp.classpath"/>
                </classpath>          
        </javac>
    </target>    More information can be found here :
    http://www.onjava.com/pub/a/onjava/excerpt/AntTDG_chap8/index1.html?page=last

  • Weblogic 6.0 jsp compile problem

              I'm having a problem with weblogic 6.0sp1 creating the java source files from a
              jsp file. The first 3 lines of the jsp are:
              <%@ page import="javax.naming.*"%>
              <%@ page import="java.util.Properties"%>
              <%@ page import="com.cicons.expenses.business.*"%>
              the first 2 imports work, but the 3rd does not. The compiler indicatesd the package
              is not found. The package com.cicons.expenses.business is located in a deployed
              ejb jar file targeted to the same server as the jsp. The jsp is in a war file
              also targeted to this server. Is it a requirement to create an ear combining the
              jar and war?
              

              Dave,
              The only way I have been able to successfully access an EJB from a JSP page in
              WLS 6 is to package everything up in their respective ear, war, and jar files.
              So I think that's what you need to do at the moment.
              -Todd
              "Dave Sailer" <[email protected]> wrote:
              >
              >I don't think that's my problem. I think I found the answer to my problem
              >at http://e-docs.bea.com/wls/docs60/////programming/packaging.html.
              >This states that, in order for a jsp to find an ejb, they must be packaged
              >in
              >jar/war/ear files. I just had the jsp sitting out there standalone and
              >the ejb
              >in a jar.
              >"Rick Joi" <[email protected]> wrote:
              >>I have not worked with WebLogic 6, but the following would be the issue
              >>for
              >>5.1.
              >>
              >>The war and the jar are being loaded in different ClassLoaders underneath
              >>the WebLogic ClassLoader (which is underneath the System ClassLoader).
              >> If
              >>you want to use your EJB as a client from JSP, you'll need to have your
              >>EJB
              >>client classes either in the WebLogic classpath or in your JSP
              >>classpath/war.
              >>
              >>The documentation on this for 5.1 is at
              >>http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_deployover.html#1056431
              >>
              >>Rick
              >>[email protected]
              >>www.rickanddonna.com/ips
              >>
              >>
              >>
              >>"Dave Sailer" <[email protected]> wrote in message
              >>news:[email protected]...
              >>>
              >>> I'm having a problem with weblogic 6.0sp1 creating the java source
              >>files
              >>from a
              >>> jsp file. The first 3 lines of the jsp are:
              >>> <%@ page import="javax.naming.*"%>
              >>> <%@ page import="java.util.Properties"%>
              >>> <%@ page import="com.cicons.expenses.business.*"%>
              >>>
              >>> the first 2 imports work, but the 3rd does not. The compiler indicatesd
              >>the package
              >>> is not found. The package com.cicons.expenses.business is located
              >in
              >>a
              >>deployed
              >>> ejb jar file targeted to the same server as the jsp. The jsp is in
              >>a war
              >>file
              >>> also targeted to this server. Is it a requirement to create an ear
              >>combining the
              >>> jar and war?
              >>
              >>
              >
              

  • Help with JSP pre-compiling

    We have a web application using Jboss4.0.5, jdk 1.6 and And 1.6.5, and now we try to do a pre-compiling as part of our build procedure.
    That is the first time I am going to do a pre-comp of a major application, which includes about 1700 jsp files.
    The directory tree of the application is as follows:
    /project
        |--- > /web_pre-comp/pages/jsp ( it contains all the jsp files )
        |----> /web_pre-comp/WEB-INF ( it contains the web.xml file.)
        |----> /web_pre-comp/WEB-INF/tld ( it contains the tld files)
        |----> /web_pre-comp/WEB-INF/src ( it coutains the generated src file from jsp )
        |---->/web_pre-comp/WEB-INF/classes ( it contains the compiled classes once the jsp java files are generated.   )
        |----> build.xml ( the ant script )And there is my build.xml file looks like:
    <project>
          <target name="pro.jsp.generate" depens="init">
           <java classname="org.apache.jasper.JspC" fork="yes">
              <classpath refid="tomcat.jsp.classpath"/>
              <arg line=" -d "/>
              <arg value="${jsp.generated.src.dir}"/>
              <arg line="-p"/>
              <arg value="${jsp.package.name}"/>
              <arg line="-webapp"/>
              <arg value="${jsp.src.dir}"/>
           </java>
       </target>
    </project>When I was running the ant script, I received such message:
    [java] org.apache.jasper.JasperException: The absolute uri: http://www.prounlimited.com/wandappconfig.tld cannot be resolved in either web.xml or the jar files deployed with this application
    We do have suh messages included in the web.xml file.
      <taglib>
            <taglib-uri>http://www.prounlimited.com/wandappconfig.tld</taglib-uri>
            <taglib-location>/WEB-INF/tld/wandappconfig.tld</taglib-location>
        </taglib>Any Ideas how to make it working ?
    Another side questions is when some java file are created from JSP, I see some "005f" included in the java file name, such as "inc_sup_princing_view.jsp" creats a
    "inc_005fsup_005fpricing_005fview_jsp.java" file. Does someone know why this happen ?
    Thanks a lot !
    Charlie

    We have a web application using Jboss4.0.5, jdk 1.6
    and And 1.6.5, and now we try to do a pre-compiling
    as part of our build procedure. Hi Charlie,
    According to your ant build script you're using Jasper compiler, but your web container is JBoss.
    I know that Tomcat uses the Jasper compiler --- but I don't know if JBoss supports Jasper or not. Please check with JBoss if they support Jasper, if not they my support a different pre-compiler.
    That is the first time I am going to do a pre-comp of
    a major application, which includes about 1700 jsp
    files.
    The directory tree of the application is as follows:
    /project
    |--- > /web_pre-comp/pages/jsp ( it contains all
    the jsp files )
    |----> /web_pre-comp/WEB-INF ( it contains the
    web.xml file.)
    |----> /web_pre-comp/WEB-INF/tld ( it contains
    the tld files)
    |----> /web_pre-comp/WEB-INF/src ( it coutains the
    generated src file from jsp )
    |---->/web_pre-comp/WEB-INF/classes ( it contains
    the compiled classes once the jsp java files are
    generated.   )
    |----> build.xml ( the ant script )And there is my build.xml file looks like:
    <project>
    <target name="pro.jsp.generate" depens="init">
    <java classname="org.apache.jasper.JspC"
    fork="yes">
    <classpath refid="tomcat.jsp.classpath"/>
    <arg line=" -d "/>
    <arg value="${jsp.generated.src.dir}"/>
    <arg line="-p"/>
    <arg value="${jsp.package.name}"/>
    <arg line="-webapp"/>
    <arg value="${jsp.src.dir}"/>
    java>
    </target>
    </project>When I was running the ant script, I received such
    message:
    [java] org.apache.jasper.JasperException: The
    absolute uri:
    http://www.prounlimited.com/wandappconfig.tld cannot
    be resolved in either web.xml or the jar files
    deployed with this application
    Check if the tld folder is visible to the classpath tomcat.jsp.classpath used inside the Ant build file.
    >
    We do have suh messages included in the web.xml file.
      <taglib>
    taglib-uri>http://www.prounlimited.com/wandappconfig.t
    ld</taglib-uri>
    taglib-location>/WEB-INF/tld/wandappconfig.tld</taglib
    -location>
    </taglib>Any Ideas how to make it working ?
    Another side questions is when some java file are
    created from JSP, I see some "005f" included in the
    java file name, such as "inc_sup_princing_view.jsp"
    creats a
    "inc_005fsup_005fpricing_005fview_jsp.java" file.
    Does someone know why this happen ?
    The 005f is expected, it is for internal reference for the pre-compiler, nothing to worry about.
    >
    Thanks a lot !
    Charlie

  • Prolem building DB's in Oracle 8i over nt 4.0

    Dear All,
    After finishing installation of 8i over NT 4.0. when i am trying to create Database its giving an Error " ORA-04031: Unable to allocate 93530872 bytes of shared memory " shared pool " unknown object " sga heap " db_block_buffers.
    Pls help me out
    Thanks
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Michael Kidd ([email protected]):
    Joe,
    You must specify the full path to the loginBean or set the JSP classpath to the apache subdirectory. Also, when you set the session's value in the class, you must use the same name as the id in your JSP.
    Ex: session.putValue("loginBean", loginBean);
    then use:
    <jsp:useBean id="loginBean"....
    The two names must match.
    Michael Kidd
    [email protected]<HR></BLOCKQUOTE>
    Michael:
    By full path do you mean the absolute path to the directory where the .class file resides or the full path relative to %Oracle_Home% and is that full path used in the class parameter of the useBean statement?
    null

  • 8i Apache sessions on NT 4.0

    When you use your browser's Back or Refresh buttons, the 8i Apache server may or may not create a new session rather than simply moving backwords in the history file or refreshing the current page. If you are trying to use session variable this becomes rather vexing. Is this "feature" inherant in Apache or in Oracle's implementation of Apache? And, is there anything that can be done about it?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Michael Kidd ([email protected]):
    Joe,
    You must specify the full path to the loginBean or set the JSP classpath to the apache subdirectory. Also, when you set the session's value in the class, you must use the same name as the id in your JSP.
    Ex: session.putValue("loginBean", loginBean);
    then use:
    <jsp:useBean id="loginBean"....
    The two names must match.
    Michael Kidd
    [email protected]<HR></BLOCKQUOTE>
    Michael:
    By full path do you mean the absolute path to the directory where the .class file resides or the full path relative to %Oracle_Home% and is that full path used in the class parameter of the useBean statement?
    null

  • 8i Apache on NT 4.0

    I have a bean. It's name is loginBean. It's class (loginBean.class) is located in \%Oracle_Home%\Apache\Apache\htdocs\csidb\Web-inf\classes (this is the Web-inf directory for the application). It is also located in \%Oracle_Home%\Apache\Apache\htdocs\Web-inf\classes, \%Oracle_Home%\Apache\jsp\Web-inf\classes and \%Oracle_Home%\classes. Any attempt to access this bean results in the following message:
    oracle.jsp.parse.JspParseException: Line # 21, Error: Unable to find class for bean: login defined by tag with class: loginBean
    The code calling/instantiating the bean is:
    <jsp:useBean id="login" class="loginBean" scope="session" />
    Why can this bean not be found? And, where should it be put to be found? And what device/tool should be used to put it there?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Michael Kidd ([email protected]):
    Joe,
    You must specify the full path to the loginBean or set the JSP classpath to the apache subdirectory. Also, when you set the session's value in the class, you must use the same name as the id in your JSP.
    Ex: session.putValue("loginBean", loginBean);
    then use:
    <jsp:useBean id="loginBean"....
    The two names must match.
    Michael Kidd
    [email protected]<HR></BLOCKQUOTE>
    Michael:
    By full path do you mean the absolute path to the directory where the .class file resides or the full path relative to %Oracle_Home% and is that full path used in the class parameter of the useBean statement?
    null

  • How to make the java files compile for a project created outside of Eclipse

    Hi^^,
    I have created a project outside of Eclipse. It has the following folders
    1. config
    2. source
    3. WEB-INF
    I want to execute the project on remote server. Will it compile automatically creating a new folder for .class files corresponding to the source folder or do i need to include a build.xml to enable the project to create a new folder for .class files. Also pls tell me how do I write this build.xml
    Please advise.

    Hi^^,
    Actually I have created a project without using eclipse.
    My source files are inside WEB-INF/source
    Now I want to compile the files using build.xml so that I can create class files. I am using the following build.xml
    <project name="jsp" default="all" basedir="./">
      <property environment="env"/>
      <property file="ArmorJSP.properties"/>
      <!-- set global properties for this build -->
      <property name="source" value="."/>
      <target name="all" depends="copy, jspc, testservlet"/>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled jsp classes into it -->
      <target name="jspc">
        <!-- Run ejbc to create the deployable jar file -->
        <java classname="weblogic.jspc" fork="yes">
          <arg line="-webapp ${APPLICATION_HOME} -compileAll -d ${APPLICATION_WEB_CLASSES} ${source}/*.jsp"/>
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </java>
      </target>
      <!-- Creates jsp_servlet directory under WEB-INF\classes of the Examples Web
        APP and places the compiled Servlets classes into it -->
      <target name="testservlet">
        <!-- Run ejbc to create the deployable jar file -->
        <javac destdir="${APPLICATION_WEB_CLASSES}" srcdir="${source}" includes="*.java">
          <classpath>
            <pathelement path="${WL_HOME}/lib/weblogic_sp.jar;${WL_HOME}/lib/weblogic.jar;${ARMOR_HOME}/ARMORSecurity.jar;${ARMOR_HOME}/ARMORUtil.jar"/>
          </classpath>
        </javac>
      </target>
      <target name="copy">
        <copy todir="${APPLICATION_HOME}">
          <fileset dir="${source}">
            <include name="*.jsp"/>
          </fileset>
        </copy>
      </target>
    </project>I do not know how to compile the project using this build.xml
    The motive of doing all this is to understand how is Eclipse doing the build project step. I simply cannot find any build.xml inside any of my projects created in Eclipse however when right click on the project and choose build project, it compiles excellently. ???
    Edited by: pksingh79 on Nov 24, 2008 1:19 PM

  • Restarting Apache server (Password?)

    I can't edit my httpd.conf file; every time I restart my servers, my edits vanish.
    Someone suggested I restart the Apache server by typing the following into Terminal:
    sudo apachectl -k restart
    So I did, and I get the following error:
    /usr/sbin/apachectl: line 90: 17349 Bus error: 10           $HTTPD $ARGV
    Can anyone tell me what this means and how I can fix it?

    Hi,
    By default, the Oracle JSP class loader that comes with the Oracle JSP Container will automatically reload a class in the Oracle JSP classpath whenever the class file or JAR file has been modified since it was last loaded.
    The JSP container checks whether the last-modified time of the page implementation class file is older than the last-modified time of the JSP page source file.
    However to enable dynamic loading, remember that classes must be in the JSP classpath, not the system classpath, to be dynamically reloaded. If they are in the system classpath as well, the system class loader may take precedence in some circumstances, possibly interfering with JSP automatic-reloading functionality.
    Also just check that you have the latest version of ojsp.jar (Oracle JSP Container implementation)
    Regards,
    Abhinav

  • Automate the build process

    Hi
    I am using jdeveloper 11g for developing oracle fusion application, I am trying to write an Ant script, which compile application, create domain, configure domain, boot
    server and deploy oracle application. Please advice how to do this.
    Thanks
    Anbu

              I found that it needed access to the .tld, web.xml, and weblogic.xml files before
              it found the tags (with the taglib jar already in the classpath).
              But I am using the -webapp version...
              Ken Young <[email protected]> wrote:
              >I am trying to get JSPC to compile using Jakarta ANT (1.4.1) to automate
              >
              >the process. I am getting the following error:
              >
              >Buildfile: build.xml
              >
              >jspc:
              > [java] nested IOException: java.io.IOException: cannot resolve
              >
              >'res' into a valid tag library
              > [java] Java Result: 1
              >
              >Below is my build script:
              >
              ><target name="jspc" >
              ><java classname="weblogic.jspc" fork="yes" >
              ><arg value="../jsp/index.jsp" />
              >     <arg value="../jsp/index.jsp" />
              > <classpath>
              ><pathelement path="${classpath}" />
              > <pathelement path="${wlsfiles}" />
              > <pathelement path="${taglibs}" />
              >
              > </classpath>
              > </java>
              >
              >
              ></target>
              >
              >Anything glaring?
              >
              >Thanks
              >Ken
              >
              

  • Import CLASSPATH in JSP

    Hi all,
    I am following a guide to install an JSP application on Tomcat.
    The third point is:
    Confirm JAR Files are Included in CLASSPATH
    Please ensure that the .jar files in the WEB-INF/lib/ directory of your web
    application are included in the CLASSPATH for your application.But I don't know how to do it (I'm not an expert of JSP).
    Someone can help me to add the code line(s) in a such way that I can include the WEB-INF/lib/ in the CLASSPATH of my application.
    Thanks
    Enrico

    I've understood now. The google's code,
    <td>
             <iframe name="identity_provider" src="./ProcessResponseServlet"
              width="100%" height="100%" frameborder="1"></iframe>
    </td>is wrong. I've just replaced this with:
    <td>
              <iframe name="identity_provider" src="./identity_provider.jsp"
              width="100%" height="100%" frameborder="1"></iframe>
          </td>But now the problem is always the same because inside this file there is:
    <form name="ServiceProviderForm" action="./CreateRequestServlet" method="post">
      <input type="hidden" name="action" value="Generate SAML Request">
      <input type="hidden" name="returnPage" value="service_provider.jsp">
      <p><center><input type="submit" value="Generate SAML Request"></center></form>
    <%
          String error = (String) request.getAttribute("error");
           String authnRequest = (String) request.getAttribute("authnRequest");
          String redirectURL = (String) request.getAttribute("redirectURL");
          if (error != null) {
          %>
            <p><center><font color="red"><b><%= error %></b></font></center><p>
          <%
          } else {
            if (authnRequest != null && redirectURL != null) {          
          %>
            <p><div style="padding:6px 0px;border-top:solid 1px #3366cc;border-bottom:solid 1px #3366cc"><b>Step 3: Submitting the SAML Request</b></div></p>
            <p>You can now review the generated SAML request before submitting it to the identity provider.</p>
            <p>As noted in the <b>Pre-Transaction Details</b>, when you install this application, it will send SAML authentication requests to the <b>ProcessResponseServlet</b>, which is included in the sample code package.</p>
            <b>Generated SAML XML</b><p>
            <input type="hidden" name="redirectURL" value="<%=redirectURL%>"/>
            <div class="codediv"><%=RequestUtil.htmlEncode(authnRequest)%></div>
            <p><center>
            <input type="button" value="Submit AuthnRequest"
                   onclick="javascript:parent.frames['identity_provider'].location = '<%=redirectURL%>';return true;">
            </center>
         <%
         %>And there is the file "CreateRequestServlet.class" in the "WEB-INF/classes/servlets" and the web.xml maps also this file.
    But when i press the button "Generate SAML Request", I have the usual error:
    HTTP Status 404 - /CreateRequestServlet/CreateRequestServlet
    type Status report
    message /CreateRequestServlet/CreateRequestServlet
    description The requested resource (/CreateRequestServlet/CreateRequestServlet) is not available.
    Sun-Java-System/Web-Services-Pack-1.4Edited by: springbok06 on Jul 29, 2010 4:06 PM

  • CLASSPATH problem, deploying JSP app without right to modify classpath...

    I want to deploy a JSP web app to apache server with JRun for running JSP, but I don't have the permission to copy the required library files to the classpath, nor modify the classpath to append my application's path. Is there any way to workaround? Thank you

    Well, thanks for the tip. The answer is yes and no. Yes, the jar is in my classpath, but no the lib directory containing the jar is not included in the dist directory when I clean and build the project. This only happens when I include either the JavaHelp jars or just the jh.jar (which should be all I need) in the classpath. When I read the manifest file, it's clearly looking for /lib/jh.jar, but the directory does not get created on build (whereas, the lib directory is there if the JH jars are not included).
    Makes no sense to me. Any idea as to what's happening here? The help system works great in the IDE.
    Thanks for your help.

  • Classpath and JSP

    HI
    I had a question regarding connection of JPS with Oracle8i.
    I have created a jsp page (Firstpage.jsp) for connecting to the database, Oracle. (I have provided the code at the bottom).
    I am using Tomcat 3.3.
    Everytime I run this page , I get an error: Class OracleDriver not found. What should I do to connect to oracle?
    My questions are as follows:
    1) In order to connect to the database what should be the classpath set - (what i have rite now in my classpath is .;C:\Tomcat\lib\common\servlet.jar;C:\Tomcat\webapps\ROOT\WEB-INF\classes)
    2) Do i Have to make any changes in the server.xml file or tomcat-modules.jar file? If so wot changes do I have to make. Or is there any other file
    3) Like java where I add classes12.zip and nls_charset12.zip to the classpath while connecting tothe dbs , Do i have to do the same ? But where should the classes12.zip and nls_charset12.zip files be ? ie. should they be in C:\oracle\ora81\jdbc\lib or should they be copied to another folder ?
    <code>
    ---------Firstpage.jsp------------------------------------
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD><TITLE>Simple JSP/Oracle Query Example</TITLE></HEAD>
    <BODY BGCOLOR="#FFFFFF">
    <CENTER>
    <B>Employees</B>
    <BR><BR>
    <%
    Connection conn = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection(
    "jdbc:oracle:thin:@localhost:1521:Orahome","scott","tiger");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM scott.emp");
    //Print start of table and column headers
    out.println("<TABLE CELLSPACING=\"0\" CELLPADDING=\"3\" BORDER=\"1\">");
    out.println("<TR><TH>ID</TH><TH>Name</TH><TH>SURNAME</TH>");
    out.println("<TH>SALARY</TH><TH>STARTDATE</TH></TR>");
    //Loop through results of query.
    while(rs.next())
    out.println("<TR>");
    out.println(" <TD>" + rs.getString("EMPNO") + "</TD>");
    out.println(" <TD>" + rs.getString("ENAME") + "</TD>");
    out.println(" <TD>" + rs.getInt("SAL") + "</TD>");
    out.println(" <TD>" + rs.getString("HIREDATE") + "</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    catch(SQLException e)
    out.println("SQLException: " + e.getMessage() + "<BR>");
    while((e = e.getNextException()) != null)
    out.println(e.getMessage() + "<BR>");
    catch(ClassNotFoundException e)
    out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
    finally
    //Clean up resources, close the connection.
    if(conn != null)
    try
    conn.close();
    catch (Exception ignored) {}
    %>
    </center>
    </body>
    </html>
    </code>
    I hope somebody answers my queries, coz im having sleepless nights
    thanks
    tej_jay

    One way is to copy classes12.zip into:
    <JAVA_HOME>jre\lib\ext
    and setting the classspath to point to it.
    Another way is to set the classpath to the Oracle's
    directory where you have the driver:
    oracle\ora81\jdbc\lib
    No No NO!
    Tomcat does not look at your classpath. It completely ignores it.
    As far as Tomcat is concerned its class path is
    web-inf/classes (with .class files in it)
    web-inf/lib (with .jar files in it - note it will not read .zip files)
    Tomcat lib directories.
    For Tomcat 3.3, go here to read all about it.
    http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-ug.html#configuring_classes

Maybe you are looking for