S Bhanu

Greenhorn
+ Follow
since Feb 28, 2005
Merit badge: grant badges
For More
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 S Bhanu

hey,

does anybody know what error code is thrown?

Thanks,
Bhanu
Hi,

I am using setQueryTimeout() on prepared statement while calling a stored procedure using jdbc.
I am unable to see this working.

I did some googling and found out that this method is not yet supported. I would appreciate if anybody has used this and is willing to share the code.

As per jdbc documentation this function should throw SQLException.
Do anybody know what is the error code I should expect in case call times out.

Thanks,
Bhanu
Calling in constructor seems a good option. Thanks

For the second solution could you please elaborate?
As I have multiple calls to the colaPage in the same screen
...
...
#{colaPage.cola.name}
#{colaPage.cola.taste}
#{colaPage.cola.temperatue}
...
How can this be resolved into display and update page displays?

Regards,
S Bhanu
[ May 02, 2008: Message edited by: S Bhanu ]
15 years ago
JSF
Hello,

I am using JSF in my application. Though the application works fine, I have some doubts about the way it's implemented.

The backing bean code looks like this:




In my xhtml page I get my attributes by using
#{colaPage.cola.name}
#{colaPage.cola.taste}
#{colaPage.cola.temperatue}
...
..

Every time I call getCola() from the page, it calls cola list, selects best cola, etc, etc.

e.g. #{colaPage.cola.name} would transform to colaPage.getCola().getName()
similarly the other calls will be like that.

Can I modify my code so that getColaList() and selectBestCola() are called only once and not at every getCola() call from the page?

Thanks for your suggestions
S Bhanu
[ April 30, 2008: Message edited by: S Bhanu ]
15 years ago
JSF
Thanks for your inputs. I am using HttpSession.getMaxInactiveInterval() now. Any further suggestions are welcome.
17 years ago
Dear Ben,
I respect JavaRanch's naming policy and have edited my profile accordingly. I do not know why the chages are not reflecting in my posts!
Regards

Originally posted by Ben Souther:
Bshar,

Our naming policy is not optional.
Please use the link provided by Merrill to fix your screenname.

Accounts with invalid names are subject to deletion.

17 years ago
Thanks, Ben.

I looked into your solution. It works fine

Is it possible to achieve this functionality through some configuration i.e. by putting into an xml file or something so that it can be changed by support team as well. I would not like the jars to be recompiled everytime I make such a change. Any ssuggestions?

Thank you!
17 years ago
We are facing a problem with session timeout. As per requirement we need to have different timeout values for different pages. i.e. to say 40 min for page A and 45 min for page B. Is there any way this configuration can be done. We are using Weblogic9/Java5/Struts1.1.

If you feel this is not the right forum for the question, please let me know.

Thanks!
Bshar
[ August 11, 2006: Message edited by: Bshar ]
17 years ago
Can somebody explain what is worng with putting tiles inside html:form tag?
18 years ago
<image type=submit..> submits the form once clicked. No need of javascript!! However, if you must use javascript try using <button> (not <input type="button"> tag...and put image in the body.
[ March 02, 2006: Message edited by: Bshar ]
18 years ago
I am using multiple struts tiles in html:form and the form is getting submitted more than once. See this:

javax.servlet.jsp.JspException: Exception forwarding for name error: javax.servlet.ServletException: Exception forwarding f
t.ServletException: Exception forwarding for name error: javax.servlet.ServletException: Exception forwarding for name erro
eption: Exception forwarding for name error: javax.servlet.ServletException: Exception forwarding for name error: javax.ser
ption forwarding for name error: javax.servlet.ServletException: Exception forwarding for name error: javax.servlet.Servlet
ding for name error: javax.servlet.ServletException: Exception forwarding for name error: javax.servlet.ServletException: E
e error: javax.servlet.ServletException: Exception forwarding for name error: javax.servlet.ServletException: Exception for
a.lang.IllegalStateException: Cannot forward a response that is already committed
at org.apache.struts.taglib.logic.ForwardTag.doForward(ForwardTag.java:127)
at org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:107)
at jsp_servlet._layout._jsp.__errors._jspService(__errors.java:166)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)


the code looks like this:
Layout.jsp
<html:form action="<%=request.getAttribute("fwdTo").toString() %>">
<tiles:insert name="header"/>
<tiles:insert name="navig"/>
<tiles:insert name="body"/>
<tiles:insert name="footer"/>
</html:html>

I need to mandatorily put all the elements in HTML in the form to submit. Is there any restriction in putting multiple tiles in html:form ?
Please note that I am using filer in the web.xml

[ March 02, 2006: Message edited by: Bshar ]
[ March 06, 2006: Message edited by: Bshar ]
18 years ago
is it possible ?
18 years ago
can u send the code snippet u r using in html?
18 years ago
I have the following code in the form bean:

private String name = "";

public String getName(String nam) {
if(nam.equals("abc") {
//do something that cannot be done in JSP
return "noname"; //conditional return
}
}

public void setName(String str) {
name = str;
}

and I need to access the name from jsp using bean:write. I am using:

<bean:write name="bean" property="name" />

How can I pass parameter to the bean to check for the condition?
I need to implement this in jsp ONLY.

Thanks,
Bhanu
18 years ago
I cleared my SCJP2 exam in 2002. The certificate is no more valid as it had a 2 yr validity period. Can I still go ahead and apply for SCWCD(without writing SCJP again)?