Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Questions about JSP programming

Questions about JSP programming

2007-01-15       - By Rashmi Rubdi

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Zack,

I don't think it's the include directive alone causing a memory error. I'm
guessing that there might be a lot of processes in his application running on
Tomcat, eventually causing an out of memory error or may be the system does not
have minimum required memory to run Tomcat.

With Tomcat 5.5, and about 2GB RAM I'm not getting an OutOfMemory error while
running 3 applications simultaneously on Tomcat, when I tried his example of
include directives, I got the error on the screen and it was logged in Tomcat's
logs as well.

I ran my test as follows: http://practice:8080/p/test2/test2.jsp?f=page.html ,
and test2.jsp had <%@ include file="request.getParameter("f")" %> (which I
believe won't work)

Here's parts of the error, if it helps him:

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from
fulfilling this request.
exception
org.apache.jasper.JasperException Source code of org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext Source code of org.apache.jasper.JspCompilationContext(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper Source code of org.apache.jasper.servlet.JspServletWrapper(JspServletWrapper.java
:137)
org.apache.jasper.servlet.JspServletWrapper Source code of org.apache.jasper.servlet.JspServletWrapper(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:264)
javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:802)
root cause
java.lang.ClassNotFoundException Source code of java.lang.ClassNotFoundException: org.apache.jsp.p.test2.test2_jsp
java.net.URLClassLoader Source code of java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController Source code of java.security.AccessController(Native Method)
java.net.URLClassLoader Source code of java.net.URLClassLoader(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader Source code of org.apache.jasper.servlet.JasperLoader(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader Source code of org.apache.jasper.servlet.JasperLoader(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext Source code of org.apache.jasper.JspCompilationContext(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper Source code of org.apache.jasper.servlet.JspServletWrapper(JspServletWrapper.java
:137)
org.apache.jasper.servlet.JspServletWrapper Source code of org.apache.jasper.servlet.JspServletWrapper(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet Source code of org.apache.jasper.servlet.JspServlet(JspServlet.java:264)
javax.servlet.http.HttpServlet Source code of javax.servlet.http.HttpServlet(HttpServlet.java:802)


Also, if he sets up JSTL1.1 correctly, the following will also work:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:import url="${param.f}"/>

Where param.f , is the equivalent of request.getParameter("f")

-Rashmi


Rashmi,

I'm curious as to why his second approach causes the memory error that
he gets, would you have any insight as to why it's happening?  I've
checked out the docs and they don't indicate anything about the way the
include directive uses memory.  I'm thinking we might actually have a
bug to report.

Zack



__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
__ __
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.