srinivas srini

Greenhorn
+ Follow
since Feb 03, 2004
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 srinivas srini

i am trying to pass the values from PHP to Java
my php code is like

myphpfile.php



and in Java , i am trying to retrieve the values echoed from php file like this in java code.



in both ways(attempt1 &2 ) on java side I am NOT getting any values passed from php.,
so can someone help me here in finding out a solution?
I also tried by creating a XML kind of string at php side and returning it to java, but even that also was not working,

Thanks in advance
10 years ago
i am trying to pass the values from PHP to Java
my php code is like


and in Java , i am trying to retrieve the values echoed from php file like this in java code.



in both ways(attempt1 &2 ) on java side I am NOT getting any values passed from php.,
so can someone help me here in finding out a solution?
I also tried by creating a XML kind of string at php side and returning it to java, but even that also was not working,

Thanks in advance
10 years ago
Hi ,
I want to return some values from the PHP files to the invoking Java class, and I am invoking the PHP from java like this...



I want to how to set values in the response and know how to capture those values at the java side, a code snippet would be of great help.
Also let me know what are the options i have for passing values from php to java.
I have tried at PHP code by setting to body of httpresponse but it did not worked.

HttpResponse::setBody("somekey", "somevalue");

Thanks in advance


10 years ago
Hi , I need to pass the values that I set in my jspx with <f:validator> using <f: f:attribute> , but i get null values in the validator..here is the details




in faces-config.xml



in validator



In the validator these two values are getting null, can you please let me know if this is the correct approach? and why I am getting null values for v1 and v2 in my validator where I would expect 0 and 1000 to be passed. please help me in solving this issue.
12 years ago
JSF
Hi
I have a validation for email which should allow only , or ;

the validation works fine if I enter the following in the text field
mail1@email.com,,,,,,,mail2@email.com

but the validation does NOT work if I enter the following in the text fields
mail1@email.com;;;;;;;mail2@email.com

the following will work properly
mail1@email.com;mail2@email.com

this is the regular expression that I have written in my validator class



can anyone let me know what's going wrong here? any solution to this would be very much helpful.

Thanks in advance.

12 years ago
JSF
I am facing problem with overlay , the overlay does not open when clicked on the link, after rerendering , the code is copied below, what is that going wrong ?



overlay.jspx



and myBean, the disableOverlay is a variable of type boolean, which if true the link should appear and if false should not,
I confirmed that this variable is behaving properly as expected , but before disabling/hiding the link the overlay appears , after enabling the link and when clicked on it the overlay doesnot appear
what is that I am doing wrong is my approach wrong? any suggestion would be very much helpful to me.

Thanks
13 years ago
JSF
It does not work even with <h: outputText>
13 years ago
JSF
I need to display radio buttons and in the next line after the radio button a short description related to that radio button to be displayed (radio button and label in line 1 and in line2 a short description).
how can I achieve this functionality , i came across SelectItem which accepts 3 parameters , but that did not helped me, any suggestion regardign this would be great
sample code that i am using is
13 years ago
JSF
How can we prefix a string to EL expression for rich:modalpanel , something like this



wintype will be a parameterized value passed from another file and it could be "small" or "big" or "other", so for example if wintype is big then props.height_big value will be picked from props file.

props.height_ and props.width_ are the strings that should be appended.


Thanks in advance.
13 years ago
JSF
I have to pass value for id for a rich:modalPanel dynamically , as of now i am passing it as <ui:param.../> but that is not working.
My requirement is that I should have a overlay template with a specified dimensions and the body(content) of the overlay will change depending on different pages , I do not want to repeat the overlay code in all pages execpt the overlay content part. The code for template part of overlay and the implementation of template is here below. It would be great if you could suggest me a solution on this or any other alternative approach.

Thanks in advance


Template.jspx


using the above template here in myoverlay.jspx




