yerra reddy gatla

Greenhorn
+ Follow
since Apr 25, 2006
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 yerra reddy gatla

Hi All,

In my <code>ejb-jar.xml</code> file have one ejb in that i have local Ejb. How i can spacify in the <code>sun-ejb-jar.xml</code>.when i trying to lookup the local ejb i got name not found exception .where as jboss we have one tag i.e. <local-jndi-name>
like wise we have any tag for refer the local ejb in <code>sun-ejb-jar.xml</code>.

please help me .

Thank you.
Hi Robbin chao,

I have 2 years of work experience in Java/J2ee Technologies...
I am from India..
Can I apply for the above position?
If yes tell me I wil forward my Resume to your mail..

Thanks,
Yerra Reddy
13 years ago
Hi Friends,

can anybody please give the solution for the above question?

Any help would be greatly appreciated....

Regards
GYReddy
14 years ago
Hi Friend

My jsp code looks like...
_______________________________________________________________________
<form name="form1" method="post">
...........
............
<input type="button" name="searchButton" value="Search" onKlick="isEmail(this)" >
........
......
<input disabled size=9 name="addButton" type="button" value="Add" onKlick="addvalidation(this)">
..........
..........
<input disabled size=9 name="updateButton" type="button" value="Update" onKlick="addvalidation(this)" >

</form>
________________________________________________________________________

and in JavaScript file

______________________________________________________________________

function isEmail(button) {

if(validate())
{
alert("gyreddy");
document.forms[0].action = 'vendor'+ button.value +'.do';
document.forms[0].submit();
alert("gyreddy22222");
}
else
{
alert("invalid email");
}
}
________________________________________________________________

In Struts-config.xml
_______________________________________________________________
<form-beans>
<form-bean name="vendorform" type="com.vj.VendorFormBean"/>
</form-beans>
<action-mappings>
<action name="vendorform" path="/vendorSearch" input="VendorForm.jsp" scope="session" type="com.vj.action.VendorAction">
<forward name="success" path="/VendorForm.jsp"/>
</action>
<action name="vendorform" path="/vendorAdd" input="VendorForm.jsp" scope="session" type="com.vj.action.NewVendorAction">
<forward name="success" path="/VendorForm.jsp"/>
</action>
<action name="vendorform" path="/vendorUpdate" input="VendorForm.jsp" scope="session" type="com.vj.action.OldVendorAction">
<forward name="success" path="/VendorForm.jsp"/>
</action>
</action-mappings>
___________________________________________________________________

Actually Just please read my actual task and suggest me.

Please read patiently..

I have a JSP page in which I am searching for a record for the given emailid. For this,I have a search button. When user press SEARCH button by entering the emailid, It should call the javascript and do clientside validation for email.After validation, If a record exists with the given mailid, I am REGENERATING the same form again by displaying the corresponding record values in the textboxes below(name,phoneno,location etc). otherwise I have to give a new form.

After displaying the existing record for given mailid, I have to allow user to UPDATE or DELETE the record.. here I have to call javascript for UPDATE button..

If no record with the given(searching) mailid, I have to give a new form and the user can fill the form and ADD the record. Here I have to call Javascript again for the ADD button..

For this Iam trying to do write different action class for SEARCH,ADD,UPDATE buttons..I know there is other option DISPATCH ACTION,but with dispatch action,I think I can not call javascript.

After getting suggetions from JavaRanch friends I decided to write different action class for each button I have.

The thing is I completed the same task with general Jsp,servlet(web) application

Now I have to do it in struts..

can you please tell me Is this procedure correct? if it is OK tell me what might be the problem??

Thanks in advance for you suggestion

Regards
GYREDDY
14 years ago
HTTP Status 500 - No action instance for path /vendorSearch could be created

--------------------------------------------------------------------------------

type Status report

message No action instance for path /vendorSearch could be created

description The server encountered an internal error (No action instance for path /vendorSearch could be created) that prevented it from fulfilling this request.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28


I am giving action in javascript.

Can anybody please tell me what might be the problem..

Thanks in advance

Regards
GYReddy
14 years ago
In jsp I am writing rs.getXXX() methods. If it is new mail id also it is entering into if condition in the above given java code. and putting some value in session. In jsp, when it comes rs.getXXX() method it is saying

INVALID CURSOR STATE

because no record exists with that mail id. It is unable get the values..

My problem wil be clear if it doesn't enter into if condition in Java program(shown in above query).

Can anybody trace it.?
Hi Everybody

I am writing a jsp to search for the existing record with the email id. If the user enters email and press search button it goes to a servlet whose looks like..

____________________________________________________________________________
String email=req.getParameter("email");
...........
.......
.........
ResultSet rs=stmt1.executeQuery(" select * from vendorinfo where email='"+email+"' ");

if(rs.next())
{
session.setAttribute("RS",rs);
}

RequestDispatcher rd=sctxt.getRequestDispatcher("/VendorForm.jsp");
rd.forward(req,resp);

___________________________________________________________________________

My problem is if the entered email is already there in the databse,It is displaying the form with corresponding values.. no probs with this.

But when we enter a new mail-id,it should not go into the if(rs.next()) and there wil be no result set in the sesion. Then I can display page with blank fileds means new form.......

