Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Opening jsp using Tomcat Server. Help needed!!

  • 31-03-2011 2:39pm
    #1
    Closed Accounts Posts: 314 ✭✭


    Running Tomcat. I'm on Windows 7.

    In my directory C:\apache-tomcat-6.0.32\webapps\myapps\new1

    My new1 jsp file won't open nor will any! Keeps opening explorer and asking me to Open Save Cancel it as if I was downloading something.

    Help pleeease


    jsp.jpg


    This is the jsp code. just some random .jsp code off the net

    <HTML>
    <HEAD>
    <TITLE>Upload Form</TITLE></HEAD>
    <BODY>
    <H3>File Uploading Example</H3>
    <FORM METHOD="POST" ENCTYPE="multipart/form-data">
    <P> Optional Text <BR>
    <TEXTAREA NAME="optionalText" ROWS="5" COLS="30">
    </TEXTAREA>
    <P> Text group <BR>
    <INPUT TYPE="TEXT" NAME="textGroup" SIZE="20"> <BR>
    <INPUT TYPE="TEXT" NAME="textGroup" SIZE="20"> <BR>
    <INPUT TYPE="TEXT" NAME="textGroup" SIZE="20"> <BR>
    <P> Optional file <BR>
    <INPUT TYPE="FILE" NAME="optionalFile">
    <P> File list <BR>
    <INPUT TYPE="FILE" NAME="fileList"> <BR>
    <INPUT TYPE="FILE" NAME="fileList"> <BR>
    <INPUT TYPE="FILE" NAME="fileList"> <BR>
    <P>
    <INPUT TYPE="SUBMIT" VALUE="Submit">
    <INPUT TYPE="RESET" VALUE="Reset">
    </FORM>
    </BODY>
    </HTML>


Comments

  • Registered Users, Registered Users 2 Posts: 2,013 ✭✭✭lynchie


    Why are you trying to open the jsp file directly using explorer? Windows is telling you it doesnt know what application to open the jsp file with.

    Open the page in your web browser using the correct URL


  • Registered Users, Registered Users 2 Posts: 33 frezzabelle


    try this when running the server
    localhost:8080/"whereever you jsp page is"
    make sure your environment variables are set also, JAVA_HOME and CATALINA_HOME
    Hope this helps.


  • Closed Accounts Posts: 314 ✭✭Joebits


    Ok I got it working but now,

    file:///C:/apache-tomcat-6.0.32/webapps/myapps/date.jsp

    It opens it but all that is displayed is the java code.

    :( ?

    This is what is getting displayed instead of the actual date itself..

    <%-- use the 'taglib' directive to make the JSTL 1.0 core tags available; use the uri
    "http://java.sun.com/jsp/jstl/core&quot; for JSTL 1.1 --%>
    <%@ taglib uri="http://java.sun.com/jstl/core&quot; prefix="c" %>

    <%-- use the 'jsp:useBean' standard action to create the Date object; the object is set
    as an attribute in page scope
    --%>
    <jsp:useBean id="date" class="java.util.Date" />

    <html>
    <head><title>First JSP</title></head>
    <body>
    <h2>Here is today's date</h2>

    <c:out value="${date}" />

    </body>
    </html>


  • Registered Users, Registered Users 2 Posts: 1,110 ✭✭✭Skrynesaver


    Is Tomcat running, (http://localhost:8080) ?

    If it is try http://localhost:8080/myapps/date.jsp

    Tomcat uses HTTP to serve the computed result.


  • Closed Accounts Posts: 314 ✭✭Joebits


    Is Tomcat running, (http://localhost:8080) ?

    If it is try http://localhost:8080/myapps/date.jsp

    Tomcat uses HTTP to serve the computed result.

    After trying http://localhost:8080/myapps/date.jsp

    I get problem(Not even getting just source code now):

    HTTP Status 404 - /myapps/date.jsp

    type Status report

    message /myapps/date.jsp

    description The requested resource (/myapps/date.jsp) is not available.

    Apache Tomcat/6.0.32


    This is my Tomcat Running. Is it ok?
    tomcatProb-1.jpg


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 33 frezzabelle


    How about putting the jsp into the ROOT folder then http://localhost:8080/date.jsp be sure tomcat home page is displayed on http://localhost:8080


  • Closed Accounts Posts: 314 ✭✭Joebits


    How about putting the jsp into the ROOT folder then http://localhost:8080/date.jsp be sure tomcat home page is displayed on http://localhost:8080

    still not working :(
    HTTP Status 404 - /date.jsp
    type Status report
    message /date.jsp
    description The requested resource (/date.jsp) is not available.
    Apache Tomcat/6.0.32



    Grrrrr!!
    tomcatProb-1-1.jpg


Advertisement