Win a copy of Head First Android this week in the Android forum!

mnadeem chishti

Greenhorn
+ Follow
since Aug 07, 2006
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 mnadeem chishti

Change the form method to post
<form method="POST" action="">
</form>

doing so will hide the parameters.
13 years ago
JSP
yes you can control the browser back and forword buttons from your code. But you can hide bar completely while opening the browser window using javascript function window.open(.......).
13 years ago
JSP
Please can you past code snipt here you are using to ....
Hi All,

I am using Spring framework to develop my webapplicaiton. As exception is thrown in my controllers my application gets crashed and there is white page is displayed. I want to configure some error page on application level which must be displayed whatever and whereever the exception is thrown on back.
please can i have some idea ???
Definately you have defined action and action form for this in your applicaiton.

But when you load the page first time, the values are papulated from database but how the ActionForm will come to know what are the values.

So set the values while using the setter method in execute method of your action when you fetch data from database.

This will resolve the problem and data will be displayed to html page properly.

...execute(request,respone,form....){

if(valueindb){
{
form.setCheckBox(true)
}else{
form.setChckBox(false)
}

remember the form instance should be the same which is passed to execute method of action.
}
14 years ago
sql
check the column names "password" is reserver word for oracle so rename this colum.

Originally posted by Bhavik patel:
Hello Friends,


I am new to JDBC....

String query="SELECT * FROM Login WHERE username="+"bhavik";

now suppose,if the user name "bhavik" does not exist...
what will be returned by the method stmt.executeQuery(query);?
and i knoew it will be anythingf except null...

what will be returned by rs.next()?

it is quite simple
HttpServletRequest object is already in action class or use session
for example

public class MyAction extends Action{

public ActionForword execute (.............){


String myvar;
myvar=..;

request.setAttribute("validate",myvar);
or

HttpSession session=request.getSession(false); // if session already creaqted

session.setAttribute("validate",myvar);

}
}


// *************************now in jsp file and javascript


<script language="javascript">
var validate=<%=(String) session.getAttribute("validate")%>
or
var validate=<%= (String) request.getAttribute("validate") %>

// session and request variable are available in jsp file by default
</script>
15 years ago
INITIAL_CONTEXT_FACTORY=weblogic.jndi.WLInitialContextFactory
PROVIDER_URL=t3://" + "IP:PORT

put these properties in a text file let say dsproperteis.properties
now use the following code to lookup your datasource

Properties p=new Properties();
try {
p.load(new FileInputStream("dsproperteis.properties"));
System.setProperties(p);
// lookup your datasource here
}
catch (Exception e)
{
e.printStackTrace();
}

take care while providing the properties file.
put it in the same location where your class contianing main method is placed.
application don't need to get brand new connection from database. It gets connection from datasource pool and returns to pool. Moreover you can specify maximum and minimum number of conneections which an application may open with database.
How ma i configure datasource connection pool with tomcat container ?
15 years ago