Win a copy of Spark in Action this week in the Open Source Projects forum!

Sid Scud

Ranch Hand
+ Follow
since Mar 13, 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 Sid Scud

Hi All,
I am using servlets and jsp's in websphere 5.0.
If i modify a jsp do i need to again build the war and the rest and redeploy the application?
Is there any other simple way to re redploy a single modified jsp?
Thanks in advance
-Siddharth
17 years ago
Hi All ,
I am searching for some libraries/parsers which I can use to parse a code in XPL and write my own converter to convert teh XPL code into Java.
Thanks in advance ,
-Siddhath
17 years ago
Hi All,
I am looking for libraries that can parse a code written an any language (say COBOL) and convert that code in to a Java code. So I need a parser that will accept the "grammar" of a language and the it will do the "dirty" work for you.
Can anyone help me out on this ?
Thanks in advance
-Siddharth
17 years ago
HI ALl
I am working on an application ported in Tomcat. This works fine in JRun 3.1.
Bu I am getting the following error in Tomcat 4.04 ..
org.apache.jasper.JasperException: Unable to compile class for JSP
E:\Tomcat\jakarta-tomcat-4.0.4\work\Standalone\localhost\testapp\accounts\Test$jsp.java:16: Class or interface declaration expected.
import javax.servlet.*;
^
E:\Tomcat\jakarta-tomcat-4.0.4\work\Standalone\localhost\testapp\accounts\Test$jsp.java:22: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.Test$jsp not found.
public class Test$jsp extends HttpJspBase {

Can someone tell me where things are going wrong?
Thanks in advance..
-Siddharth
17 years ago
JSP
HI ALl
I am getting the following error ..
org.apache.jasper.JasperException: Unable to compile class for JSP
E:\Tomcat\jakarta-tomcat-4.0.4\work\Standalone\localhost\testapp\accounts\Test$jsp.java:16: Class or interface declaration expected.
import javax.servlet.*;
^
E:\Tomcat\jakarta-tomcat-4.0.4\work\Standalone\localhost\testapp\accounts\Test$jsp.java:22: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.Test$jsp not found.
public class Test$jsp extends HttpJspBase {

Can someone tell me where things are going wrong?
Thanks in advance..
-Siddharth
17 years ago
Hi All,
If a certain task can be done using a bean and a Tag library .. what is preferred ... considering the performance.
Please comment ...
-Siddharth
18 years ago
JSP
I want to read a Microsoft Project File (*.mpp) file. There are readymade objects by MS to do it. How can I use those objects in Java?
Please help !!!
18 years ago
JSP
I am trying to connect to a servlet from an applet using URLConnection.
This the code in the applet :
try{
url = new URL("http://128.9.200.131:8080/sid/servlet/ClientServlet";);
con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-TYpe", "application/octet-stream");
ObjectOutputStream oos = new ObjectOutputStream(con.getOutputStream()) ;
oos.writeObject("TEst data") ;
oos.flush() ;
oos.close() ;
ObjectInputStream ois = new ObjectInputStream(con.getInputStream()) ;
textArea1.append(ois.readObject()+"\n");
ois.close();
}
catch(Exception e){}
This is my service method :
public void service( HttpServletRequest req, HttpServletResponse res ) throws IOException {
res.setContentType( "text/html" );
PrintWriter out = res.getWriter();
out.println( "<CENTER><FONT SIZE=+1 FACE=\"arial\">Servlet Ran Successfully! POST</FONT></CENTER>" );
try{
ObjectInputStream ois = new ObjectInputStream(req.getInputStream());
out.println(ois.readObject());
ois.close();
ObjectOutputStream oos = new ObjectOutputStream(res.getOutputStream());
out.println("writing the object");
oos.writeObject("test data");
oos.flush();
oos.close();
}
catch(Exception e){
out.println("Exception "+e);
}
}
But I keep on getting StreamCorrupted exception in: invalid stream header error in Jrun and http response code 405 IO exception in Tomcat...
can someone help???
18 years ago
Hey sanjay,
I am handling the duplicate entries in the MIddle Tier. I saw that its been implemented by Java Ranch.
The thing is that I cud have done it in JS. But I want to handle in the Beans.
If you can think of anything ..let mem know
-Sid
18 years ago
JSP
Hey sanjay,
I am handling the duplicate entries in the MIddle Tier. I saw that its been implemented by Java Ranch.
The thing is that I cud have done it in JS. But I want to handle in the Beans.
If you can think of anything ..let mem know
-Sid
18 years ago
JSP
the getParameterValues() method returns the values of checkboxes that are checked. So there is absolutely no need to do the following check:
if(rs.getString("pub_id").equals(p[i]))
the array p already contains the values of checked boxes.
Example:
<form action="testCheckbox.jsp">
<input type="checkbox" name="Check" value="1">
<input type="checkbox" name="Check" value="2">
<input type="checkbox" name="Check" value="3">
<input type="checkbox" name="Check" value="4">
<input type="checkbox" name="Check" value="5">
<input type="SUBMIT">
</form>
If this form is submitted by checking first 2 checkboxes... and I do request.getParameterValues("Check"), I will get an array having values 1,2.

-Sid
18 years ago
JSP
If the user clicks the Submit button multiple times in rapid succession, multiple (duplicate)entries are inserted in the DB.
How to avoid this?
18 years ago
JSP
When the Submit button is clicked more than once in rapid succession, multiple records are entered in DB.
The Jsp page calls a method from a worker bean that inserts the record. I tried isThreadSafe="false" but it didn't work. I tried synchronizing the insert method too ... but it failed.
HOW TO IMPLEMENT FLOOD-CONTROL??? (We tried the same thing in this site and gave the Flood-Control message)
Message:
Sorry! We have flood-control activated. You cannot post within a certain number of seconds of your last post. Please try again after this period of time elapses. The current number of seconds required between posts is: 30
How to implement this???
18 years ago
JSP
When the Submit button is clicked more than once in rapid succession, multiple records are entered in DB.
The Jsp page calls a method from a worker bean that inserts the record. I tried isThreadSafe="false" but it didn't work. I tried synchronizing the insert method too ... but it failed.
How can this be avoided?
18 years ago
JSP
Hi Kareem,
Here is the link where u get the specs and the jar file.
http://developer.java.sun.com/developer/earlyAccess/crs/
(u need to be a JDC member)
Hope it helps u.
-Sid
18 years ago