Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] encourting "Path problem" when trying to save a uploaded file , but work well in tomcat---Jetty 9.2.9.v20150224

Are you using jetty embedded?

As this problem only exists with use of the PathResource component on windows.
A component that is experimental in the Jetty 9.2.x line.
In Jetty 9.3.x, the PathResource component is fully fleshed out, fixed, and now a standard component (replacing FileResource from previous versions of Jetty)

If you can't upgrade to Jetty 9.3, then downgrade your use of PathResource to FileResource for now.



--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Sat, May 16, 2015 at 9:55 AM, 五星上酱 <50712369@xxxxxx> wrote:
Hi ,every body
   example code like this:
   
  // mulitpartFiletype is org.springframework.web.multipart.MultipartFile
   mulitpartFile.transferTo(new File("G:\\somedir/somefile"));

   this code work well with Tomcat
 
   but ,when with Jetty , raises java.io.FileNotFoundException: D:\projects\project1\target\tmp\G:\ somedir/somefile

   the problem is file path is prefixed with the tempolary path
   Why Jetty will prefix an absolute path with the tempolary path? Can I avoid it?

   hoping someone can help me.thanks
   


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top