tags in struts2

tags in struts2

Hello

I am using simple tags in struts2. Like this

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
</head>
<body>

<s:form action="login" method="post" validate="true">
<table align="center" border="0">
                    <tr>
                        <td>Username</td>
                                                <td><s:textfield name="uname" value="" /></td>
                        <td>&nbsp;</td>
                    </tr>

                    <tr>
                        <td>Password</td>
                        <td><s:password name="password" value="" /></td>
                        <td>&nbsp;</td>
                    </tr>

                    <tr>
                        <td>&nbsp;</td>
                        <td><s:submit value="Submit" name="submit" /></td>
                        <td>&nbsp;</td>
                    </tr>
</table>
</s:form>
</body>
</html>

But it is showing me following exceptions

freemarker.template.TemplateModelException: Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invoked on [email protected]
        at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
        at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
        at freemarker.core.Environment.visit(Environment.java:416)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.Environment.include(Environment.java:1482)
        at freemarker.core.Include.accept(Include.java:169)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:209)
        at freemarker.core.Environment.process(Environment.java:189)
        at freemarker.template.Template.process(Template.java:237)
        at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:182)
        at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
        at org.apache.struts2.components.UIBean.end(UIBean.java:513)
        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
        at org.apache.jsp.login_jsp._jspx_meth_s_005fform_005f0(login_jsp.java:152)
        at org.apache.jsp.login_jsp._jspService(login_jsp.java:76)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorKey(AnnotationActionValidatorManager.java:201)
        at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:58)
        at com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.getValidators(AnnotationActionValidatorManager.java:54)
        at org.apache.struts2.components.Form.getValidators(Form.java:264)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:840)
        at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)
        ... 51 more

can any one tell me where i am going wrong?

View Answers

Ads









Related Tutorials/Questions & Answers:
tags in struts2
tags in struts2  Hello I am using simple tags in struts2. Like...-tags" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN.../struts/struts2/struts2-login.shtml More Struts2 Tutorials
Struts2 Data Tags
Struts2 Data Tags           Struts2 Data Tags Apache Struts is an open-source... generic tags in the November issue. In this section, we will continue further
Advertisements
struts2
struts2  sir.... i am doing one struts2 application and i have to make pagination in struts2....how can i do
struts2
struts2  dear deepak sir plz give the struts 2 examples using applicationresources.properties file
struts2
struts2  hi all i am going to run struts2.x program i got this error when server started java.lang.RuntimeException...: Struts2 Tutorials
Struts2
Struts2  i want select multiple items from select list in struts2.when i did like that the two selected values must saved into databse in two diffirent rows.pls provide any one code for this i am new to Struts2
struts2
struts2   Sir when i have run my struts 2 web application,every time i get error " request resources is not available",,,what is this,,,plz help me
Struts2
Struts2  java.lang.NullPointerException org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69... exception while submitting the update form in struts2 I am using tomcat6.0 ... its
Struts2
Struts2  Hi I am using struts 2,In struts2 architecture ,I couldn't understand the purpose of ActionMapper and ActionProxy.My Question is,when the request comes into the picture,the filterdispatcher consult the ActionMapper
Struts2
Struts2  Hi, I need a solution for displaying success message in same page in struts2. how to redirect same page in struts2.Please help me.   hi friend, To know how redirect action can be done in struts 2 you can go
STRUTS2
STRUTS2  sir but my question is using ApplicationResources.properties in STRUTS 2.i cant get the values into my application.but in the exmple given at roseindia,u cant use the properties file.i use actionclass-validation.xml
Struts2 Tags
Struts2 Tags        ... we will start introducing you with some tags provided with struts 2 framework... Tags are further classified into Control Tags: The Control Tags are used for flow
Struts2 Tags
Struts2 Tags           Apache Struts is an open-source framework used to develop Java web applications. In this section, struts 2 form tags (UItags) will be discussed
Struts2 and Hibernate
Struts2 and Hibernate  how to fetch database value from one page to another page in struts2 and hibernate
datetimepicker not displayed in struts2
datetimepicker not displayed in struts2  Hi, I am facing problem in struts2(2.1 version) to diaplay datetimepicker. sample code: <%@taglib prefix="s" uri="/struts-tags"%> <%@taglib prefix="d" uri="/struts-dojo-tags
Struts2 tag
Struts2 tag  function of hidden tag?   Hi Friend, <s:hidden> tag create a hidden value field.It means it stores the value but cannot be visible. For more information, visit the following link: Struts2 Tutorial
New to struts2
New to struts2   Please let me know the link where to start for struts 2 beginners   Struts 2 Tutorials
Struts2 and Hibernate
Struts2 and Hibernate  Sir/ madam, Can we use iterator tag in struts for fetch the database value and shown on form. if yes then how
themes in struts2
themes in struts2  i want to create themes in strut2 can any one tell the step by step procedure of how to create it.with example links thanks in advance
Help in Struts2
Help in Struts2  Hi, in struts 2 how to get the values from db and show in jsp page using display tag or iterator tag thanks in advance
Struts2 Internationalization
Struts2 Internationalization  Hi How to use i18n functionality for indian languages in struts2 ? I am able to use french and english but none of the Indian languages. Pls help. Regards Vaishnavi   Please visit
STRUTS2 Dynamic data is not updated
, please let me know if i miss some important part of struts2 I used below tags...STRUTS2 Dynamic data is not updated  Hi All, I am new in struts and try to make an application in struts2. Need help on dynamic data content
STRUTS2 Dynamic data is not updated
, please let me know if i miss some important part of struts2 I used below tags...STRUTS2 Dynamic data is not updated  Hi All, I am new in struts and try to make an application in struts2. Need help on dynamic data content
struts2 select tag multiple
struts2 select tag multiple  struts2 select tag multiple
struts2 filters
struts2 filters  hi i created a filter,if the session is null then it should to go error page that ur not authorized to access, nw my question is how to use means how to call filter to do the task pls help me
Struts2 and Hibernate
Struts2 and Hibernate   I have a simple application in Struts2 and Hibernate which have simple form for entering contact information and after submitting the page it saved to the database. This was a tutorial i was trying from
Struts2 and Hibernate
Struts2 and Hibernate   I have a simple application in Struts2 and Hibernate which have simple form for entering contact information and after submitting the page it saved to the database. This was a tutorial i was trying from
Struts2 and Hibernate
Struts2 and Hibernate  Hello Sir, I am trying to fetch database value from one page to another page. Means i am submiting the form value... using struts2 and hibernate3.0. I need ur help try to short out this asap
struts2 tiles.xml
struts2 tiles.xml  Hi, I want to use .properties file data in tiles.xml file of struts2(2.1.8) application to display title. sample code I have used: In tiles.xml: <definition name="disastersettingsview_users" extends
struts.xml in struts2
struts.xml in struts2  What is the struts.xml file ? Who it is loads?   Hi Samar, The struts.xml is a XML file. Which is used to struts configuration. It divides the application in to modules. Struts use
Generating dynamic fields in struts2
Generating dynamic fields in struts2  Hi, I want generate a web page which should have have some struts 2 tags in a group and a "[+]" button.... Thanks.   Hi Friend, Please visit the following link: Struts2 Tutorial

Ads