|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Hello Friends,
I am using NetBeans 6.5 with glassfish v2 to develop web application (Java EE 5). I have just created my website (Contains HTML, CSS, JSP, Servlet, Simple JAVA Class ) using NetBeans6.5 and glassfish v2 with automatic email for query using JAVA MAIL API. Thanks for NetBeans tools and this Forum to help me to develop such kind of web application. Now my main Question is: I have to give this web application to professional hosting service provider who is not using NetBeans tool to deploy the web application directly by RUN (F6) so what i have to do? Which files and folders that NetBeans creates in NetBeansProject folder ( in MyDocuments) i have to give them to deploy my web application.. |
|
|
|
Re: How to deploy the Whole web Application to external Hosting service provider?
|
|
|
|
Re: How to deploy the Whole web Application to external Hosting service provider?Hi Hardik,
Thats true you need to provide WAR file to the hosting service,long with that you need to create scripts related to database so that the hosting service can easily configure the database necessary for your webapplication. With Regards, Harsha S Angadi http://www.google.com/profiles/harsha.angadi http://www.nammagokak.com/discuss http://nammagokak.ning.com http://bengalooru.ning.com http://nammabengalooru.ning.com On Mon, Oct 26, 2009 at 12:26 AM, omos jigga <omoz4real@...> wrote:
|
|
|
|
How to deploy the Whole web Application to external Hosting service provider?@ omoz4real
Thanks for help.... I designed automatic email sending system to submit the query from my website using the step given in one blog tht i got from somewhere on internet.. After that i made change as per my requirement.. I am attaching that page here for u.. unzip it and open it in MS Word If u need more help contact me on my e-mail: hardik.gcet@... Attachments: http://forums.netbeans.org//files/javamail_for_starters_604.zip |
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Hi Hardik,
Please what mail server host are you using? When i try to implement the application I get an error which says Exception javax.mail.MessagingException: Could not connect to SMTP host: smtp.yahoo.com, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect I was using yahoo as my smtp server and specified it as smtp.yahoo.com? I also have a google account but i havent tried it. If I want to use google , How do i go about using it i.e. specifying the smtp host in the program and do I also need to set it up in the google email account. Thanks in advance. |
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Have u added that jar file (activation.jar and mail.jar) to library as mention in that word file that i sent to you?
I used smtp.gmail.com see below is my code that I used in my web application... and Its working.... tell me if u have still any problem package jMail; import javax.mail.*; import javax.mail.internet.*; import java.util.*; /** * * @author Hardik Shah */ public class Mail { private String to = "hardik.gcet@..."; // use TO address here... private String from = "hardik.gcet@..."; //use ur GMAIL ID here private String message; private String subject="Query from Website"; //subject private String smtpServ = "smtp.gmail.com"; /** * @return the to */ /** * @param smtpServ the smtpServ to set */ public Mail(String str) { message = str; //str contains the message that i wanted to send... } public int sendMail(){ try { Properties props = System.getProperties(); // -- Attaching to default Session, or we could start a new one -- props.put("mail.transport.protocol", "smtp" ); props.put("mail.smtp.starttls.enable","true" ); props.put("mail.smtp.host",smtpServ); props.put("mail.smtp.auth", "true" ); Authenticator auth = new SMTPAuthenticator(); Session session = Session.getInstance(props, auth); // -- Create a new message -- Message msg = new MimeMessage(session); // -- Set the FROM and TO fields -- msg.setFrom(new InternetAddress(from)); msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false)); msg.setSubject(subject); msg.setText(message); // -- Set some other header information -- msg.setHeader("MyMail", "Mr. XYZ" ); msg.setSentDate(new Date()); // -- Send the message -- Transport.send(msg); System.out.println("Message sent to"+to+" OK." ); return 0; } catch (Exception ex) { ex.printStackTrace(); System.out.println("Exception "+ex); return -1; } } private class SMTPAuthenticator extends javax.mail.Authenticator { @Override public PasswordAuthentication getPasswordAuthentication() { String username = "hardik.gcet@..."; // specify your email id here (sender's email id) String password = "password"; // specify your password here return new PasswordAuthentication(username, password); } } } |
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Thanks Hardik,
I have finally got it working. Firstly I changed to googlemail but still gave me same error message so i had to use props.put("mail.smtp.port", "587"); in the code. Thank you very much for your help. |
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Hey Omos jigga,
In my code I am not using that prop.put("mail.smtp.port","487").. then also its working without any error. Can you please explain me How it works?? |
|
|
|
How to deploy the Whole web Application to external Hosting service provider?Hi Hardik,
Firstly, I thought there was a proxy on my system blocking port 25 and so I did a little research on the internet. From the research I found out that google referred using port 465 0r 587 for SMTP. The website can be found here. http://mail.google.com/support/bin/answer.py?hl=en&answer=13287 you could refer to it for more understanding. Thanks Hardik. |
|
|
|
Re: How to deploy the Whole web Application to external Hosting service provider?
|
| Free embeddable forum powered by Nabble | Forum Help |