But it is entering into if condition in the above code even there is no record with the mail-id entered.....

I think query is correct ,I am not getting where the problem is..........

Hope it clarifies my doubt

Can anybody clarify it..

any help will be appreciable..

Regards
gyreddy

Trying to breath java..
Hiee

thanks for your valuable response..

I think you are getting bored with my doubts..

I understood the javascript. As I told you previosly, I was done the same application without struts(normal servlets/jsp application),it's not the problem with javascript..

I am writing button tag in jsp like this

<input type="button" name="searchButton" value="search" onKlick="isEmail(this)" >

and I am writing javascript like this

function isEmail(button) {
if(validate())
{
alert("gyreddy");
document.forms[0].action = 'vendor' + button.value + '.do';
document.forms[0].submit();
alert("gyreddy22222");
}
else
{
alert("invalid email");
}
}

I am writing the action tag in XML like this

<action name="vendorform" path="/vendorsearch" input="VendorSearch.jsp" scope="session" type="com.vj.action.VendorSearchAction">
<forward name="oldvendor" path="/OldVendor.jsp"/>
<forward name="newvendor" path="/NewVendor.jsp"/>
</action>

Now the problem is it is not performing any action..

when i enter the email id and press SEARCH button a new id dispalying like alert and saying that

A SCRIPT ON THIS PAGE IS CAUSING INTERNET EXPLORER TO RUN SLOWLY. IF IT CONTINUES TO RUN YOUR COMPUTER MAY BECOME UNRESPONSIVE.
DO YOU WANT TO ABORT THE SCRIPT?
yes no

If i choose NO my system getting strucked.. not responding and If i choose YES then no action is getting performed..it is displaying the same page with no response..

Can you please tell me what might be the problem.

Thank you once again

Regards
GYReddy
14 years ago
Thank you so much for trying to solve my problem..
I really need your help, as I have no collegues to help..

I tried the above said method(previous post) but still facing problem..

I will tell my doubt clearly.. please SPEND SOME TIME and do reply


I have a JSP page in which I am searching for a record for the given emailid. For this,I have a search button. When user press SEARCH button by entering the emailid, It should call the javascript and do clientside validation for email.After validation, If a record exists with the given mailid, I am REGENERATING the same form again by displaying the corresponding record values in the textboxes below. otherwise I have to give a new form.(For this I am Using If,Else)

After displaying the existing record for given mailid, I have to allow user to UPDATE or DELETE the record.. here I have to call javascript for UPDATE button..

If no record with the given(searching) mailid, I have to give a new form and the user can fill the form and ADD the record. Here I have to call Javascript again for the ADD button..

The thing is I completed the same task with general Jsp,servlet(web) application

Now I have to do it in struts..


Can u please tell me how to write the statements for SEARCH,ADD,UPDATE button by calling javascript..

and how to know the button the user chosen in ACTION class( ADD or UPDATE)


this is my doubt.I think it is clear..

Thank you again...

Regards,
GYReddy
14 years ago
Ok Thank You very much...

But If write like this,Is JavaScript will get called???

<input type="button" value="red" onklick="document.xyz.color.value = this.value;this.form.submit();" >


I have to call Javascript for each button I have..

Can you tell me, Is this method will work incase I have to call javascript validation() for a button..

What is the syntax to call javascript in onClick

Please clarify this doubt finally about this Issue..


Regards
GYReddy
14 years ago
I got some idea now after reading your suggestions(LookupDispatch action).

But actually I have Javascript validation. I think In this situation,This option may not be useful.

When the button is pressed, I am validating javascript. If it returns true then I have to call ADD,UPDATE etc...


Can anybody please clearly tell me how to read the corresponding button value in ACTION class when I have Javascript for each button.

I am not getting any idea...

Please try to give me skeleton code for Action class for this problem..

I am very much thankful to you, If you give me a solution..

banghead:

Regards
GYReddy :
14 years ago
Hie Friends,

I have a doubt...

I am working in a project in struts

I have a form with multiple button like ADD, UPDATE etc

Initially I am giving some path for action attribute in <html:form>.

Then whenever user is clicking the button in the form,I am trying to call different javascript functions in which I am overriding the action attribute of form to different actions.

BUT THE PROBLEM IS

I am not understanding how to know from which button the request came whether it is from ADD or UPDATE etc..

I have to write only one action class or I can write one action class for each button.

How to handle this situation in Action class.How to know which button the user has choosen..

Hope My doubt is understood.....

Plzz let me know if any confusion..

Thanks in advance
GYREDDY
14 years ago
exception

javax.servlet.ServletException: Must specify type attribute if name is specified
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.Vendor_jsp._jspService(Vendor_jsp.java:514)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

javax.servlet.jsp.JspException: Must specify type attribute if name is specified
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:818)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.Vendor_jsp._jspService(Vendor_jsp.java:194)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



Actually I wrote type attribute in struts-config.xml. Still I am getting the exception...

Anybody plzz let me know the reason for this exception..

Regards,
Yerra Reddy
14 years ago
Thank You VidyaSagar

Nice CAPTION


Regards,
Yerra Reddy
14 years ago
Thank You VidyaSagar

Your caption is very good.......

Regards,
Yerra Reddy
14 years ago