Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trying to push a .JSP file to heroku

    I am quite new to pushing files to heroku,

    I followed this simple tutorial to upload some static html pages to heroku. And it works fine, but I want to add some Java to the pages I'm pushing.

    http://www.lemiffe.com/how-to-deploy...-the-easy-way/

    So instead of .html pages, I'm pushing .jsp pages.

    The html in these pages works perfectly but the java doesnt work at all.

    So,

    The time is now <%= new java.util.Date() %>

    shows up in the browser as a string. The java doesnt run.

    Could anyone explain why this is the case?

    Thanks.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,978
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Are you sure you have JSP enabled on the servers? That behaviour is consistent of a server not configured to handle the code (php, perl, asp, jsp, etc all do this exact same thing if there is no parser for it).
    Although it really shouldn't *show* in the browser, since <%=...%> I would think would be interpreted as an element in HTML. It would show in the source for sure. Perhaps HTML doesn't like the <%, so it could simply be ignoring that its a potential element.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •