You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/11/26 21:39:12 UTC
DO NOT REPLY [Bug 14869] New: -
jspc task does not generate correct code
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14869>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14869
jspc task does not generate correct code
Summary: jspc task does not generate correct code
Product: Ant
Version: 1.5.1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Core tasks
AssignedTo: ant-dev@jakarta.apache.org
ReportedBy: mgainty@hotmail.com
Given the original jsp code:
<%@ page contentType="text/html;charset=windows-1252" errorPage="error.jsp"
import="com.ingenix.efact.model.common.*"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%
SessionInfo sess = (SessionInfo) session.getAttribute(Constants.SESSION_KEY);
FullReportInfo fullInfo = (FullReportInfo) request.getAttribute("fullInfo");
%>
<html>
<head>
<link rel=StyleSheet href="./scripts/style.css" type="text/css" media="screen,
print, projection">
<script language"JavaScript">
<!--
var helpName = "";
var helpID = "";
//-->
</script>
</head>
<body leftmargin=15 topmargin=15 marginwidth=15 marginheight=15
onLoad="javascript:{if(parent.frames[0]&&parent.frames['nav_bar'].Go)
parent.frames['nav_bar'].Go()}" bgcolor="#FFFFFF">
<table width="550" border="0" cellspacing="0">
<tr>
<td class="pagetitle">Generate Report Confirmation</td>
</tr>
<tr>
<td height="2" background="./images/4x2dot.gif">
</td>
</tr>
<tr>
<td align="center" class="smallbold"><br><br>
<%= (fullInfo != null) ? "Your last report was generated on: " +
fullInfo.getCreatedDate() : "Your hospital administrator has not generated the
hospital report." %>
</td>
</tr>
<tr>
<td align=center><br>
<a href="fullReport.do?action=getPDF" target="new"><img
src="./images/button_view_current_report.gif" border=0></a>
</td>
</tr>
<tr>
<td align=center>
<a href="fullReport.do?action=new"><img
src="./images/button_generate_new_report.gif" border=0></a>
</td>
</tr>
</table>
</body>
</html>
The resulting java file produced is:
package jsp.admin;
import com.ingenix.efact.model.common.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class generateReportConf extends HttpJspBase {
static {
}
public generateReportConf( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse
response)
throws java.io.IOException, ServletException
{
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try
{
if (_jspx_inited == false)
{
synchronized (this)
{
if (_jspx_inited == false)
{
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=windows-1252");
pageContext = _jspxFactory.getPageContext(this, request, response,
"error.jsp", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/admin/generateReportConf.jsp";from=(0,119);to=
(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/admin/generateReportConf.jsp";from=(1,58);to=
(2,0)]
out.write("\r\n");
// end
// begin [file="/admin/generateReportConf.jsp";from=(2,2);to=(5,0)]
SessionInfo sess = (SessionInfo) session.getAttribute
(Constants.SESSION_KEY);
com.ingenix.efact.util.SystemLog.write
(com.ingenix.efact.util.SystemLog.STATUS, "header for the generateReportConf ");
// end
// HTML // begin [file="/admin/generateReportConf.jsp";from=(5,2);to=
(6,0)]
out.write("\r\n");
// end
// begin [file="/admin/generateReportConf.jsp";from=(6,0);to=(6,98)]
/* ---- bean:define ---- */
org.apache.struts.taglib.bean.DefineTag _jspx_th_bean_define_0 = new
org.apache.struts.taglib.bean.DefineTag();
_jspx_th_bean_define_0.setPageContext(pageContext);
_jspx_th_bean_define_0.setParent(null);
_jspx_th_bean_define_0.setId("fullInfo");
_jspx_th_bean_define_0.setName("fullInfo");
_jspx_th_bean_define_0.setType
("com.ingenix.efact.model.common.FullReportInfo");
com.ingenix.efact.model.common.FullReportInfo fullInfo = null;
try
{
int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag();
fullInfo = (com.ingenix.efact.model.common.FullReportInfo)
pageContext.findAttribute("fullInfo");
fullInfo = (com.ingenix.efact.model.common.FullReportInfo)
pageContext.findAttribute("fullInfo");
// end
// begin [file="/admin/generateReportConf.jsp";from=(6,0);to=(6,98)]
fullInfo = (com.ingenix.efact.model.common.FullReportInfo)
pageContext.findAttribute("fullInfo");
if (_jspx_th_bean_define_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
}
finally
{
_jspx_th_bean_define_0.release();
}
// end
// HTML // begin [file="/admin/generateReportConf.jsp";from=(6,98);to=
(15,0)]
out.write("\r\n<html>\r\n<head>\r\n<link rel=StyleSheet
href=\"../scripts/style.css\" type=\"text/css\" media=\"screen, print,
projection\">\r\n<title>Generate Report Confirm Page</title>\r\n<meta http-
equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1
\">\r\n</head>\r\n\r\n<body leftmargin=15 topmargin=15 marginwidth=15
marginheight=15 onLoad=\"javascript:{if(parent.frames[0]&&parent.frames
['nav_bar'].Go)parent.frames['nav_bar'].Go()}\" bgcolor=\"#FFFFFF\">\r\n");
// end
// begin [file="/admin/generateReportConf.jsp";from=(15,2);to=(15,6)]
try
{
// end
// HTML // begin [file="/admin/generateReportConf.jsp";from=(15,8);to=
(40,0)]
out.write("\r\n<table width=\"550\" border=\"0\" cellspacing=\"0
\">\r\n <tr>\r\n <td class=\"pagetitle\">Generate Report
Confirmation</td>\r\n </tr>\r\n <tr>\r\n <td height=\"2\"
background=\"../images/4x2dot.gif\">\r\n </td>\r\n </tr>\r\n <tr>\r\n
<td align=\"center\" class=\"smallbold\"><br><br> Your last report was
generated on: \r\n \r\n </td>\r\n </tr>\r\n <tr>\r\n <td
align=center><br>\r\n <a href=\"fullReport.do?action=old\"><img
src=\"../images/button_view_current_report.gif\"></a>\r\n </td>\r\n
</tr>\r\n <tr>\r\n <td align=center>\r\n <a href=\"fullReport.do?
action=new\"><img src=\"../images/button_generate_new_report.gif\"></a>\r\n
</td>\r\n </tr>\r\n</table>\r\n");
// end
// begin [file="/admin/generateReportConf.jsp";from=(40,2);to=(42,1)]
catch(Exception e){
com.ingenix.efact.util.SystemLog.write
(com.ingenix.efact.util.SystemLog.STATUS, "exception for the
generateReportConf " + e);
}
// end
// HTML // begin [file="/admin/generateReportConf.jsp";from=(42,3);to=
(45,0)]
out.write("\r\n</body>\r\n</html>\r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
Which will not compile since the
1)try doesnt have proper Starting and ENDING brace
2)catch doesnt have proper Starting and ENDING brace
3)finally doesnt have propert Starting and ENDING brace
I need this to work properly and request the source code so I may fix it ASAP
for my own build process.
Thank You,
-Martin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>