Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

anwar pasha

Greenhorn
+ Follow
since Jun 10, 2008
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 anwar pasha

i am using mysql database and jsp as a connection code.
i am unable to connect database.
Exception: Communications link failure

Last packet sent to the server was 0 ms ago.

.
.
.
.

can you please help me out ......
I am doing simple servlet and jdbc code to insert the data into database
when trying to insert the data i am getting below error ,
i have given mysql-connector.jar file in classpath still its comming the error
can help me please..........


java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at DbCon.getConnection(DbCon.java:12)
at HelloAleemExample.doGet(HelloAleemExample.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at

.
..
.
.
.
When Refresh the page on banner,getting the ip address before the clicking or impression
-------------------------
Object reIp= remoteAddress(request);
String remoteIPAddress = reIp.toString();



public static InetAddress remoteAddress(HttpServletRequest request)throws UnknownHostException {
if (request.getHeader("x-forwarded-for") != null) {
return InetAddress.getByName(request.getHeader("x-forwarded-for"));
}
return InetAddress.getByName(request.getRemoteAddr());
}
11 years ago
JSF
iam doing multiple upload using this code
i have number of Browse button and one Submit button
when am browse the images then click on submit all images must be store in server.

Ex:

<t:input File Upload id="file" value="#{bannerdetails_backing.uploadFile}" />
<t:input File Upload id="file" value="#{bannerdetails_backing.uploadFile}" /> ...
11 years ago
JSF
if i use indivisible commanlink am not getting param value ,if am using in datatable tag its working fine
ex:<t:dataTable>
<t:column>
<h:commandLink action="#{backing.updateBannerImage}" id="programLink3">
<f:param name="toolId" id="toolId" value="2222"/ >
</h:commandLink>

<t:dataTable>








11 years ago
JSF
how can i pass the value using java script below example:

when am clicking on button i have to pass the toolIds value to backing bean.

t:commandButton id="programLink3" value="" action=#{backing.updateBannerImage}
/
f:param name="toolId" value="2222"/
/t:commandButton


can you send the sample code for this.
11 years ago
JSF

When we clicking on commandButton pass the particular value to backing bean without using
<t:dataTable> tags


Below is working when we use tata table.
<t:datatable>
<f:facet name="header">
<h:outputText value="Banner" />
</f:facet>

<c:column>
<t:commandButton id="programLink3" value="" styleClass="Activefeed_button" action="#{bannerdetails_backing.updateBannerImage}"onmouseover ="this.className ='Activefeed_buttonhov'" onmouseout ="this.className ='Activefeed_button'" >
<f:param name="toolId" value="#{banner.toolId}"/>
<t:updateActionListener property="#{bannerdetails_backing.bannerSession.banner}" value="#{banner}" />
</t:commandButton>
<c:column>
</t:datatable>


But
Below code using without datatable tag ? its not working.
ex:

<t:commandButton id="programLink3" value="" styleClass="Activefeed_button" action="#{bannerdetails_backing.updateBannerImage}"onmouseover ="this.className ='Activefeed_buttonhov'" onmouseout ="this.className ='Activefeed_button'" >
<f:param name="toolId" value="#{banner.toolId}"/>
<t:updateActionListener property="#{bannerdetails_backing.bannerSession.banner}" value="#{banner}" />
</t:commandButton>


11 years ago
JSF
When we brows the image it will call the javascript and call command button action automatically.

<t:inputFileUpload id="file" value="#{banner_backing.uploadFile}" onblur="return myFormSubmit();" />


<h:commandButton value="Upload" id="up" action="#{banner_backing.updateBannerCheckedUpload}" />



function myFormSubmit() {

var formAction = document.UploadForm.action;
document.UploadForm.submit();
}
11 years ago
JSF
Hi

can you send the sample code for multiple upload images.
11 years ago
JSF
Exception: java.io.IOException: Stream closed error

when i am clicking report button i will get report details.
when i keep pressing report button we getting streamClosed Exception
we are using springs and jsf
Using this working fine..........

<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.home.dir}/log/server.log"/>
<param name="Append" value="true"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{${DatePattern}} %p %c - %m%n %x"/>
</layout>
</appender>