facebook

JSTL on Tomcat

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #216038 Reply

    ktz
    Member

    When running a simple jstl test.jsp under Tomcat 5.0.25, I get the following Exception:

    Can’t find bundle for base name com.sun.tools.javac.v8.resources.javac, locale en_US
    com.sun.tools.javac.v8.resources.javac_en_US
    [ERROR] Compiler – -Error compiling file: /U:/Java/Tomcat 5.0.25/work/Catalina/localhost/_//org/apache/jsp\tes
    t_jsp.java [javac] Compiling 1 source file

    I did copy the .tld files to WEB_INF and the stld and standard.jar files to WEB_INF/lib.

    Could someone please assist?

    #216046 Reply

    Scott Anderson
    Participant

    Looks like the Java compiler can’t be found by Tomcat. Can you please verify that you’ve specified the root level of a full JDK installation for use by the Tomcat connector? Also, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #216051 Reply

    ktz
    Member

    – System Setup ——————————-
    Operating System and version: XP Professional
    Eclipse version: 3.0.1
    Eclipse build id:
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
    MyEclipse version: 3.8.1
    Eclipse JDK version: 1.3.1
    Application Server JDK version: 1.3.1
    Are there any exceptions in the Eclipse log file?

    I believe this is something on Tomcat. I stopped MyEclipse and created this standalone test.jsp under Tomcat’s ROOT directory. The message I get here is the same as the message when I deploy my application from Myeclipse to Tomcat. This is what test.jsp looks like:

    <%@ taglib uri=”http://java.sun.com/jstl/core&#8221; prefix=”c” %>
    <html>
    <head>
    <title>If with Body</title>
    </head>

    <body>
    <c:if test=”${pageContext.request.method==’POST’}”>
    <c:if test=”${param.guess==’Java’}”>You guessed it!
    <br />

    <br />

    <br />
    </c:if>

    <c:if test=”${param.guess!=’Java’}”>You are wrong
    <br />

    <br />

    <br />
    </c:if>
    </c:if>

    <form method=”post”>Guess what computer language
    I am thinking of?
    <input type=”text” name=”guess” />

    <input type=”submit” value=”Try!” />

    <br />
    </form>
    </body>
    </html>

    #216052 Reply

    Scott Anderson
    Participant

    Eclipse JDK version: 1.3.1
    Application Server JDK version: 1.3.1

    Eclipse 3.0 requires JDK 1.4.1 or later. Without a valid configuration, any number of errors could occur. Could you please install JDK 1.4.2 as both the Eclipse JDK and the one used by the connector and retest?

    #216180 Reply

    ktz
    Member

    Ok, it seems like I am getting closer.

    Could you tell me where I can set the cross context access. See exception below.

    javax.servlet.ServletException: Unable to get RequestDispatcher for Context: “/extemplates/” and URL: “/includes/doingheader.htm”. Verify values and/or enable cross context access.

    #216262 Reply

    ktz
    Member

    Say Scott

    For a project to reference other projects in the workspace at deploy time you need to tell your project to include the other project.

    In WSAD this is done under properties==>Project References.

    The question is, where do I achieve the same in MyEclipse.

    #216587 Reply

    ktz
    Member

    For those that may benefit.

    I got it to work, and it was a Tomcat issue. The answer is to set the crossContext to true. This can be done by setting the context in the server.xml file. Make sure that you set a context for both applications and not only the one.

    <Context crossContext=”true” docBase=”C:/Java/Tomcat 5.0.25/webapps/webapp1″ path=”/webapp1″ >
    </Context>
    <Context crossContext=”true” docBase=”C:/Java/Tomcat 5.0.25/webapps/webapp2″ path=”/webapp2″ >
    </Context>

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSTL on Tomcat

You must be logged in to post in the forum log in