k b

Greenhorn
+ Follow
since Feb 01, 2001
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 k b

req.getParameterValues will return null if no such parameter name found in the request, so you should check the name of check boxes by doing view source in your browser and try to check their names more closely.
Secondly you will only get checkboxes those are marked, un-marked check boxes are not sent with the request ( for those names you will get null).
Hope this help.
k b
18 years ago
make two bat files mycompile.bat and myrun.bat out of the follwing code and put in c: and try running it will tell you what class path you are using both at run time and compile time. You can take out remark statements after wards, they are there for usage instruction only. Hope this help.

// mycompile.bat
@echo OFF
SET SOURCE=c:\SeemaDas\Source
SET DEPLOY=c:\where you want your compiled class to go( full path example:c:\myapp\web-inf\classes)
SET cp=%DEPLOY%;c:\jsdk12\servlet.jar;c:\any other jars you need with ; separated
echo Your Compile Time ClassPath:
echo %cp%

IF "%1"=="" goto FULL
IF "%1"=="all" goto ALL
:SINGLE
javac -classpath %cp% -d %DEPLOY% %1
goto END

:FULL
javac -classpath %cp% -d %DEPLOY% *.java
goto END
:ALL
javac -classpath %cp% -d %DEPLOY% %SOURCE%\util\*.java
javac -classpath %cp% -d %DEPLOY% %SOURCE%\common\*.java
goto END
:END
rem to compile a single java source : mycompile.bat myjava.java
rem all java sources on specified subdirectories mycompile.bat all
rem if want to compile all java sources only under c:\SeemaDas\Source directory mycompile.bat
// myrun.bat
@echo OFF
SET DEPLOY=c:\where you want your compiled class to go( full path example:c:\myapp\web-inf\classes)
SET cp=%DEPLOY%;c:\jsdk12\servlet.jar;c:\any other jars you need with ; separated
echo Your Run Time ClassPath:
echo %cp%
java -cp %cp% %1 %2 %3 %4 %5
goto END
:END
rem to run the pgm type myrun.bat myjava parma1(if any) param2(if any) ... param4(if any)
rem %1 %2 %3 %5
18 years ago
Job
What is your detail experience ?
18 years ago
Where are looking a job ? In india or abroad ?
18 years ago
There are some jobs posted under "jobs Offered" on javaranch. Please see those and try, will get sooner or later donot give up.
Thanks.
kb
18 years ago
What's there in your class path ? Can you copy and paste your classpath, so that we can help you.
Thanks,
18 years ago
// Here is a method that can help your problem

private String replaceText(String orig, char c, String s){
String modified =orig;
while(orig.indexOf(c) != -1){
int index = orig.indexOf(c);
modified = orig.substring(0,index) + s + orig.substring(index+1);
orig = modified;
}
return modified;
}
18 years ago
How do you transfer control to the JSP from servlet. It should work if you have used forward.
Hope this may help.
18 years ago
What kind of error you get ? Can you please explain a little bit what you are trying to do and what error you are getting.
Thank you.
18 years ago
DeptRoleBean[] deptRole = new DeptRoleBean[5];
deptRole[0] = roleId; //Error
This may Help:--
DeptRole tmp = new DeptRole();
tmp.setRoleId(roleID);
deptRole[0] = tmp;
18 years ago
DeptRoleBean[] deptRole = new DeptRoleBean[5];
deptRole[0] = roleId; //Error
This may Help:--
DeptRole tmp = new DeptRole();
tmp.setRoleId(roleID);
deptRole[0] = tmp;
18 years ago
Have a look at this also:--
import java.util.*;

public class TestConvert{
public static String getDate(String mmddyy)
{
// Assume your date is in mm/dd/yy format which you get from your vector
// Also assumed mm comes as 01, 02,...12 for jan thru Dec.
int mm = 0;
String smm = mmddyy.substring(0,2);
String sdd = mmddyy.substring(3,5);
String syy = mmddyy.substring(6,8);
try
{
mm = Integer.parseInt(smm);
}catch(Throwable t)
{
}
switch(mm)
{
case 1:
smm = "January";
break;
case 2:
smm = "February";
break;
case 3:
smm = "March";
break;
case 4:
smm = "April";
break;
case 5:
smm = "May";
break;
case 6:
smm = "June";
break;
case 7:
smm = "July";
break;
case 8:
smm = "August";
break;
case 9:
smm = "September";
break;
case 10:
smm = "October";
break;
case 11:
smm = "November";
break;
case 12:
smm = "December";
break;
default:
smm = "Invalid month";
}
return smm + "," + sdd + "," + syy;
}
public static void main(String[] args)
{
System.out.println(getDate(args[0]));
}
} // end of class

Note :-- compile and Test as
java TestConvert 01/25/01
Hope it helps.
18 years ago
Can you use DataBase Table ? If so ,you can show the user any previous message he has posted not only for this session, but including old ones. If you donot want to use table then you can keep in Session using session.setAttribute() and retrieve them using getAttribute(). For this you have to maintain a session level counter and while putting the attribute use the counter as an suffix to the name.
session.setAttribute("name" + counter, message);
While getting the attribute loop for counter times and get it.
Hope this helps
khudi
18 years ago
You can do like this:--
Let 1st Jsp ( having grp code and applications) do a submit to another Jsp say controller.jsp.

<form name="1stjsp" action="controller.jsp" method="POST">
In controller.jsp
You can retrieve those parameters using
request.getParameter(), request.getParameterNames() ( This is helpful when we have checkboxes and depends how you have coded the names for them).
Then do JDBC connection and write/insert into tables.
Finally when you are done we can forward back to the 1st page or another page using jsp forward tag.
<jsp:forward page="someother.jsp" />
Hope this helps.


18 years ago