Rohitash sharma

Greenhorn
+ Follow
since Dec 03, 2008
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 Rohitash sharma

I don't know how to write
<bean:write> tag between <logic:iterate> tag
11 years ago
Actually I am using this type of coding


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h2>Hello World!</h2>
<bean:write property="text" name="loginform"/>
<bean:write property="gender" name="loginform"/>
<logic:iterate id="xyz" name="loginform" property="array">

</logic:iterate>

</body>
</html>


But it is giving some type of error
11 years ago
I have array containing simple integers . I want to display these integers
on another page using struts's <logic:iterate> tag.How can i display?/*


package com.myapp.struts;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class loginform extends org.apache.struts.action.ActionForm {
private int array [];
private String gender;
private String text;
private String text1;


public void setArray() {
int array[]={1,2};
}

public int[] getArray() {
return (this.array);
}


public void setGender(String gender) {
this.gender = gender;
}

public String getGender() {
return (this.gender);
}


public String getText() {
return text;
}

public void setText(String string) {
text = string;
}

public String getText1() {
return text1;
}

public void setText1(String string) {
text1 = string;
}

public loginform() {
super();
// TODO Auto-generated constructor stub
}
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (getText() == null || getText().length() < 1) {
errors.add("text", new ActionMessage("error.text.required"));
// TODO: add 'error.name.required' key to your resources
}
if (getText1() == null || getText1().length() < 1) {
errors.add("text1", new ActionMessage("error.text1.required"));
// TODO: add 'error.name.required' key to your resources
}

return errors;
}
}

Here is my form bean

Thanks in advance
11 years ago
Telling you concept
Make a object of Date class .Store its value in Bean .When user enter Date in text box compare both values and display message
11 years ago
I have some code <%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@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"%>
<!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=UTF-8">
<title>JSP Page</title>
</head>
<body>
<center>
<h2>Hello World!</h2>
<br/><br/>
<html:form action="/hello"><br/><br/><br/>
<html:text property="text"/>
<br/><br/>
<html:text property="text1"/>
<br/><br/>




<html:submit value="LOGIN"/>
<html:errors/>
</html:form>
</center>
</body>
</html>

I want to display value of both textbox in some other jsp page
The name of beans are text and text1
How can i do this using <bean:write>
11 years ago
I am new to jstl .I am facing a problem. I want to run a jsp file using jstl
but I dont know how to run that file. What would I have to do?
11 years ago
JSP
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/dtoregistrationform", "root", "cdn123");
Can anyone Explain step by step how to use connection pooling.
Actually if we use like this

private static Connection con=null;
Thanks Sir for your guidance But I want to ask one question If we use coding like this

private Connection con=null;

I read in a book that if we use this type of connection then we can only insert value in database but can't retrieve value .It is true? Why?
I am completely blank on this concept. I usually use this concept specially on variables when I want to fix the value of any variable.
I tried this concept on connection as well
I am working on project and i have established connection.But the problem arised when i declared connection like
static connection con =null
My TL told me that we should not use this type of connection
I want to know why should we not declare connection to be static

Thanks in advance
I am working on j2ee specially on struts and Hibernate .I have only 6 months of experience but my salary is too bad I want to switch in big MNC How much experience should I get and which technology should I learn
11 years ago
I want to install Hibernate API in netbeans5.5 but i dont know how to do that .After searching GOOGLE i found that some jar files have to be placed in lib folder of Sever Manage. Iam using Sun Java System Application Server please guide me where to place these jar files