JSP mapping with Tomcat 5.0.27

With Jakarta-Tomcat 5.0.27 is it possible to put a JSP file in a sub-directory of a web application and be able to "servlet-mapping" it to only create one object? If so how do you write the web.xml entry? I only want to create one InitTest object, not two of them!
If I place InitTest.jsp in the following directory structure:
C:\tomcat\webapps\web-app\subDirectory\InitTest.jsp
This web.xml entry does not work:
     <servlet>
          <servlet-name>InitTest</servlet-name>
          <jsp-file>/subDir/InitTest.jsp</jsp-file>
     </servlet>
     <servlet-mapping>
          <servlet-name>InitTest</servlet-name>
          <url-pattern>/InitTest.jsp</url-pattern>
     </servlet-mapping>When I use this link:
http://localhost:8080/web-app/subDir/InitTest.jsp
I get "jsp" as the servlet name
and
When I use this link:
http://localhost:8080/web-app/servlet/InitTest
I get "InitTest" as the servlet name
How do I map InitTest.jsp correctly when it's placed in a sub-directory of the web application's directory?

dear friend...y do you want to map your jsp page?? you can directly access your jsp from your location. You dont needd to map in the web.xml. You need to map only servlets not jsps
regards
shanu

Similar Messages

  • JSP: work with TomCat 5.5.9 and NOT work with TomCat 6.0.16

    Hi all,
    I'm Antony and I have a problem with a .JSP page of my server.
    In my server there are 2 users: "u1" and "u2"; there are 2 TomCat, version 5.5.9 and version 6.0.16. There is Apache WebServer version 2. The 2 TomCat servers have the same configuration files: server.xml and web.xml (in the dir /conf of the main server's root). They not work simultaneously.
    When the user "root" launch the TomCat 5.5.9 all work fine: the server will show correctly the JSP pages of "u1" and the pages of "u2".
    When the user "root" launch the TomCat 6.0.16 the JSP pages of "u1" work fine but the JSP pages of "u2" not work: it seems that there are problems with the path where the server want to search the pages of u2.
    In the server.xml there is this code (for the handle of u2's site):
    <Host name="u2site.com" appBase="/home/u2/public_html/">
      <Alias>www.u2site.com</Alias>
      <Context path="" reloadable="false" docBase="/home/u2/public_html/" debug="0"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>and this code (for the u1's site)
    <Host name="u1site.com" appBase="/home/u1/public_html/">
      <Context path="" reloadable="false" docBase="/home/u1/public_html" debug="1"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>The problems with the JSP pages of u2 are one of the following:
    org.apache.jasper.JasperException: /login2.jsp(4,0) The value for the useBean class attribute com.u2.beans.access.Autenticator is invalid.and this one that appear with the pages that have the inclusion of another JSP page
    /u2page.jsp(3,0) File "/../support/_formatting.jsp" not foundI think that the TomCat know how to find the page that the browser request to Apache WebServer (and that the webserver request to Tomcat by the connector) 'cause for pages that haven't inclusion or call to method in packages all work fine...but the TomCat have problems to locate the pages included or the method located in a JAR (the jars are located in WEB-INF/lib/ of the u2's site).
    How I can resolve this problem with TomCat 6.0.16? I repeat that with TomCat 5.5.9 all work fine...same configuration!
    Any ideas?
    Thank you very much,
    Antony.

    Hi stevejluke, 'cause in the page "/supporto/_formatting.jsp" there are only the definition of some variables it's normal that the output at the browser it's a blank page.
    The problem it's that Tomcat 6.0.16 cannot know how "navigate" the pages beginning from one...it know where is the "x.jsp" page requested directly by Apache WebServer, where is "y.jsp" request directly by Apache, where is "z.jsp" requested directly by Apache but if "x.jsp" request, includes, "y.jsp" Tomcat cannot know where "y.jsp" is located. There is some file where I can "say" this to Tomcat?
    The page "/mostre/elenco_mostre.jsp" includes directly the "/supporto/_formatting.jsp".
    Another thing: in /mostre/elenco_mostre.jsp there is an inclusion directive for /supporto/_formatting.jsp that is so:
    <%@ include file="../supporto/_formatting.jsp"%>you can see that the included file is "../supporto/_formatting.jsp" and NOT "/../supporto/_formatting.jsp"...the "/" at the begin of the path is included by Tomcat!
    In the catalina.out there are this lines, when the page is called:
    Jul 6, 2008 3:15:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /elenco_mostre.jsp(3,0) File "/../supporto/_formatting.jsp" not found
      In catalina.out before server start there are this lines:
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 358 ms
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
    Jul 6, 2008 1:43:52 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/23  config=null
    Jul 6, 2008 1:43:52 AM org.apache.catalina.connector.MapperListener registerEngine
    WARNING: Unknown default host: localhost
    Jul 6, 2008 1:43:52 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2512 msThe file "web.xml" is located in "$Tomcat_home/conf" and it's:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>fork</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>xpoweredBy</param-name>
          <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>30</session-timeout>
      </session-config>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>there are not web.xml file in /WEB-INF/ of the web application.
    Maybe the problem it's that Tomcat want the conf file in "Server/Service/Engine/Host/Context" ? I must move the block HOST of the server.xml file in this path?
    Good Sunday and thank you!
    Antony.

  • JSP mapping in Tomcat

    I've a directory structure in Tomcat that looks like :
    TOMCAT_HOME\webapps\Security\jsp\
    Guys I need help on JSP mapping.
    I'm running Tomcat and I want all the /Security/*.jsp requests in Browser goto above context.
    i.e. http://localhost/Security/AJSP1.jsp
    should go an invoke TOMCAT_HOME\webapps\Security\jsp\AJSP1.jsp
    I donot want to manually map each JSP file in web.xml .
    I just want any browser request with URL
    http://localhost/Security/*.jsp
    goto TOMCAT_HOME\webapps\Security\jsp\
    Is there a way around.
    Thanks in advance.
    sam

    Put it in the conf/server.xml file. Check Tomcaat documentation for proper location. Here is a small ex.
    <Context path="/Security" docBase="<physical location>" debug="0" reloadable="true" crossContext="true" />

  • Compiling jsp with tomcat 4

    HTTP 500 server error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 2 in the jsp file: /listStore.jsp
    *line#2 is the usebean statement in the jsp...
    NOTE: new machine, new configuration... this same servelt/jsp/bean work great on another machine with tomcat 3...
    so this will have something to do with tomcat configuation... believe that the configuration is set to not compile with deprecation.. would like to know where to change that...

    I guess the problem comes from jdk 1.4 ...deprecation of sun.tools.javac.Main prevents compilation in jasper...

  • Problems with Tomcat 4.0 and jdk 1.3.1 (jsp:include) Help Gurus...

    Im running examples of the include:
    <jsp:include page="xxx.jsp" flush="true">
    and received error:
    org.apache.jasper.JasperException: No se puede compilar la clase para JSP
    An error occurred at line: 17 in the jsp file: /jsp/include/include.jsp
    Generated servlet error:
    /Programas/Tomcat4/work/localhost/examples/jsp/include/include$jsp.java:79: Method include(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, javax.servlet.jsp.JspWriter, boolean) not found in class org.apache.jasper.runtime.JspRuntimeLibrary.
    JspRuntimeLibrary.include(request, response, "/jsp/include/foo.html" + jspxqStr, out, true);
    ^
    Please Help me Im running this equal with:
    <%@ include file="xxx.jsp" %>
    and runnig fine....

    The two means of including files are different in their approach.
    Using <jsp:include .../> compilation of the included jsp is done at run -time not during compilation.
    Using <%@ include .../> compiles at compile time.
    Looking at the error it seems that the method JspRuntimeLibrary.include is not being found which suggests that you may have a classpath problem. Check that there is not a servlet.jar in the classpath that is from a earlier spec than the one provided with Tomcat.
    Dave

  • Problems running jsp files with tags on tomcat 4.0

    hi,
    i had some jsp1.1 stuff running on tomcat3.3.
    last week i moved to tomcat 4.0 , changed the tags to fit jsp1.2 and... everything is wrong now. while trying to run jsp with tags i get an error message (same for all files):
    ---->
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: (class: org/apache/jsp/djsp$jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse; )V) Incompatible object argument for function call
    <-------
    the jsp files with no tags and servlets are running ok.
    I NEED YOUR HELP!!!

    cyclid,
    i have the same environment setup and the same troubles. after searching the forums, it seems that there are others with the same, if not similar issues, yet no solutions. if you find the solution to this one, could you please post it. i would really appreciate it since i have been on this one for several days with no success. i even tried the helloworld jsp/custom tag examples from a jsp profession book that i have and that won't work.
    Anyone out there,
    if you have any idea why this problem exists, any solutions, ideas would be appreciated.
    thank you,
    navesink

  • Strange thing with tomcat+jsp+javabean

    I use javabean in jsp with tomcat container.if I put the javabean file in a package,then it works well.But if I don't, I means,there are no package clause in my javabean file.then it complaint that org.apache.jsp. error:class not found.
    It is very strange.Of course place the class file I put is right.Do anyone encounter the same problem.I use tomcat4.0.4

    Did you import the classfile? Even if it is not there in a package, you need to import it.
    For example, if you have a Test.java (Test.class) in your web-inf\\classes with out any package statement, then you need to code this in your jsp,
    <%@ page import="Test" %> (I don't exactly remember whether you need to import 'Test' or 'Test.class'). Just give a try.
    Sudha

  • Servlet/JSP with Tomcat

    Where is the best place on the Web to learn Servlet/JSP with Tomcat for beginners?

    i also just started learning servlets a few days ago.
    here are some of the websites i've found
    there are some tutorials as well as general tips and stuff.
    http://java.sun.com/docs/books/tutorial/servlets/index.html
    http://www.javaworld.com/javaworld/javatips/jw-javatip94.html
    http://www.cetus-links.org/oo_javaserver_pages.html
    http://www-105.ibm.com/developerworks/education.nsf/dw/java-onlinecourse-bynewest?OpenDocument&Count=500&loc=j
    http://www.fawcette.com/javapro/2002_03/online/online_eprods/servlets_03_08/
    http://developer.java.sun.com/developer/onlineTraining/Servlets/Fundamentals/index.html
    http://developer.java.sun.com/developer/onlineTraining/JSPIntro/
    http://www.novocode.com/doc/servlet-essentials/
    http://hotwired.lycos.com/webmonkey/99/07/index3a.html?tw=programming
    http://www.jguru.com/faq/Servlets
    http://www.jguru.com/faq/JSP
    i haven't looked into all of these yet, but i'm sure they will help you.

  • PLEASE HELP Can't run my servlet url-pattern with Tomcat

    Hi I'm trying to run servlet with Tomcat.
    I have don the servlet with tomcat ide abd its runnig ok with Forte with the internal Tomcat
    When I'm runing it with external Tomacat its not running at the url that I have given in the web.xml
    web.xml file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>ClaimsServlet</servlet-name>
    <servlet-class>ild.claims.ClaimsServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>ild.claims.LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ClaimsServlet</servlet-name>
    <url-pattern>/ild/claims/claims</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/ild/claims/LoginServlet</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    90
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
    default.jsp
    </welcome-file>
    <welcome-file>
    index.html
    </welcome-file>
    <welcome-file>
    index.htm
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if I runnig the url: /ild/servlet/ild/claims/ClaimsServlet
    its running
    but //ild/claims/claims
    I got: The requested resource (/claims/claims) is not available.
    Thanks for help
    Snir

    Do you have to use <url-pattern>/ild/claims/claims</url-pattern>
    or you can use <url-pattern>/claims</url-pattern> ?

  • Getting error when placing jsp file in tomcat root folder

    hello experts,
    i have developed an application on netbeans 6.1 for mail.
    It is working perfect when i run it from netbeans, but when we copy those jsp files to ROOT folder of tomcat5.5 server, it is showing me following error.
    rg.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 14 in the jsp file: /Mailer1.jsp
    Session cannot be resolved to a type
    11: <%!
    12: String nam = null, email = null, suggestion = null;
    13: RequestDispatcher disp = null;
    14: public static Session sess = null;
    15:
    16: %>
    17: <%
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    Session cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    javax.mail.Authenticator cannot be resolved to a type
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 45 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    42: return new PasswordAuthentication("[email protected]","ratatouille");
    43: }
    44: });
    45: sess.setDebug(true);
    46:
    47:
    48: //sess = Session.getDefaultInstance(props);
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    Transport cannot be resolved to a type
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    Message cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    MimeMessage cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    Message.RecipientType.TO cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 53 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    56: trans.connect();
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    i m unable to find out the solution,
    please help me to resolve it.
    thnaks.

    Hi shams.hq,
    I don't understand how you bother to copy an application in your server directories. It's really piece of cake to deploy with Tomcat.
    All you have to do :
    - with Netbeans, you build the project : a WAR file will be created in the dist directory of your project;
    - launch the server, if it's not running;
    - with your web browser, connect to the Tomcat Manager;
    - from there, you may upload and deploy the WAR file of your project.
    Et voilà ! Tomcat will unzip the WAR and install your classes and libraries at the right place.

  • Why not perform the ${attribute} syntax in the jsp context with weblogic?

    In the action an attribute has been put in request object, example request.setAttribute("userName","Xue Chen").
    in the forward jsp , use the syntax ${userName}, can not get the attribute "Xue Chen" from request, but the "${userName}" be printed in the page.
    The same code with Tomcat, it work well.
    It maybe the syntax ${userName} in jsp is not standard for all application server, only work in Tomcat, or it need special confiugre in weblogic, this syntax can work.
    Does anyone do me a favors?

    Hi,
    go to the context of your view,
    to the attribute of your date,
    and set the attribute input help mode to disabled
    grtz,
    Koen

  • How to Configure Apache Web Server  with Tomcat web container in Linux

    Hi all,
    I am working on Tomcat web server 5.0.19 on Linux AS 3.0., ( my Control Server)
    I need map my tomcat to Apache Web Server (httpd) in another system
    (web server).
    I dont have jk2_ or jk_mod .so files to use in my tomcat/conf directory to make them available for httpd.conf files of Apache Web server.
    I have only jk2.properties file in my conf.,
    Please tell me how to go about it
    my mail id [email protected]
    Thank You
    Subramanyam.V
    Hyderabad
    India

    The simple answer is to download a web server that has a web container already integrated on it, so all that painful configuration work is avoided.
    You can use the mature SJS Web Server 6.1 SP5 at
    http://www.sun.com/webserver
    Or you can try a preview of the upcoming version at
    http://www.sun.com/download/products.xml?id=446518d5
    You will get better performance and security, with easy of use, at about the same price ;)

  • Problem with Tomcat 5.0

    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. This .java file has a "public static void main" method that calls al the other methods in the class.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?
    Thanks!!

    NerdVix wrote:
    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. Wrong. .java files do you no good in that directory. Only .class files belong there.
    This .java file has a "public static void main" method that calls al the other methods in the class.Fine - for testing on a command line.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?What part don't you understand? Writing JSPs? Calling methods? What is a person so ignorant doing with Tomcat anyway?
    It's possible to call main, but not a good idea.
    %

  • Need help with tomcat 5.5 and using java classes

    hey there,
    i am trying to set up tomcat 5.5 on my computer at home and have sucessfully done so. i have been trying to use Java classes inside my JSP files however tomcat thows an internal servlet error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    Product cannot be resolved to a type
    i have the classes located as the setup tutorial recommends (root/WEB-INF/classes/) and still nothing works. i would appreciate any help anyone can give.
    thanks,

    Which tutorial are you following?
    As of java1.4, all classes must be in packages for them to work in Tomcat. This means your beans and servlets too.
    Put your beans in a package, and then recompile them, and put them in the right place.
    eg
    package com.mypackage
    public class MyClass ...
    once compiled would go into WEB-INF/classes/com/mypackage/MyClass.class
    Are you using Product and ProductList classes in scriptlet code?
    Have you imported them with a page directive
    <%@ page import="com.mypackage.Product, com.mypackage.ProductList" %> ?

  • How to deploy JSP's on tomcat 4.1

    i have XP machine.
    war command is not working on my machine,any thing i have to do to make it work?.
    jdk is working fine,and ANT is also working.
    but whan i run the command "ant install" i am getting error at build.xml 364 which is
    war="file://${build.home}"/>
    which is again a problem with war.
    is there any way to deploy JSP( just jsp for now) in tomcat
    thanks
    Narendra.

    thanks for the reply.
    i found out how to make .war files and i can able to deploy and run JSP files.
    with the help of this command
    jar cvf myApp.war Date.jsp
    do i have to specify the files name at the end of command ?. is there a way to make .WAR file with all subfolders and files?

Maybe you are looking for

  • Connecting a playstation 3 to airport extreme

    I'm new to the whole wireless thing so please bear with me. I have a number of questions: Firstly, the only reason why I did go wireless was for my playstation 3 and now I am having problems connecting it the airport extreme. Everytime I go on automa

  • How do I purchase reader extensions to save a PDF form that has been filled out in Acrobat Reader?

    I have just discovered that in order to save a PDF form that has been electronically filled out in Acrobat Reader, that I have to purchase reader extensions to make this possible.  I would like to speak to someone about the price and how to purchase.

  • SAP HR DATA Retrieval into LDAP

    Hi , Does anyone have an idea for extracting SAP HR Employee data into LDAP (Directory based service). Rohit

  • Background Audio Clips

    Are there any resources where one can download free (if such a thing exists) audio loops that can be used in Captivate to hold the user's attention? I have used portions of songs for some slides, but would prefer to use a loop or several loops. Befor

  • Safari 5 crashes with Yahoo Mail attachments

    I just updated to Safari 5 and it crashes when I try to send a Yahoo email with attachment. My two other email accounts accept attachments with Safari but when I try to attach them in Yahoo, Safari freezes. Force Quit does not show that Safari is not