Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

weblogic output stream HELP!!!!

 
david chiu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does the following code work on Tomcat but gives me a 500 error on weblogic?
----------------------------
<%@ page import="java.io.*,com.games.*"%>
<%
//returns the replay info
String gameid = request.getParameter("gameid");
String playernum = request.getParameter("playernum");
ReplayInfo ri = new ReplayInfo();
byte[] replayBytes = ri.getReplayInfo(gameid,playernum);
if (replayBytes == null)
{
replayBytes = new byte[1];
replayBytes[0] = (byte)0;
}
response.setContentLength(replayBytes.length);
response.setContentType("image/gif");
OutputStream outputs = response.getOutputStream();
outputs.write(replayBytes);
outputs.flush();
outputs.close();
%>
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problably because this package: com.games and it�s classes were created by you and you�re not deploying your web application in a war file, so you have to set the classpath to point to the package com.games
regds.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic