[opencms-dev] something wierd with forms and jsp

Aleksandra aleksandra84 at mail.net.mk
Thu Aug 25 15:01:30 CEST 2005


ok,this is my jsp
<%@ page import="org.opencms.mail.CmsSimpleMail" %>
<%@ page import="org.opencms.jsp.CmsJspBean" %>
<%@ page import="org.opencms.jsp.*" %>
<%@ page import="org.opencms.file.*" %>
<%@ page import="org.opencms.flex.*" %>
<%@ page import="javax.mail.*" %>

<%
	org.opencms.mail.CmsSimpleMail sm = new
org.opencms.mail.CmsSimpleMail();
	org.opencms.jsp.CmsJspActionElement cmsjsp = new
org.opencms.jsp.CmsJspActionElement(pageContext, request,
response);
        org.opencms.file.CmsObject cmsObject =
cmsjsp.getCmsObject();
try{
	String to = "aleksandra at eteg.com.br";
	String email = request.getParameter("email");
	String nome = request.getParameter("nome");
	String assunto = request.getParameter("assunto");
	String mensagem = request.getParameter("mensagem");
	sm.setMsg("email :" + email +"\n" + "nome :"+nome+"\n" +
"mensagem :"+mensagem);
	sm.addTo(to);
	sm.setFrom("*********");
	sm.setSubject(assunto);	
        if (request.getParameter("email")!=null &
 request.getParameter("mensagem")!=null){
	sm.send();
	out.println("<td class=\"content_title\"
valign=\"top\">Sua mensagem foi enviada!</td>");
	}
	else 	out.println(new java.util.Date());
}
catch (MessagingException e) {
	out.println("<td class=\"content_title\"
valign=\"top\">Email nao pode ser enviado!</td>");
}

%>

and this offline it works well but online he is not reading
the parameters email,....all from the forms but he is
reaching my jsp because he is executing out.println(new
java.util.Date());.
So request.getParameter("email") and the other ones are not
working !

I have test code before like this 
<%
	java.util.Enumeration parms = request.getParameterNames();
        while (parms.hasMoreElements()){
            String name = (String) parms.nextElement();
            out.print("<br/> " + name + " : " +
request.getParameter(name));
        }
%>

and this is not working,get it,online i mean

Thanks
=========================================================
Zastedi 70% na razgovorite so stranstvo.
15 denari minuta za bilo koja zemja vo svetot.
http://www.ozone.net.mk
info telefon (02)3100.800 24h na den
=========================================================



More information about the opencms-dev mailing list