In the following servlet code I need to assign the variable(drawin gnumber) in the filePath:
protected void doPost(HttpServ letRequest arg0, HttpServletResp onse arg1) throws ServletExceptio n, IOException {
String drawingnumber = arg0.getParamet er("dwgno");
Drawing drawingString = Drawing.getDraw ing(drawingnumb er);
String drawingrev = arg0.getParamet er("dwgrel");
ServletOutputSt ream out = arg1.getOutputS tream();
arg1.setContent Type( "applicatio n/pdf" );
HttpSession session = arg0.getSession (true);
String filePath = "//gvas400/home/sde/pdffiles/" + drawingnumber + "P1.pdf";
However this code generates an error:
Could not invoke the service() method on servlet ViewDrawing. Exception thrown : java.io.FileNot FoundException: \\gvas400\home\ sde\pdffiles\nu llP1.pdf (The system cannot find the file specified)
It puts a null where the drawingnumber should be.
protected void doPost(HttpServ letRequest arg0, HttpServletResp onse arg1) throws ServletExceptio n, IOException {
String drawingnumber = arg0.getParamet er("dwgno");
Drawing drawingString = Drawing.getDraw ing(drawingnumb er);
String drawingrev = arg0.getParamet er("dwgrel");
ServletOutputSt ream out = arg1.getOutputS tream();
arg1.setContent Type( "applicatio n/pdf" );
HttpSession session = arg0.getSession (true);
String filePath = "//gvas400/home/sde/pdffiles/" + drawingnumber + "P1.pdf";
However this code generates an error:
Could not invoke the service() method on servlet ViewDrawing. Exception thrown : java.io.FileNot FoundException: \\gvas400\home\ sde\pdffiles\nu llP1.pdf (The system cannot find the file specified)
It puts a null where the drawingnumber should be.
Comment