Varsha Goswami

Greenhorn
+ Follow
since Jul 20, 2009
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 Varsha Goswami

I don't know how to apply Javascript validation on this..Currently, I am using server side validations..
12 years ago
Thanks for your immediate response.

I know error will come for mandatory fields, but the selection list box has values selected in it which is not an error. After error am able to retain all the inserted values in the textboxes or dropdown, but only in case of selection box am not able to retain those values.

12 years ago
Another attachment is here... this is the case when an error comes up when I leave all the other mandatory fields as blank and select only the names from selection box.
12 years ago
Hi,

I had developed an application having a selection box <html:select multiple="true"> with multiple="true" in it as it contains multiple names. Whenever I am selecting a number of names from that selection box then in case of any error, those selection values cannot be retained. But if they are saved successfully then they can be retained.

Attached here are two screenshots:- one in case of selection and other in case of an error.

I need to fix this problem asap.

Please somebody help me....

12 years ago
I mean to say that I want to send the jsp in html form attached in a mail ... so that if a user is looking at a screen and on click of an email option he can mail that screen to any id...

code for emailstuff is here...

if(null!=printExport && printExport.equalsIgnoreCase("email")){
String emailTemplateJSP = "/jsp/propertyMgmt/propertylandingpageEmail.jsp";
RequestDispatcher rd = servlet.getServletContext().getRequestDispatcher(emailTemplateJSP);
rd.include(request, response);

// Get the generated email from the request attribute
String emailStuff = (String)request.getAttribute("test");
12 years ago
JSP
I need to send a jsp page as an attachment in mail.
I am using this part in code....
But using this I am getting the entire html script in the sent mail...
Can anybody help me out...??

Properties props = System.getProperties();
String mailServer = "mail.abc.com";

props.put("mail.smtp.host", mailServer);

Logger logger = Logger.getLogger(PropertyDashboardAction.class);

// Get a mail session
Session session1 = Session.getDefaultInstance(props, null);

String from = "varsha@abc.com";
String to = "varsha@abc.com";
// Define a new mail message
Message message = new MimeMessage(session1);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject("Test mail");

// Create a message part to represent the body text
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(emailStuff);

//use a MimeMultipart as we need to handle the file attachments
Multipart multipart = new MimeMultipart();

//add the message body to the mime message
multipart.addBodyPart(messageBodyPart);

// add any file attachments to the message
//addAtachments(attachments, multipart);

// Put all message parts in the message
message.setContent(multipart);

// Send the message
Transport.send(message);
12 years ago
JSP
Yes thats ok... but how to get the message body properly is my question? I want my reports to be displayed as it is in the message body!!!
12 years ago
JSP
Yes i tried that... but it is not working as we want....a mail opens up having id that we have mentioned in the link.... but my report is not viewable in the message body of the outlook!!!
12 years ago
JSP
Oh Sorry ... will consider your point from now onwards...

Actually I want to compose mail using outlook only...and then user can send it to any id.
12 years ago
JSP
I want that on click of an e-mail icon in jsp.... my outlook express compose mail option should get opened... and that mail should contain data which we can see in the jsp page.... For ex: if my jsp page contains a table having data then on click of e-mail icon that table should be displayed as it is in outlook mailing screen....i dont want that table in jsp page to be attached in the mail as a screenshot....
12 years ago
JSP
In my java application I have many screens with data in tables (as reports) and graphs etc. There is an e-mail button. On click of this e-mail button i want the facility to e-mail that screen or that report. If anybody have an idea in this please help me out!!
12 years ago
JSP
Hey,

I tried this code but its not working... could you please check if this is the right way to code.....or there is something else to be done in this case....!!!

<field property="startDate" depends="required,date,validwhen">
<var>
<var-name>datePatternStrict</var-name>
<var-value>MM/dd/yyyy</var-value>
</var>
<arg key="error.blank.startdate"/>
<var>
<var-name>test</var-name>
<var-value>((endDate > startDate) or (*this* == null))</var-value>
</var>
</field>

<field property="endDate" depends="required,date,validwhen">
<var>
<var-name>datePatternStrict</var-name>
<var-value>MM/dd/yyyy</var-value>
</var>
<arg key="error.blank.enddate"/>
<var>
<var-name>test</var-name>
<var-value>((endDate > startDate) or (*this* == null))</var-value>
</var>
</field>
12 years ago
Hey thanks a lot for your immediate reply...will check into it...

I use green coz its one of my favourite colors.......


Thanks,
12 years ago
I have two date fields: Start date and End date and i want my start date to be lesser than end date. I want this to be done using validation.xml in struts. Can any body help me out in this!!!???!!!
12 years ago