Hello and welcome to our community! Is this your first visit?
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
    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.


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

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


    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?


  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 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'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


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