Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Nilesh Chokhadia

Greenhorn
+ Follow
since Sep 12, 2003
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 Nilesh Chokhadia

Can anyone knows the tool/pluggin for I18N in Eclipse using ICU4J?
Configuration of the tool would be more usefull
Hi,
I want to find number of user loged in to my site for that I write a code in which when user loged in it creaete one session for thet user now this session i caught by using HttpSessionListner following is the code
package com;
import java.util.EventListener;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;
public class SessionCounter implements HttpSessionListener{
private static int activeSessions = 0;
public void fireSessionCreatedEvent(HttpSessionEvent se) {
activeSessions++;
}
public void fireSessionDestroyedEvent(HttpSessionEvent se) {
if(activeSessions > 0)
activeSessions--;
}
public static int getActiveSessions() {
return activeSessions;
}
}
but here it gives me error
C:\JRun\servlets>javac com/SessionCounter.java
com/SessionCounter.java:5: cannot resolve symbol
symbol : class HttpSessionListener
location: package http
import javax.servlet.http.HttpSessionListener;
^
com/SessionCounter.java:6: cannot resolve symbol
symbol : class HttpSessionEvent
location: package http
import javax.servlet.http.HttpSessionEvent;
^
com/SessionCounter.java:9: cannot resolve symbol
symbol : class HttpSessionListener
location: class com.SessionCounter
public class SessionCounter implements HttpSessionListener{
^
com/SessionCounter.java:13: cannot resolve symbol
symbol : class HttpSessionEvent
location: class com.SessionCounter
public void fireSessionCreatedEvent(HttpSessionEvent se) {
^
com/SessionCounter.java:17: cannot resolve symbol
symbol : class HttpSessionEvent
location: class com.SessionCounter
public void fireSessionDestroyedEvent(HttpSessionEvent se) {
^
my question is why it is not taking "class HttpSessionListener"
is there any method to solve the same problem.
18 years ago
Thank you for replying
when i make <%response.setContentType("octet/stream");%>
while loading jsp page it gives me the option of save open or cacel for jsp file I want this option for downloading file like execel,word,wav format file so where can I place this <%response.setContentType("octet/stream");%>
should i palce with
<a href="ShiftScheduled.xls" ....onCclick="<%response.setContentType("octet/stream");%>">shift</a> but it never works help me.
regards
Nilesh
18 years ago
JSP
I know the syntax of downloading any file from server to client machine using <a href="folename">click</a> this code directly gives a save file option but how to give a option to user to open it or save it using response.setContentType("text/csv"); option please try to explain with an example code.
Regards
Nilesh B Chokhadia
18 years ago
JSP
Thank you very much I got my doubt clear
18 years ago
JSP
Hello friends,
Can any one show me a code that assigns javascript variable with jsp variable.
I need this code for my form validation which checks input value of text field onBlur with database value.
18 years ago
JSP
In tomcat5.0 server.xml file we have thindriver for oracle,My-sql but we dont have for SQLServer from where I got thin driver and how to configure that driver in server.xml as well as in source code for Database connectivity with same thin sqlserver driver
Hi I want to download a file from JSP page the downloaded file is already in my application.
URL for same file is given like
response.sendRedirect("a.jsp?mFileName="+mFileName+"&mUser="+mUser+"&mpath="+directoryName);
what code I have to wrie down in a.jsp file
18 years ago
JSP
My Source code is
String user = "sa";
String password1 = " ";
String server = "Support@SQLSERVER:1433";
Properties props = new Properties();
props.put("user", user);
props.put("password", password1);
props.put("server", server);
try
{


Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
System.out.println("hello");
con =
DriverManager.getConnection("jdbc:weblogic:mssqlserver4",props);
System.out.println("hello!!!");
I Configured Connectionpooling with weblogic6.1
Name=supportPool
Url=jdbc:jdbc:weblogic:mssqlserver4:Support@SQLSERVER
Driver=weblogic.jdbc.mssqlserver4.Driver
Properties=
user=sa
Password=
Server=Support@SQLSERVER:1433

Errror was
hello
no connection pool!! Login failed for user 'sa'. Severity 14, State 1, Procedure
'null null', Line 0 Unable to connect, please check your server's version and a vailability.
I,ve done configuration for coonectionpool called "supportPool" in the weblogic console as
follows:
url is given as ---- jdbc:weblogic ool
Driver classname-----weblogic.jdbc.pool.Driver
properties---- user=sa
password=
server=Support@Sqlserver:1433
Database name is 'Support, in SQLServer7.0
Machine name is 'Sqlserver'

The sourcecode is:
String user = "sa";
String password1 = " ";
String server = "Support@Sqlserver:1433";
Properties props = new Properties();
props.put("user", user);
props.put("password", password1);
props.put("server", server);

Class.forName("weblogic.jdbc.pool.Driver").newInstance();
con = DriverManager.getConnection("jdbc:weblogic ool:supportPool",props);

when we run this ,we get the following error message:
Pool connect failed: java.lang.SecurityException: Authentication for user sa denied in realm weblogic
Please help me to solve this error.
from Nilesh
18 years ago