Mandy Smith

Ranch Hand
+ Follow
since Jun 26, 2001
Merit badge: grant badges
For More
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 Mandy Smith

Thanks. But, i wonder how microsoft outlook handles it!
21 years ago
I want to have Email as separate class, which has send() method. When i want to send email, i will instantiate this Email class and call its send() method.
I want this email class to be html enabled and if in case i send just plain text, it should not wrap around the text, if the simple text message is in 2 lines.(for eg:- '\n' should be recognized).
Any further help on this?
Appreciate your response Frank Carver.
Thanks.
21 years ago
How to set the java mail content type dynamically? I am using java mail package to do this. Right now, i am getting around this by having a little checkbox at the bottom of the body of the message, if they check html, then the email body contentType is set to "text/html", other wise it isset to plain text.
So my question, if i don't have this checkbox option and sometimes i want to send html and other times i want to send just plain text. Is this possible to dynamically set the contentType?
Could someone help me on this.
Appreciate your help.
Thanks
21 years ago
I was trying to run one of the struts applications found at http://jakarta.apache.org/struts/resources/examples.html.
So, i was trying to run Struts Login application found at the above site. So, i copied this struts-logon.war file into webapps directory of tomcat. And then i restarted tomcat. This is what i am seeing when i restarted tomcat. It seems like i don't have xerces parser. Could someone help me out what needs to be done looking at my console error.
Also, if i need to download xerces.jar file, where can i find it.
Appreciate your help.
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar
:file:C:/Program Files/Apache Tomcat 4.0/webapps/struts-logon/WEB-INF/lib/struts
.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN',
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Resolving to alternate DTD 'jar:file:C:/Program Files/Apache Tomcat 4.0/webapps
/struts-logon/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_
1_0.dtd'
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[logonForm
])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[logon])
Pop org.apache.struts.action.ActionForward
Parse Error at line 49 column 78: Attribute "rewrite" must be declared for eleme
nt type "forward".
org.xml.sax.SAXParseException: Attribute "rewrite" must be declared for element
type "forward".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213
)
at org.apache.xerces.validators.common.XMLValidator.validateElementAndAt
tributes(XMLValidator.java:3697)
at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
Validator.java:1229)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java:1806)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1182)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:362)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:137)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
:1247)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:918)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
0)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:3279)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
421)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78
5)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:232)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343
)
at org.apache.catalina.core.StandardService.start(StandardService.java:3
88)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506
)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionServlet.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/logon
, type=app.LogonAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/logof
f, type=app.LogoffAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/addFormBean, type=org.apache.struts.actions.AddFormBeanAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/addForward, type=org.apache.struts.actions.AddForwardAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/addMapping, type=org.apache.struts.actions.AddMappingAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/reload, type=org.apache.struts.actions.ReloadAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/removeFormBean, type=org.apache.struts.actions.RemoveFormBeanAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/removeForward, type=org.apache.struts.actions.RemoveForwardAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/admin
/removeMapping, type=org.apache.struts.actions.RemoveMappingAction])
Pop org.apache.struts.action.ActionMapping
Starting service Tomcat-Apache
Apache Tomcat/4.0.4
21 years ago
Thanks for reply.
21 years ago
Does tomcat version 4.0.x include stuts related stuff of do i have to download separately struts 1.0 from jakarta's site.
Thanks,
Appreciate your response.
21 years ago
You can use Log4J from jakarta project. Here is the link to download.
http://jakarta.apache.org/log4j/docs/download.html
21 years ago
Hi,
I am pretty new to this struts stuff. I have to try out some struts example first to understand how it works. Can somebody provide me with some details regarding this. Details such as what to add in jsp file, ApplicationResource.properties file, config file entry, etc.,
Any link to try out some struts example would be great.
Thanks.
Appreciate your help.
21 years ago
I got it. I wasn't thinking right. Instead of putting the files list into ArrayList, now i am putting the files into HashMap instead. So, then i can do check for the existence of a particular type of file.
String key = tokens.getNextToken();
if ( fileMap.get(key) == null ), then the particular type doesn't exist.
Thanks any way.
21 years ago
Is there a convenient method in java version 1.3 to compare a list with a comma separated string?
This is my problem, i have a comma separated string, which holds allowed fileTypes (for eg :-txt, doc,...). With this String, i need to compare with my files which i have stored in arrayList(This list hold files of type doc, txt,jpg, gif).
Thanks,
21 years ago
I figured this out why it wasn't working. I was setting the contentType first to text/html and then again setting the mimeMessage's text, so the text was overriding text/html content type. Just wanted to share.
Thanks for your response.
21 years ago
Thanks for the response. Some how, i am not able to set the contentType to both multipart as well as text/html.
Is there a way to set the MimeMessage's contentType to both multipart as well as text/html?
If i set the mimeMessage's contentType to multipart, then i am able to send attachments in my email successfully, if i set the mimeMessage's contentType to text/html, then i am able to send html tags in my email message successfully. But i am not able to send both attachments as well as html tags in my email successfully. It defaults to whatever the last contentType was set to.
I would greatly appreciate any help on this.
Thanks in advance.
21 years ago
Hi,
I want to allow attachments as well in my email message, so for this to happen i have set the contentType to multipart. Is there a way i can set to some contentType so that i can send both attachments as well as html contents. Also sometimes there could be only attachments, only html contents or both. So, how to achieve this?
Appreciate any further help on this.
Thanks for your response.
21 years ago
I did not quite clearly understand what you are trying to do. So i am not sure how to do in your case. Can u not put the parameters into the outputstream? So that the other application can get this either using a Get method or using a Url connection...
for eg something like this.
ServletOutputStream out = res.getOutputStream();
out.println("" + login)
.
..
Just my thought.
21 years ago
Hi,
I am using JAVA MAIL to send Email. I am able to send plain text messages properly but i want to send html contents in my message. How to do this?
I am able to send hyper links in my messages, but not html tags. what i mean by this is, let's say i send <H1>Hello</H1>, received email must be able to view this text in large font, rather than viewing like this(<H1>Hello</H1> . How to achive this. Could some body please help me on this.
Appreciate your help,
Thanks.
21 years ago