nayan rami

Ranch Hand
+ Follow
since Dec 28, 2010
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
10
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by nayan rami

Hello Dear Friends

i have facing problem while using the in struts file uploading code

here it is giving me an error like - argument type mismatch

can any one tel me what was the problem with the code


ActionForm Code : --

package com.employer.generateResume;



import org.apache.struts.action.*;
import org.apache.struts.upload.FormFile;



/**
* @author Nayan Rami
*/

/**
* Form bean for Struts File Upload.
*
*/
public class GenerateResumeForm extends ActionForm
{
private FormFile theFile;

/**
* @return Returns the theFile.
*/
public FormFile getTheFile() {
return theFile;
}
/**
* @param theFile The FormFile to set.
*/
public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}


private String candidateName;
private String designation;
private String experiance;
private String currentSalary;
private String expectedSalary;
private String readyToRelocate;
private String education;
private String keySkill;
private String jobDesc;

public String getCandidateName() {
return candidateName;
}
public void setCandidateName(String candidateName) {
this.candidateName = candidateName;
}
public String getDesignation() {
return designation;
}
public void setDesignation(String designation) {
this.designation = designation;
}
public String getExperiance() {
return experiance;
}
public void setExperiance(String experiance) {
this.experiance = experiance;
}
public String getCurrentSalary() {
return currentSalary;
}
public void setCurrentSalary(String currentSalary) {
this.currentSalary = currentSalary;
}
public String getExpectedSalary() {
return expectedSalary;
}
public void setExpectedSalary(String expectedSalary) {
this.expectedSalary = expectedSalary;
}
public String getReadyToRelocate() {
return readyToRelocate;
}
public void setReadyToRelocate(String readyToRelocate) {
this.readyToRelocate = readyToRelocate;
}
public String getEducation() {
return education;
}
public void setEducation(String education) {
this.education = education;
}
public String getKeySkill() {
return keySkill;
}
public void setKeySkill(String keySkill) {
this.keySkill = keySkill;
}
public String getJobDesc() {
return jobDesc;
}
public void setJobDesc(String jobDesc) {
this.jobDesc = jobDesc;
}
}


My Form ActionClass Code :-


package com.employer.generateResume;

import java.io.File;
import java.io.InputStream;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;

public class GenerateResumeAction extends Action {

private String name;
private String designation;
private String experiance;
private String currentSalary;
private String expectedSalary;
private String relocate;
private String education;
private String keySkill;
private FormFile file;
private String jobDescription;

public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse responese)throws Exception{

GenerateResumeForm generateResume = (GenerateResumeForm) form;


System.out.println("Hello Dear ");
return null;
}

}


And Jsp For Form


<html:form action="/GenResume">
<table border="1">
<tr>
<td>Name Of Candidate</td>
<td><html:text name="GenerateResumeForm" size="35" property="candidateName"/></td>
</tr>
<tr>
<td>Candidate Current Designation <br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="designation"/></td>
</tr>
<tr>
<td>Candidate Total Experiance<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="experiance"/></td>
</tr>
<tr>
<td>Current Salary<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="currentSalary"/></td>
</tr>
<tr>
<td>Excpected Salary<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="expectedSalary"/></td>
</tr>
<tr>
<td>Ready To Relocate<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="readyToRelocate"/></td>
</tr>
<tr>
<td>Education<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="education"/></td>

</tr>
<tr>
<td>Key Skill In Field<br /></td>
<td><html:text name="GenerateResumeForm" size="35" property="keySkill"/></td>
</tr>
<tr>
<td>Attach Resume<br /></td>
<td><html:file name="GenerateResumeForm" property="theFile"/></td>
</tr>
<tr>
<td>Job Description<br /></td>
<td><html:textarea name="GenerateResumeForm" cols="27" rows="5" property="jobDesc"/></td>
</tr>
<tr>
<td><br /></td>
<td><html:submit/></td>
</tr>
</table>
</html:form>



10 years ago
Hello
i have problem with the file uploading in struts it will give and error like -argument type mismatch this is my Action Form


ActionForm


package com.hrstrides.employer.generateResume;

import org.apache.struts.upload.FormFile;

