Imdad Soomro

Greenhorn
+ Follow
since Jul 15, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Imdad Soomro

Dear All,
I am developing a book store web application where admin uploads the books and those books are displayed on the JSP Page. Admin inserts name, author and physical path of book image. All are stored in db and image is also saved on the location given in physical path. Image is uploaded using Apache commons library.
Problem occurs when records are displayed but image does not although image is physical present in the location. I have used several ways to display the image but none has worked. Although hard coded path displays the image. Following are few ways i have used in JSP file:

<%
ArrayList l = (ArrayList)request.getAttribute("books");
b = (Book)l.get(0);
String path = "C:\\Users\\tom\\workspace\\BooksLibrary\\WebContent\\"+b.getFilePath(); // b.getFilePath() returns "images/err.jpg"
%>
<img src=<%=path %> alt="image" width="100" height="150" />

I have also tried:
<img src="http:\\localhost:8080\BooksLibrary\<%out.println(b.getFilePath());%>" alt="image" width="100" height="150" />

I am using eclipse and images are saved at :
C:\Users\tom\workspace\BooksLibrary\WebContent\images\

Kind response will be appreciated.
Thanks
11 years ago
JSP
Dear folks,
I have a website xyz.com and usually it is opened in browser on desktop systems. I want it to be opened in mobile friendly layout when opened in a mobile phone's browser. For example, you would have noticed that when you open yahoo.com in your phone's browser, it redirects to m.yahoo.com and yahoo does not look same as desktop's browser rather it fits in mobile's screen. How can i achieve this?
Thanks
12 years ago
Dear All,

I have a drop down list in HTML.
e.g.

<select id="rt" name="rt">
<option value="">Good cook</option>
<option value="">Bad Maid</option>
<option value="">Tall Man</option>
<option value="">Short Tree</option>
<option value="">Quick Fox</option>
</select>

I want to search the above drop down menu and go quickly to my desired phrase by typing any of the contained word from phrase like when I type 'coo' the selection should go to 'Good Cook'. Currently it only looks for first word. But i want to search a word and it should see if searched word is contained in any of the phrase.

Quick response will be appreciated.
Thanks
Hi All,
I have used flash animation(.swf) on my JSP Page. It gets displayed correctly but when i change the animation, it displays correctly on some systems and doesn't display correctly on other systems. I don't know what is the problem, may be because of cache but i cleared all the history and cache of browser but still the older animation gets displayed.
Following is the code i am using to display flash animation:

<object class="banner" height="165" width="650" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="/swf/Management.swf" name="movie"/>
<param value="#000000" name="bgcolor"/>
<param value="high" name="quality"/>
<param value="samedomain" name="allowscriptaccess"/>
<param value="Opaque" name="WMode"/>
<embed height="165" width="650" allowscriptaccess="samedomain" wmode="transparent" quality="high" bgcolor="#000000" src="/swf/seniorManagement.swf" name="Products Page - Landing page - Mast Banner" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"/>
<noembed> </noembed>
</object>
Hi,

I am using <fmt:formatDate value="${a.ToDate}" pattern="dd MMMM yyyy" /> date format to display date on my JSP page. Most of the times date is displayed correctly(i.e. 09 February 2011) but sometimes on Internet Explorer it displays date like
(2011-01-25 00:00:00.0). Can you please figure out that what could be the problem.

Thanks.
13 years ago
JSP
My problem is solved Record Store didn't remain persistent in the J2ME emulator but when i installed the application in mobile, the record store remained persistent. The data remained their no matter how many times i close the application and open again. It created .rms file which stores the data. That file was not visible in mobile but when i see my folders in computer, it also shows the .rms file along with other files.
14 years ago
import java.util.Vector;
import javax.microedition.rms.RecordStore;

public class Add {

public void addRec(){
try{
RecordStore recordStore = RecordStore.openRecordStore("words", true );
recordStore.addRecord("a".getBytes(), 0, "Imdad".getBytes().length);
recordStore.addRecord("b".getBytes(), 0, "Asmat".getBytes().length);
recordStore.addRecord("c".getBytes(), 0, "Inam".getBytes().length);
recordStore.addRecord("d".getBytes(), 0, "Ikram".getBytes().length);
recordStore.addRecord("e".getBytes(), 0, "Shafqat".getBytes().length);

recordStore.closeRecordStore();
}catch(Exception e){}

}

public void insert(String str){
try{
RecordStore rs=RecordStore.openRecordStore("words", true);
rs.addRecord(str.getBytes(), 0, str.getBytes().length);
System.out.println("Added user");
}catch(Exception e){}

}

public Vector getRec(){

Vector vt=new Vector();
try{
RecordStore recordst=RecordStore.openRecordStore("words", true);

int u=recordst.getNumRecords();
System.out.print(u);

for(int i=1; i<=recordst.getNumRecords(); i++){
byte br[]=recordst.getRecord(i);
String tr=new String(br);
vt.addElement(tr);
}
}catch(Exception e){}
return vt;
}


}




-------------------------------------------
insert method will be called when user press insert button on a form which has textfield. The value of that text field should store in recordStore. These values should not be deleted when application is closed.
14 years ago
Hi,
I am using RMS for persistent storage for my J2ME application. I store records in record store, they remain there until i close the application. when i launch application again, the data no more exist. can any one tell what could be the problem?
I also want to store records at run time. Like after installing .jar file in my mobile, i launch the application and there is textfield. User enters word in textfield and it should store in record store and should not get deleted when application is closed.
14 years ago
I really don't know. SMS gets received on some mobiles successfully. On some mobiles, it is received but doesn't get displayed and says "Message can not be displayed". On some mobiles it is not received at all.
Following is the code i am using to send the message.

public void send(String no, String mess){
try{

String num=no;
String msg=mess;
String address = "sms://"+num+":50000";
MessageConnection smsconn = null;
smsconn = (MessageConnection) Connector.open(address);
TextMessage txtmessage = (TextMessage) smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
txtmessage.setAddress(address);
txtmessage.setPayloadText(msg);
smsconn.send(txtmessage);

smsconn.close();



}catch(Exception ex){}


}
15 years ago
I have made a J2ME application which sends SMS only to java supported mobile phones. Can anyone tell me what could be the problem? Thanks
15 years ago
Hi,
Can anybody please provide me the code of J2ME application which sends the SMS? I would remain grateful. Thanks.
15 years ago
pleaase provide me that application or code which sends the sms. Thanks.
15 years ago
I need ideas. There are projects like shopping cart, social network, online exam, online library and several others. Please suggest me few projects which are needed these days. Scope of project can be big. Please suggest me few projects from which i can pick one and make for my final year.
15 years ago
Hi People,
I am final year (7th semester) student of BS(Computer Science). I have to make Final Year Project(First of two in final year). I want to make that project on JSP and Servlets. I may also use Struts. Could you please suggest me which web application should i make?
15 years ago
Can i create table(rows and columns) in J2ME in which i want to insert data coming from database? Please tell me how to create table or post code here. Thanks
15 years ago