Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-23-2013, 10:17 AM #1
- 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?
10-23-2013, 02:50 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,668 Times in 2,637 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');