public class GenerateResumeForm extends org.apache.struts.action.ActionForm {

/**
*
*/
private static final long serialVersionUID = 6895513074470145219L;

private String designation;
private String experiance;
private String jobDesc;
private String currentSalary;
private String expectedSalary;

public String getDesignation() {
return designation;
}
public void setDesignation(String designation) {
this.designation = designation;
}
public String getExperiance() {
return experiance;
}
public void setExperiance(String experiance) {
this.experiance = experiance;
}
public String getJobDesc() {
return jobDesc;
}
public void setJobDesc(String jobDesc) {
this.jobDesc = jobDesc;
}
public String getCurrentSalary() {
return currentSalary;
}
public void setCurrentSalary(String currentSalary) {
this.currentSalary = currentSalary;
}
public String getExpectedSalary() {
return expectedSalary;
}
public void setExpectedSalary(String expectedSalary) {
this.expectedSalary = expectedSalary;
}
public String getReadyToRelocate() {
return readyToRelocate;
}
public void setReadyToRelocate(String readyToRelocate) {
this.readyToRelocate = readyToRelocate;
}
public String getEducation() {
return education;
}
public void setEducation(String education) {
this.education = education;
}
public String getKeySkill() {
return keySkill;
}
public void setKeySkill(String keySkill) {
this.keySkill = keySkill;
}
public FormFile getAttachFile() {
return attachFile;
}
public void setAttachFile(FormFile attachFile) {
this.attachFile = attachFile;
}
public String getCandidateName() {
return candidateName;
}
public void setCandidateName(String candidateName) {
this.candidateName = candidateName;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
private String readyToRelocate;
private String education;
private String keySkill;
private FormFile attachFile;
private String candidateName;



}



Action Form


package com.hrstrides.employer.generateResume;

import java.io.File;
import java.io.InputStream;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;

public class GenerateResumeAction extends Action {

private String name;
private String designation;
private String experiance;
private String currentSalary;
private String expectedSalary;
private String relocate;
private String education;
private String keySkill;
private FormFile file;
private String jobDescription;

public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse responese)throws Exception{

GenerateResumeForm generateResume = (GenerateResumeForm) form;

name = generateResume.getCandidateName();
designation = generateResume.getDesignation();
experiance = generateResume.getExperiance();
currentSalary = generateResume.getCurrentSalary();
expectedSalary = generateResume.getExpectedSalary();
relocate = generateResume.getReadyToRelocate();
education = generateResume.getEducation();
keySkill = generateResume.getKeySkill();


jobDescription = generateResume.getJobDesc();

FormFile myFile = generateResume.getAttachFile();
System.out.println(myFile.getFileSize());

GenereateResumeDAO geneResume = new GenereateResumeDAO(name,designation,experiance,
currentSalary,expectedSalary,relocate,education,keySkill,jobDescription);
if (geneResume.isGenerated()){
System.out.println("True");
}else{
System.out.println("False");
}

return null;
}

}



10 years ago
hello

how to read character data from the tiff (scan) image file. how to read the text data from any image format file

thanks
10 years ago

Ulf Dittmer wrote:Why would you need or want to install JMF? That means opening a whole can of worms. Why not make it part of the application?



yes

you are write but i am using application using jnlp and my whole application downloaded from server side
and and using video capture

and i am using quicktime for java and jmf for that

i previously i have to chek that jmf is install or not and if it is not install so i have to install it silently

so i need some help
10 years ago

Ulf Dittmer wrote:You can detect whether JMF is available by trying to access one of its classes via Class.forName(...).

What do you mean by "JMF plugin"? JMF is a library for which plugins are available, but it is not a plugin itself. You can test for the presence of any particular JMF plugin the same way you test for JMF's presence.

Silently installing anything on a computer is nasty; don't do that. But it's probably unnecessary, too; what kind of application is this - desktop (using Swing), applet/JNLP, something else?



thanks for your reply

now i am creating application swing and JNLP and i have to detect that Wether the JMF is install in System OR not if it is not install in the system so install JMF in System silently

can you please give me some idea abut that
10 years ago
Hello Friends

How To Detect JMF In Operating System.And How To Detect JMF Plugin In The OS .And if the JMF plugin is not installed in the system so how to install JMF plugin silently in the os with appropreate os


thanks
10 years ago
hello friends


can any one provide me code for play audio in loop in java application not in applet

i need this code urgently

thanks
10 years ago
thanks

for your and help and your value able time thanks so much
10 years ago
because my client side this application works fine and my side it create problem.
so i think like that.
10 years ago
no document is provided to me so and some one say that application working in his system so when i stated application it will give me error like that and after that it will give a error message in swing like it will not detect webcam an headphone but will work fine in my system i will check it on different platform also that

i think that webcam or microphone is not suppoted with jmf

i it possible?
10 years ago
can you please explain me an error ..

i don't know about it more....

thanks for your reply....
10 years ago


when i am trying to use my head phone and webcam using jmf it will give me error like
how to resloved it

is there any problem with os or webcam is not supported


java.io.IOException: mark/reset not supported
at java.util.zip.InflaterInputStream.reset(Unknown Source)
at com.ici.media.MediaPlayer$PanelPrefetchImpl.call(MediaPlayer.java:498)
at com.ici.media.MediaPlayer$PanelPrefetchImpl.call(MediaPlayer.java:483)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


urgently

thanks
10 years ago

Rob Spoor wrote:You should start by never ever using any class in a package that starts with com.sun, sun or sunw. That includes sun.audio.AudioStream. The reason is that these classes are undocumented, and can be changed or even dropped in any next release of Java. Unfortunately, because programmers do not heed this warning, there are applications that stop working all of a sudden when a new Java version is installed. I myself found an application that only worked with Java 1.4.2_08. Even my 1.4.2_10 (at the time) Java installation refused to run the program. The cause, as indicated by the stack trace, as the use of one of these undocumented classes.

JMF is usually the way to go when wanting to play music and/or video in Java, but I found JLayer to be a little bit more intuitive to use.




how can in loop mp3 or any other file format using JMF

i have to use some specific file format so and using in application not in applet
help me
10 years ago
hello Friends

how to use audio file to play in loop in java swing application


i am using this code but not give me a result and
is there any specific format used for that?




thanks
10 years ago
hello friends

how to detect jmf plugin for OS and how to silently install OS specific plugin in System

help me
10 years ago