Jump to content

rajanpahuja

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rajanpahuja

  • Rank
    Newbie
  1. i m trying to diaplay a gif image on the html page using :<IMG SRC="block.GIF">the block.gif is in same folder as of web pagebut it is not showing
  2. i need help in making buttons of required shape, actually i have buttons made in adobe photo shop as images but i need to make them in HTML. Can you help?
  3. rajanpahuja

    Struts

    i m gettin ERROR 500:javax.servlet.ServletException: Cannot retrieve definition for form bean LoginForm on action /doLoginorg.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)org.apache.jsp.pages.login_jsp._jspService(login_jsp.java:96)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1001)org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:560)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)javax.servlet.http.HttpServlet.service(HttpServlet.java:689)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root causejavax.servlet.jsp.JspException: Cannot retrieve definition for form bean LoginForm on action /doLoginorg.apache.struts.taglib.html.FormTag.lookup(FormTag.java:761)org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443)org.apache.jsp.pages.login_jsp._jspx_meth_html_form_0(login_jsp.java:146)org.apache.jsp.pages.login_jsp._jspx_meth_html_html_0(login_jsp.java:122)org.apache.jsp.pages.login_jsp._jspService(login_jsp.java:87)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1001)org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:560)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)javax.servlet.http.HttpServlet.service(HttpServlet.java:689)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Struts-Config.xml:<struts-config><data-sources>..........</data-sources><form-beans><form-bean name="LoginForm.do" type="myproject1.com.LoginForm"/></form-beans><global-forwards><forward name="Welcome" path="/LoginForm.do"/><action-mappings><action path="/LoginForm" forward="/pages/login.jsp"></action><action path="/doLogin"type="myproject1.com.LoginAction"name="LoginForm"scope= "request"validate="false"parameter="/pages/login.jsp"><forward name="success" path="/Home.do" redirect="true"/><forward name="failure" path="/LoginForm.do" /></action></action-mappings><message-resources parameter="java.MessageResources" /></struts-config>LoginForm is:package myproject1.com;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.action.ActionMessage;public class LoginForm extends ActionForm{private String name=null;private String password=null;public void reset(ActionMapping mapping, HttpServletRequest request) {this.name=null;this.password=null;}public ActionErrors validate(ActionMapping mapping, HttpServletRequest request ) {ActionErrors errors = new ActionErrors();if( getName() == null || getName().length() < 1 ) {errors.add("name",new ActionMessage("error.name.required"));}if( getPassword() == null || getPassword().length() < 1 ) {errors.add("password",new ActionMessage("error.password.required"));}return errors;}public String getName() {return name;}public String getPassword() {return password;}public void setName(String name) {this.name = name;}public void setPassword(String password) {this.password = password;}LoginAction Class is:package myproject1.com;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.action.ActionMessage;public class LoginForm extends ActionForm{private String name=null;private String password=null;public void reset(ActionMapping mapping, HttpServletRequest request) {this.name=null;this.password=null;}public ActionErrors validate(ActionMapping mapping, HttpServletRequest request ) {ActionErrors errors = new ActionErrors();if( getName() == null || getName().length() < 1 ) {errors.add("name",new ActionMessage("error.name.required"));}if( getPassword() == null || getPassword().length() < 1 ) {errors.add("password",new ActionMessage("error.password.required"));}return errors;}public String getName() {return name;}public String getPassword() {return password;}public void setName(String name) {this.name = name;}public void setPassword(String password) {this.password = password;}
  4. i am making the login page of my project. the aim of this page is to get the usename and password from the user. after entering the username and password and pressing the 'PRESS' button the page should show username and password entered.Basically i dont know how to show output ( username and password )Please help me in the gettin the syntax correct.The HTML code i have used is :<HTML><HEAD><TITLE>First Page</TITLE></HEAD><BODY> <h1>One two three</h1>Username: <INPUT type="text" name="username" size="35"><BR>Password: <INPUT type="password" name="password" size="35"><BR><BR><INPUT type="submit" name="Submit" value="PRESS"></FORM>The Entered Username is : <c: out value="${username}" ><br>The Password Entered is : <c: out value="${password}" ></BODY></HTML>
×
×
  • Create New...