You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Fonseca Sánchez <df...@gmail.com> on 2006/09/12 23:58:27 UTC

tag library

Hello

I'm new in struts, and in a example, the jsp is the next:

<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
       <form:form action="register.do">
               UserName:<form:text property="username"/><br>
               enter password:<form:password property="password1"/><br>
               re-enter password:<form:password property="password2"/><br>
       <form:submit value="Register"/>
       </form:form>

but I don't find the archive struts-form.tld. I have
 + struts-bean.tld
 + struts-html.tld
 + struts-logic.tld
 + struts-faces.tld
 + struts-nested.tld
 + struts-tiles.tld

but I don't have struts-form.tld. Where I can to get this archive?

Thanks!

-- 
David Fonseca Sánchez

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: tag library

Posted by David Friedman <hu...@ix.netcom.com>.
I see you are using the BETA 1.3.5 version.  Since I haven't tried it (I'm
on the stable 1.2.9 official current release) so I don't know it's quirks.

However, that being said I see you are making a few key mistakes:

1. You are using a 1.3 release but specifying the wrong dtd.  This might
cause problems.  See your doctype mentioned 1_0 not, as I'm expecting 1_3:

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

Should be:

<!DOCTYPE struts-config PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
 "http://struts.apache.org/dtds/struts-config_1_3.dtd">

2. If you had the 1_0 above as your doctype, you are clearly using OLD
information be it an online article, tutorial, or actual "book."  I strongly
recommend you look for updated documentation since some methods used in v1.0
are no longer available, i.e. deprecated and probably removed from the code
by now (the 1.3.5 beta you are using).

3. Since your error message mentioned the word "modules" you should check
the 1.3.5 documentation to see if you are accidentally adding a module to
your config when you don't need that additional level of complexity when
trying to learn Struts.

4. As you mentioned having WEB-INF/lib/app/RegisterForm.class and
WEB-INF/lib/app/RegisterAction.class, I doubt classloading would be the
problem, unless you are potentially using the BEA WebLogic(?) server.

5. I did not understand your answer about the form "action" attribute: did
you get those error messages about the module being null from leaving the
html:form action="register.do" (<-- invalid use) or by setting it to match
the action's path attribute from struts-config.xml which in this case would
probably be html:form action="/register" ?

Regards,
David

-----Original Message-----
From: David Fonseca Sánchez [mailto:dfonsecas@gmail.com]
Sent: Wednesday, September 13, 2006 2:03 PM
To: Struts Users Mailing List
Subject: Re: tag library


The error apears when I access to jsp page where I have the form. In
WEB-INF\lib I have the package app (RegisterForm.class and
RegisterAction.class), servlet-2_3-fcs-classfiles.zip,
struts-taglib-1.3.5.jar and struts-core-1.3.5.jar


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: tag library

Posted by David Fonseca Sánchez <df...@gmail.com>.
The error apears when I access to jsp page where I have the form. In
WEB-INF\lib I have the package app (RegisterForm.class and
RegisterAction.class), servlet-2_3-fcs-classfiles.zip,
struts-taglib-1.3.5.jar and struts-core-1.3.5.jar

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: tag library

Posted by David Friedman <hu...@ix.netcom.com>.
Was the below error from setting your html:form action to "register.do" or
to "/register" which is listed as your struts-config.xml action "path"
settting?

Regards,
David

-----Original Message-----
From: David Fonseca Sánchez [mailto:dfonsecas@gmail.com]
Sent: Wednesday, September 13, 2006 1:22 PM
To: Struts Users Mailing List
Subject: Re: tag library


The struts-config.html is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
	<form-beans>
		<form-bean name="registerForm" type="app.RegisterForm"/>
	</form-beans>

	<action-mappings>
		<action path="/register"
			type="app.RegisterAction"
			name="registerForm">
				<forward name="success" path="/success.html"/>
				<forward name="failure" path="/failure.html"/>
		</action>
	</action-mappings>
</struts-config>

and the error says:

excepción

org.apache.jasper.JasperException: Module 'null' not found.
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWr
apper.java:510)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

causa raíz

java.lang.NullPointerException: Module 'null' not found.
	org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:743)
	org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:723)
        ...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: tag library

Posted by David Fonseca Sánchez <df...@gmail.com>.
The struts-config.html is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
	<form-beans>
		<form-bean name="registerForm" type="app.RegisterForm"/>
	</form-beans>
	
	<action-mappings>
		<action path="/register"
			type="app.RegisterAction"
			name="registerForm">
				<forward name="success" path="/success.html"/>
				<forward name="failure" path="/failure.html"/>
		</action>
	</action-mappings>
</struts-config>

and the error says:

excepción

org.apache.jasper.JasperException: Module 'null' not found.
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

causa raíz

java.lang.NullPointerException: Module 'null' not found.
	org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:743)
	org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:723)
        ...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: tag library

Posted by David Friedman <hu...@ix.netcom.com>.
Did you try making the action "register.do" match an action in your
mappings?  Did your struts-config.xml list it as "register.do" or perhaps
like "/register" ?

Regards,
David

-----Original Message-----
From: David Fonseca Sánchez [mailto:dfonsecas@gmail.com]
Sent: Wednesday, September 13, 2006 9:57 AM
To: Struts Users Mailing List
Subject: Re: tag library


Hello

Thanks, I'm using struts-html.tld, but when I run the application in
Tomcat, an error appear:

org.apache.jasper.JasperException: Exception in JSP: /register.jsp:2

1: <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
2: 	<html:form action="register.do">
3: 		UserName:<html:text property="username"/><br>
4: 		enter password:<html:password property="password1"/><br>
5: 		re-enter password:<html:password property="password2"/><br>


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWr
apper.java:504)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

What is it? and How to solve?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: tag library

Posted by David Fonseca Sánchez <df...@gmail.com>.
Hello

Thanks, I'm using struts-html.tld, but when I run the application in
Tomcat, an error appear:

org.apache.jasper.JasperException: Exception in JSP: /register.jsp:2

1: <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
2: 	<html:form action="register.do">
3: 		UserName:<html:text property="username"/><br>
4: 		enter password:<html:password property="password1"/><br>
5: 		re-enter password:<html:password property="password2"/><br>


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

What is it? and How to solve?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: tag library

Posted by David Friedman <hu...@ix.netcom.com>.
David,

struts-form.tld was deprecated before Struts v1.0 and the current version is
1.2.9.  That suggests the documentation you are following is frightfully old
(like 2001, 2002 old).  If that is the case, keep in mind any references to
perform() were replaced by execute() in actions.  That was a big change some
time ago.  Anyway, instead of struts-form.tld you should be using
struts-html.tld.  And the convention used is often html:form, html:submit,
html:text and html:password.

Regards,
David

-----Original Message-----
From: David Fonseca Sánchez [mailto:dfonsecas@gmail.com]
Sent: Tuesday, September 12, 2006 5:58 PM
To: user@struts.apache.org
Subject: tag library


Hello

I'm new in struts, and in a example, the jsp is the next:

<%@ taglib uri="/WEB-INF/struts-form.tld" prefix="form" %>
       <form:form action="register.do">
               UserName:<form:text property="username"/><br>
               enter password:<form:password property="password1"/><br>
               re-enter password:<form:password property="password2"/><br>
       <form:submit value="Register"/>
       </form:form>

but I don't find the archive struts-form.tld. I have
 + struts-bean.tld
 + struts-html.tld
 + struts-logic.tld
 + struts-faces.tld
 + struts-nested.tld
 + struts-tiles.tld

but I don't have struts-form.tld. Where I can to get this archive?

Thanks!

--
David Fonseca Sánchez


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org