13 years ago
JSF
Hi,
I am trying to read a flat file which has millions of records (more than 50 millions) and save the data read into database.
I am currently making use of collections framework but that is slowing down the processing (by fetching a few lines and parsing those lines and then again start from the point where last ended) so I would like to know if there is any best solution for this..
I am using JDBC for updating DB and a helper class that would read the flat file and update the collections and ultimate pass this collections object to DAO layer for further processing.

any help/suggestion in this regards would great,
Thanks in adv:
14 years ago
I am facing a problem in getting connection to the database(connectiong to SQL SERVER2005) , i am using tomcat 5.5

entry in server.xml (located at <TOMCAT_HOME>\conf)is

<Resource name="jdbc/login" auth="Container"
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;DatabaseName=myDB"
username="myuser" password="mypwd" maxActive="20" maxIdle="10"
maxWait="20"/>

<Realm className="org.apache.catalina.realm.DataSourceRealm"
resourceName="jdbc/login"/>



web.xml

<resource-ref>
<description>myDatasource</description>
<res-ref-name>jdbc/login</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>




java code for lookup





the error that I am getting when I try to launch the application is below, but the Tomcat Server does not give any error when started

lookup done...org.apache.tomcat.dbcp.dbcp.BasicDataSource@c6a26b
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at dao.DatabaseHandler.<init>(DatabaseHandler.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.beans.Beans.instantiate(Unknown Source)
at java.beans.Beans.instantiate(Unknown Source)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:204)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:253)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at services.RegisterFormBean.<init>(RegisterFormBean.java:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.beans.Beans.instantiate(Unknown Source)
at java.beans.Beans.instantiate(Unknown Source)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:204)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:253)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UIOutput.getValue(UIOutput.java:147)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:616)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:539)
at com.sun.faces.taglib.html_basic.InputTextTag.doEndTag(InputTextTag.java:524)
at org.apache.jsp.Register_jsp._jspx_meth_h_005finputText_005f0(Register_jsp.java:384)
at org.apache.jsp.Register_jsp._jspx_meth_h_005fform_005f0(Register_jsp.java:245)
at org.apache.jsp.Register_jsp._jspx_meth_f_005fview_005f0(Register_jsp.java:167)
at org.apache.jsp.Register_jsp._jspService(Register_jsp.java:122)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
... 93 more


The following are the jar files located in <TOMCAT_HOME>\common\lib

  • sqljdbc.jar
    commons-el.jar
    jasper-compiler.jar
    jasper-compiler-jdt.jar
    jasper-runtime.jar
    jsp-api.jar
    naming-factory.jar
    naming-resources.jar
    server-api.jar


  • please let me know if I am missing any jar files or I am I doing anything wrong? I am using jdk1.4



    15 years ago
    Hi ,
    I am facing an error when trying to update the DB (SQL Server 2005), the following error is coming up in the weblogic console .
    but when I try to execute the select query it works properly.
    The following is the error when I try to update the database.


    can any of you let me know if this is a licensing issue or any other issue, this application used to work fine when It was hosted on Tomcat, but when we deployed this application on BEA this error came up.
    15 years ago
    Hi,
    I am using jsf 1.1
    I am trying to populate a simple drop down in MyJsp.jsp with the List values generated in ContactsListBean.java. I am copying the code here for reference.
    when I launch the page (forwarding to this MyJsp.jsp in index.jsp) I am getting this error below. Can anyone help me out what is it that I am doing wrong?? I am unable to trace out what's wrong. I have even tried the same logic with h:selectOneListbox also but I get the same error..
    Any help/advice would be highly appreciated, Thanks in advance.

    org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: ''.
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
    org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


    MyJsp.jsp





    ContactsListBean.java




    faces-config.xml




    web.xml

    15 years ago
    JSF
    HI,
    I am new to JSF and its related technology, I have a requirement which are
    1) The text field should provide type ahead functionality
    2) After the form has been submitted a floating message should appear and stay for some time and disappear slowly
    Can anyone suggest me how to achieve the above mentioned functionalities, I will be using JSF,Ajax.
    Any good information/URL/suggestions/steps with regards to this will be very helpful for me.

    Thanks in advance
    15 years ago
    JSF