Venkat Babu

Ranch Hand
+ Follow
since Jan 12, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Venkat Babu

I added this line:

<currentVersion>1.0</currentVersion>

I am still having the same problem.
15 years ago
Hi,

I am new to Maven and trying to run this goal:

maven pom:validate

I am getting the following error


pom:validate:
[java] project.xml:10:15: error: cvc-complex-type.2.4.a: Invalid content starting with element 'artifactId'. One o
f '{"":currentVersion}' is expected.

I am not sure what is the issue. Please help.

Few lines of project.xml:

project>
<pomVersion>3</pomVersion>
<id>AQJMSTest</id>
<name>aq</name>
<groupId>aq</groupId>
<artifactId>AQJMSTest</artifactId>
.
.
.


Thanks,
Ven
15 years ago
Hello,

Please help.

I have drop down in the jsp and i am not seeing the values in the drop box but I am able to print the values using bean:write,

here's the code:

// this line prints the value
<bean:write name="form" property="action1"/>

//The following lines using struts tag libs does not show the selected value in the drop down, shows only the default values in the list
<td >

<html:select name="form" property="action1" disabled="true">

<html:optionsCollection name="form" property="actionList" label="label" value="value" />

</html:select>

</td>

Please let me know if I am doing anything wrong. Thanks.

16 years ago
Never mind. The jsp was complaining "Missing quotes for attribute value". But when I accessed the page it worked. I think there is some problem with my IDE.

Thanks.
16 years ago
Hi,

In my MessageResources.properties i have:

label.inst=From {0} to {1}

and in jsp
<bean:message key="label.inst" arg0="2007" arg1="2009"/>


This works fine.

But if I pass dynamic values in the arguments I am having problems

I tried
<%
String s1 = "2007";
String s2 = "2011":
%>
<bean:message key="label.inst" arg0="<%=s1%>" arg1="<%=s2%>"/>

Any help will be great.

Thanks.
16 years ago
Manifest-Version: 1.0
Main-Class: statusupdate.StatusUpdateEmail
Class-Path: lib/ojdbc14.jar lib/activation.jar lib/mail.jar lib/log4j.jar .

First I gave the full directory path where the property file is located later I changed mentioning a "." at the end of the class path in the manifest. (both options didn't work)

Directory structure:

log4j.properties
lib/ojdbc14.jar
lib/activation.jar
lib/mail.jar
lib/log4j.jar
myjar.jar


In the code do I need to use the class loader to load log4j.properties.

getClass().getClassLoader().getResourceAsStream("/log4j.properties");

I tried that option too, but no luck.
[ August 28, 2008: Message edited by: Venkat Babu ]
16 years ago
Thanks for you reply. I tried mentioning the directory name where the property file is located in the manifest file but it didn't work. Any other idea(s)?

Thanks again.
16 years ago
I have a manifest file and have listed required jar files in the Class-Path of the Manifest file, this works fine. I am trying to refer a property file using Class-Path of the Manifest but it doesn't work. Please let me know if this is the correct way or is there any other approach.

Thanks in advance.
Babu
16 years ago
Thanks a lot.
17 years ago
public class CustomMultiPartRequestHandler implements MultipartRequestHandler {
.
.
.
public void handleRequest(HttpServletRequest request)
throws ServletException {
ModuleConfig ac = (ModuleConfig) request.getAttribute(Globals.MODULE_KEY);
mc.getControllerConfig().getMaxFileSize() //prints 250M
.
.
}

And in struts-config.xml :

<controller multipartClass="pack.CustomMultiPartRequestHandler" />

Pls let me know if I have not answered your question.

I trying to implement fileupload app using struts/ajax/dwr. I want to set the Maxfile upload to 50M.
[ May 02, 2008: Message edited by: Venkat Babu ]
17 years ago
Hi,

Need some help. Thanks in advance.


I have file upload application in struts. I have customized MultipartRequestHandler and in my customized MultipartRequestHandler class, i am printing the maximum file size to process for file uploads. It is printing as 250M but I am not sure where it is getting this value from. In my case i wanted to restrict to 50M. Pls help. Thanks again.

Ven
17 years ago
Hello Sivaraman,

I am attaching a zip file, what is the MIME type I need to set?


Thanks,.
17 years ago
I need some help on sending an email and attaching a file which is in memory.

I have this code getting the file from the file system.

MimeBodyPart mimePartAttach = new MimeBodyPart();
FileDataSource fileSource = new FileDataSource(fileName);
mimePartAttach.setDataHandler(new DataHandler(fileSource));
mimePartAttach.setFileName(fileName);
multiPart.addBodyPart(mimePartAttach);
mesg.setContent(multiPart);

But I am not sure how to send the attachment from memory

I have the content as byte[] and don't know how to convert into FileDataSource or DataHandler. Please help.


Thanks.
17 years ago
Awesome. It worked. Thanks a lot.
Hi,

I have two tables, Address and person

Mapping for Address to Person is one-to-many.

I have this example but it is not working, I am getting org.hibernate.TransientObjectException: hibernate.Person

could someone help pls?

tx = session.beginTransaction();
Address addr = new Address();
addr.setAddress1("123 Victoria Dr");
addr.setAddress2 ("Apt 213");
addr.setCity("Ashburn");
addr.setState("GA");
addr.setZip("83782");
//Create person 1
Person person = new Person();
person.setFirstName ("Paul");
person.setLastName("Douglas");

Set personsSet = new HashSet();
//Associate to the address
personsSet.add(person);
//create person 2 and associate to the address
Person person2 = new Person();
person2.setFirstName("John");
person2.setLastName("Smith");
personsSet.add(person2);
addr.setPersons(personsSet);
session.saveOrUpdate(addr);



Thanks