Win a copy of Terraform in Action this week in the Cloud forum!

Gerenne Vives

Ranch Hand
+ Follow
since Feb 05, 2005
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 Gerenne Vives

Hi all,


I have a problem with the redirect url in tomcat, I have connected the apache with tomcat, now, when I write in the url www.domain.com and to appear tomcat server page, but I want that when I write www.domain.com, appear my app that the url is www.domain.com/app.

I have the following configuration:

worker.properties:


httpd-jk.conf:



httpd.conf:



Server.xml (this I don't know if is necesary):



Could you help me?, please.

Thanks in advance.
8 years ago
I've solved this problem.

In the js:

Hello Bear,

Sorry if I've bothered you... but my problem is with css, and javascript. I think that this is the correct forum, may be the title is confused....anyway, the break link that appear in the first post is the tag img with the root of image:



Thanks in advance.
Hi all,

I have a problem with google chrome, I have a gif that I want show whe I'm loading a page, in firefox there are'nt any problem, and the gif is showed correctly, but in chrome there are nothing, the code is:

In the jsp:



In css:



And in th js:



Thanks in advance!!
Hi Tim,

Thanks for your answer, my problem is solved, there was a problem with the paths...

But now, my problem is with the session objects, I store the user in a object session, but now with the redirect of url, I lose the value stored in the session object:

private HttpServletRequest request;
request = ServletActionContext.getRequest();
request.getSession().setAttribute("user", user);

Thanks in advance!
8 years ago
Hi all,

I have a Java web app running in a Tomcat Server (8080 PORT), my server is linux and it's runing in the 80 port. I have configured the virtual host in apache2, because I want redirect the url, when I write www.domain.com go to www.domain.com:8080/app, my virtual host is:

<VirtualHost *:80>
ServerAdmin xxx@gmail.com
ServerName domain.es
ServerAlias www.domain.es

ProxyRequests off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

<Location />
ProxyPass http://www.domain.es:8080/app/
ProxyPassReverse http://www.domain.es:8080/app/
</Location>
DocumentRoot /var/www
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

When I write the domain, the app is loaded, but the problem is that I lose the js, the message that appear is:

"NetworkError: 404 Not Found - http://www.domain.es/app/js/jquery-1.7.1.js"

Please, Could you help me?

Thanks in advance!
8 years ago
Hi all!!

I have a application web with this address http://x.x.x.x:8080/NameApp, and for other hand I have a domain www.namedomain.es, the application runs in apache server, and is installed in Ubuntu server. I want redirect the url, when I will write www.namedomain.es, I want go to http://x.x.x.x:8080/NameApp.

But I don't know the files that I must modify...

Please, I need help!!
9 years ago
Hi all,

I have a file html, and this file is converted to XML with Tidy because I want read this document with DOM, but my problem is that this files contain css code too:

<styles>
......
......
</styles>

<body>
...
...
</body>

There are any form to extract the style code?

Thanks in advance!
Hi,

But I am using the pluggin...

Another suggestion?

Thanks in advance.

9 years ago
Hi all,

I have got a problem with json and struts2, I'm try to use json and in my action I have the following code:

@Action(value = "view-new-graf",
results = {
@Result(name = "success", type="json")
}
)
public String obtainData(){

return "success";
}


And my app launch this error:

java.lang.NullPointerException
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
at org.apache.jsp.WEB_002dINF.jsp.errores.error500_jsp._jspx_meth_s_005ftext_005f0(error500_jsp.java:104)
at org.apache.jsp.WEB_002dINF.jsp.errores.error500_jsp._jspService(error500_jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:473)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:453)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:324)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:191)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
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)
17-jul-2012 20:13:12 org.apache.catalina.core.StandardHostValve custom
GRAVE: Exception Processing ErrorPage[errorCode=500, location=/WEB-INF/jsp/errores/error500.jsp]
org.apache.jasper.JasperException: java.lang.NullPointerException
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:473)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:453)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:324)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:191)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
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)
Caused by: java.lang.NullPointerException
at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
at org.apache.jsp.WEB_002dINF.jsp.errores.error500_jsp._jspx_meth_s_005ftext_005f0(error500_jsp.java:104)
at org.apache.jsp.WEB_002dINF.jsp.errores.error500_jsp._jspService(error500_jsp.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
... 23 more


Any suggestion?

Thanks in advance!!
9 years ago
I solved this problem. The line (session.close), must to be deleted:



@SuppressWarnings("unchecked")
public T load(ID id) {
try{
session=this.getHibernateTemplate();
session.beginTransaction();
T returnValue = (T) session.load(this.domainClass, id);

session.clear();

return returnValue;

}catch (RuntimeException re) {
log.error("find list failed", re);
throw re;
}

}

Thanks.
Hi all,

Finally I used dynDateTime, and it's working perfectly.

Thanks for all!!
9 years ago
Hi all,

I have GenericHibernateDao, and I'm working with differents methods, save, listALL, and it's work fine, but in the case of the load method:

@SuppressWarnings("unchecked")
public T load(ID id) {
try{
session=this.getHibernateTemplate();
session.beginTransaction();
T returnValue = (T) session.load(this.domainClass, id);

session.clear();

return returnValue;

}catch (RuntimeException re) {
log.error("find list failed", re);
throw re;
}finally{
if(session != null){
try{
session.close();
} catch(HibernateException e){/*no hacemos nada*/};
}
}
}

Don't throw error, but don't return any object and the id is in the database.

Thanks for all!!
Hi all,

I'm try connect at Exchange Server 2010 with Javamail for to read messages, but when try connect appear the following error:

Unrecognized SSL message, plaintext connection?
javax.mail.MessagingException: Unrecognized SSL message, plaintext connection?;
nested exception is:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:670)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at conseritmailbatch.ConseritMailBatch.main(ConseritMailBatch.java:41)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:548)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:352)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:207)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:113)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:111)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:637)

My properties:

mail.imap.starttls.enable=false
mail.imap.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.imap.socketFactory.fallback=false
javax.net.debug=ssl
mail.imap.socketFactory.port=993
mail.imap.port=993


My code:

Session sesion = Session.getDefaultInstance(properties);
Store store=sesion.getStore("imap");
store.connect("X.X.X.X","X@X.com", "1234");

In the line "store.connect("X.X.X.X","X@X.com", "1234")" throws the exception.

Thanks in advance.

Hi all!

I have a problem with datetimerpicker I have a jsp page with this code:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<sx:head/>

</head>
<body>
<sx:datetimepicker name="today" displayFormat="dd-MMM-yyyy HH:mm:ss"/>
</body>
</html>

This work fine and show the date and time correctly, but this jsp is contained in a div, the div mut be reloaded with ajax, the problem is that when I reloaded the page, the datetimepicker dissapear.

Thanks for all!!
9 years ago