Kevin Valencia

Greenhorn
+ Follow
since Aug 20, 2007
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 Kevin Valencia

Below is the code:


setMimePart method does this:


Result of email content is like this:
�������������������� ������������
15 years ago
Hi all,
I'm using javamail to send email notification which contains chinese or japanese characters. Subject line correctly displays chinese characters, however, the email content is garbled. How will i be able to encode the characters in utf-8? I've tried using MimeBodyPart methods such as setContent and setText, but still doesn't work.

Appreciate your help on this.
15 years ago
Hello Paul..
I've managed to change the log on configuration of tomcat to the domain user account. Its now working. Thanks a bunch for the help!
16 years ago
Hello Paul,
The webserver is running the app in Tomcat6 and login is domain user account which already have share permissions on the directory its trying to write to. How do i know which user is running the app? In the task manager, this is what i see...
tomcat6.exe --- SYSTEM
tomcat6w.exe --- domain user account

Really appreciate your help!
16 years ago
Hi,
I have a webapp deployed in my own terminal (has windows xp) which writes a file to a certain directory. When other terminals access this webapp, it is still able to write a file to the directory of those terminals. No problem on permissions. But when i deployed the webapp in the webserver (has windows server 2003) it can no longer write to directories even if sharing permissions have been set. Also, when the shared directories are physically mapped, files can be created in them since it has full control access.
It gives this error:

java.io.FileNotFoundException: \\PCNAME\H\Sample File (Access is denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.amkor.cimapps.action.MainAction.downloadMap(MainAction.java:398)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.amkor.cimapps.filter.SessionCheckerFilter.doFilter(SessionCheckerFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)


Appreciate your responses!
16 years ago
Hi Everyone,

I've successfully deployed my webapp in Tomcat5.5, now we are required to deploy it in Tomcat6. My questions are these:
- what jars do i need to have in Tomcat 6.0\lib?
- where do i put context.xml given that my webapp is deployed in webapps folder as an exploded directory not war?

Also, i am encountering this error when i load my webapp..

org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



Thanks in advance!
16 years ago
Thanks Joe! Tried it! At first it gave "invalid escape sequence" error when i used "\\path\folder", it should've been "\\path\\folder". Thanks again.
16 years ago
Hi,

Would like to know if there's a way for java to be able to save a file in a specified UNC path?

Thanks in advance!
16 years ago
Security wise, the web app will only be deployed in an intranet site, which assumes that it is a trusted site. Might explore on signed applets then. Would just like to know if it can allow write access to other machines in the network aside from the client/local machine. Thanks again...
16 years ago
Thanks Joe! Removing the actionforward solved it, wasnt aware it had something to do with the stream! Thanks a bunch...
16 years ago
Hello..
Would like to know if there is a way for a web application to allow file download without displaying "Open/Save" dialog box and instead automatically dump the file in a specified directory, say for instance, client C:\ directory or in another location in the network.

Appreciate any ideas because i'm still very unfamiliar on how to implement this and if it is really possible.
Thanks in advance!
16 years ago
by the way, the code above is placed in my action class..
16 years ago
Hello..
I've googled this error and have seen a lot of solutions pertaining to response.getOutputStream() being called multiple times, but i dont really see this happening in my code or in the jsp.. I'm trying to download a file that is retrieved from the database as blob. The code below will show that after the blob is retrieved, it will write the file then allow the client to download this file. I've successfuly done this and the file gets downloaded, however in the tomcat console, this error appears. What could be wrong?
Would really appreciate your help.
Thanks in advance.

16 years ago
Thanks Merill!!
Got it to work now! I've placed it in session scope though.
Really appreciate it.
16 years ago
Hi Merrill,
Thanks for the reply, i did what you've suggested and i encountered this error: javax.servlet.ServletException: Failed to obtain specified collection.
Is there anything lacking in my bean? i already placed a getter/setter for the select tag property but that didnt solve it. i checked the result from the dao and it was successfully retrieved.
Really appreciate your help!
Thanks!
16 years ago