This week's book giveaway is in the Python forum.
We're giving away four copies of Hello World and have Warren & Carter Sande on-line!
See this thread for details.
Win a copy of Hello World this week in the Python forum!

Babar Qadri

Ranch Hand
+ Follow
since Oct 12, 2004
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 Babar Qadri

Originally posted by Tim Holloway:
You evidently did that, but it appears that you didn't setup your new tag's TLD properly. Either that or you misdefined the property setter (didn't make it public, didn't capitalize the name properly etc.).



Thanks Holloway.

Below is my .tld entry under <tag> element


Below is my setter, defined in class HtmlInputTextarea extends javax.faces.component.html.HtmlInputTextarea



Tag method is working good, as I have mentioned in my previous post. Kindly put some more thoughts because thought works.
14 years ago
JSF
I need to add a custom attribute in Textarea Component. I have made a component class by extending HtmlInputTextarea, a tag class, add that attribute in both the classes, made setter/getter for that attribute, add that attribute in .tld file. Now when I run the page, using that custom component, I am getting the value of that attribute inside setter in tag class but setter in my component class is not being invoked.

What else I need to do? Please help.

Thanks.
14 years ago
JSF
Hey Congrats Mr. Adeel Ansari. Keep it up.
Your posts helped me alot.
14 years ago
I have a method in my class. But I dont want to call it straight. Infact, I am getting the method call from database as a string. The string looks like, "classA.calculate(valueA)".

I get this method call, statement, as string using rs.getString(). Is there any way to execute this statement?

Thanks.
14 years ago
try this
, i made some additions in your code


try
{

//added line
SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");

int add=str.lastIndexOf("ad.x");





if(add>0)
{

schfromdate1=req.getParameter("schfromdate");
schtodate1=req.getParameter("schtodate");
doinsert(schno1,prodno1,schname1,schfromdate1,schtodate1,schdetail1,schcost1,
schbenefit1,invvalue1,schregion1,schcategory1,schapplied1,
schbenqty1,schper1,schtype1,pw);
res.sendRedirect("http://localhost:8080/examples/schemeR.jsp");
{
public void doinsert(String fromdate, {
System.out.println("insert");
String sqlint="insert into Scheme" +
"(sch_from_date)"
+ "values(?)";

try {
pst=con.prepareStatement(sqlint);
}
catch(SQLException e)
{
System.out.println(e);
}


int i=0;

try
{
System.out.println("inside insert executed");
pst=con.prepareStatement(sqlint);

////added line
pst.setDate(1,new java.sql.Date( sdf.parse(schfromdate()).getTime()));


System.out.println("after insert executed");
i=pst.executeUpdate(sqlint);

catch(Exception e)
{
System.out.println(e);
}




}
[ December 08, 2005: Message edited by: Babar Qadri ]
try this

<select name=btch>
<%for(int i=0;i<batchList.length;i++)
{%>
<options name=<%=batchList[i]%>><%=batchList[i]%></options>
<%}%>
</select>
[ December 08, 2005: Message edited by: Babar Qadri ]
14 years ago
JSP
Thanks Jesper, its working.
Thanks Jim for a valuable information.
14 years ago
New to JWS (Java Web Start).

Consider a desktop swing application that is accessing a DB on the same machine.

1- Now can we distribute it via JWS?

2- Can it able to access the DB from some other machine (via any JDBC Driver written in pure java)?

3- Can we say it a distributed application after making it accessable via JWS?

4- And what if the Database is on some other machine and that machine is a part of network but doesn't have a live IP. Can we access that DB from the application running on some other machine(not on the same network) via JWS?

Thanks. Waiting for your helpful response.
14 years ago

Originally posted by Rangarajan Balasubramanian:
How to call a swing from servlet?



What do you mean by saying" call a swing from servlet"?


send the response to swing from servlet


You can use swing applet.
14 years ago
This line of code giving me errors.



I just want to replace single backslash with double. How to do that in a simple way. I have wrote a custom method to do this temporarily.

Please help me out folks.
14 years ago
Ok. I dont have servletContext object in my class, nor my class is a servlet. Now how to read/load the property file from my plain java class by using relative path?

[Edited]
Oops! I didn't say thanks.

Thanks folks for your help.
[ November 29, 2005: Message edited by: Babar Qadri ]
14 years ago
I am having hard time in reading the property file from my plain java class in a web application.

Does relative path, in order to read a file, not work in a web application?

I am able to read that file by defining an absolute path but relative path is not working. I dont want to use servletContext.getRealPath() and then concat that to my relative path. Is there any other way around?

Thanks.
14 years ago

Originally posted by C Broussard:
ps.. one other thing.. struts isn't bloated.. JSF is bloated



Hey, dont say a word to JSF.

I always did with my own fabricated framework. After JSF, I joined the JSF team and still working with JSF. Its good a bit immature but real good, simple, sensible. Its a component based framework and easily digestable. JSF is something really works and has a great future.

By the way, the discussion is going off topic.

I guess you dont know what she is doing. From her previous posts I got to know that she made her own mini web framework based on MVC architecture and going great with that, I hope. So, struts, or something else is meaningless for her right now.

I would also suggest the same, what Adeel and Oswald already suggested.
[ November 28, 2005: Message edited by: Babar Qadri ]
14 years ago
JSP