Aljen vonHell

Greenhorn
+ Follow
since Jul 23, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aljen vonHell

sorry for missing information about my problem
By "this" tutorial i mean this tutorial: http://www.javaranch.com/newsletter/200404/Journal200404.jsp#a3
19 years ago
I have some problem with this tutorial. When i start this aplication i get this error: 500 Internal Server Error---java.lang.NullPointerException
void javax.faces.webapp.FacesServlet.init(javax.servlet.ServletConfig

I am using OC4J. I think that i have done everything that i should. Where could be a problem?
19 years ago
I have a simple aplication and i want to use Struts logging feature using commons-logging and log4j on oc4j container. I think that log4j is running correctly but i dont know how to turn on STRUTS logging (I have read that struts can log some useful information: http://javaboutique.internet.com/tutorials/Struts2/jsp-pages.html) I have log4j-1.2.8.jar and commons-logging.jar in web-inf\lib. Do i need some configuration of struts to start logging?
19 years ago
I am trying to iterate a String[] object in simple JSP but i have a problem:
javax.servlet.jsp.JspException: Cannot find bean element in any scope

Jsp code:
<logic:iterate id="element" name="zoznamStlp">
<bean:write name="element"/>
</logic:iterate>

zoznamStlp is present in request.
19 years ago
When i start my web application with .../Alibaba/submit.jsp
i get this error
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
No other similar thread helped me. Where is a problem
--------------------
struts-config.xml
--------
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<form-beans>
<form-bean name="submitForm" type="exp.SubmitForm"/>
</form-beans>
<action-mappings>
<action
path="/submit"
type="exp.SubmitAction"
name="submitForm"
input="/submit.jsp"
scope="request">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/submit.jsp"/>
</action-mappings>
</struts-config>

-----------------------
web.xml
----------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
<!-- Standard Action Servlet Configuration (with debugging) -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>
------------------------
submit.jsp
-------------
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<html:html>
<head><title>Submit example</title></head>
<body>

<h3>Example Submit Page</h3>
<html:errors/>

<html:form action="/submit.do">
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex: <html:radio property="sex" value="M"/>Male
<html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married"/><br>
Age: <html:select property="age">
<html ption value="a">0-19</html ption>
<html ption value="b">20-49</html ption>
<html ption value="c">50-</html ption>
</html:select><br>
<html:submit/>
</html:form>

<logic resent name="lastName" scope="request">
Hello
<logic:equal name="submitForm" property="age" value="a">
young
</logic:equal>
<logic:equal name="submitForm" property="age" value="c">
old
</logic:equal>
<bean:write name="lastName" scope="request"/>
</logic resent>

</body>
</html:html>
----------------------------------------------------------------
19 years ago