File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Issues with welcome file list in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Issues with welcome file list in jsf" Watch "Issues with welcome file list in jsf" New topic
Author

Issues with welcome file list in jsf

babai biswas
Greenhorn

Joined: Feb 13, 2010
Posts: 6
Hi , I implemented a small jsf application however the issue i am facing is that all my xhtml webpages are inside a folder called vecmgui inside the webroot. following is my web.xml file. I have placed a index.jsp page as part of vecmgui folder which does a jsp forward to login.jsf page. IAD is the context root of the app. so when i hit http://<host>:<port>/IAD/vecmgui/login.jsf itworks fine . however the moment i hit http://<host>:<port>/IAD/vecmgui/

the application runs out of memory throwing the following error in console
<Feb 16, 2010 11:34:37 PM MST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@35ee49 - appName: 'IADServlet', name: 'IAD', context-path: '/IAD'] Root cause of ServletException.
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
Truncated. see log file for complete stacktrace


Following is my web.xml file . can anybody help on this? what i am doing wrong?

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>UtilsAndProperties</servlet-name>
<servlet-class>
com.qwest.ngs.servlet.iad.IADUtilServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>IADVoip</servlet-name>
<servlet-class>com.qwest.ngs.servlet.iad.IADVoipGateServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>IADFile</servlet-name>
<servlet-class>com.qwest.ngs.servlet.iad.IADFileServlet</servlet-class>
</servlet>

<!-- Faces Servlet -->
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- / -->

<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/voips/*</url-pattern>
<!--
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
-->
</web-resource-collection>
<auth-constraint>
<role-name>iadBvoipRole</role-name>
</auth-constraint>
</security-constraint>

<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>default</realm-name>
</login-config>

<security-role>
<role-name>iadBvoipRole</role-name>
</security-role>


<servlet-mapping>
<servlet-name>UtilsAndProperties</servlet-name>
<url-pattern>pingcheck</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IADVoip</servlet-name>
<url-pattern>/voip/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>IADVoip</servlet-name>
<url-pattern>/voips/*</url-pattern>
</servlet-mapping>



<servlet-mapping>
<servlet-name>IADFile</servlet-name>
<url-pattern>/@file.servlet.context.path@/*</url-pattern>
</servlet-mapping>

<!-- Faces Servlet Mapping (*.jsf files) -->
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>


<!-- JSF-RI parameters (used during debug mode) -->
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<!-- / -->

<!-- use .xhtml files to render views -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- / -->

<!-- special debugging output (used in dev mode) -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- / -->

<!-- skip contextual comments -->
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<!-- / -->

<!-- Applicable Session Parameters -->
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<!-- / -->

<!-- First Rendered Page (for bootstrapping) -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- / -->
</web-app>

I
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
babai biswas wrote:



What is your memory setting?
yun hu
Greenhorn

Joined: Feb 18, 2010
Posts: 13

add
-XX:PermSize=64M
-XX:MaxPermSize=128m

in start up java parameters.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
yun hu wrote:add
-XX:PermSize=64M
-XX:MaxPermSize=128m

in start up java parameters.


How do you know the current memory setting? What if you suggest to decrease memory?
yun hu
Greenhorn

Joined: Feb 18, 2010
Posts: 13

java.lang.OutOfMemoryError: PermGen space

The detail message PermGen space indicates that the permanent generation is full. The permanent generation is the area of the heap where class and method objects are stored. If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.

Interned java.lang.String objects are also stored in the permanent generation. The java.lang.String class maintains a pool of strings. When the intern method is invoked, the method checks the pool to see if an equal string is already in the pool. If there is, then the intern method returns it; otherwise it adds the string to the pool. In more precise terms, the java.lang.String.intern method is used to obtain the canonical representation of the string; the result is a reference to the same class instance that would be returned if that string appeared as a literal. If an application interns a huge number of strings, the permanent generation might need to be increased from its default setting.

When this kind of error occurs, the text String.intern or ClassLoader.defineClass might appear near the top of the stack trace that is printed.

The jmap -permgen command prints statistics for the objects in the permanent generation, including information about internalized String instances. See 2.6.4 Getting Information on the Permanent Generation
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
yun hu wrote:java.lang.OutOfMemoryError: PermGen space

The detail message PermGen space indicates that the permanent generation is full. The permanent generation is the area of the heap where class and method objects are stored. If an application loads a very large number of classes, then the size of the permanent generation might need to be increased using the -XX:MaxPermSize option.


Thanks you for reminding , but my point is that you suggest to set


-XX:PermSize=64M
-XX:MaxPermSize=128m


while the existing setting could be something


-XX:PermSize=256m
-XX:MaxPermSize=256m


We need to know the current memory setting, before suggesting anything.
babai biswas
Greenhorn

Joined: Feb 13, 2010
Posts: 6
Thanks guys for all your help..it worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issues with welcome file list in jsf
 
Similar Threads
Not being able to locate TLD file?
error-page for ViewExpiredException ignored by my jsf implementation
NoClassDefFoundError: Could not initialize class
security constraint with jsp forward
help regarding url-pattern in jsf