Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8280211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:35:25+00:00 2026-06-08T09:35:25+00:00

I developed a web application with JSP and Spring MVC in eclipse. When i

  • 0

I developed a web application with JSP and Spring MVC in eclipse. When i run the application in eclipse works perfectly but when i loaded the war file in tomcat 7 when the application has to print a ticket it doesn’t, and it doesn’t throw a error. the next log is from localhost access

> 127.0.0.1 - - [23/Jul/2012:11:41:29 -0600] "GET /LilyStore/ HTTP/1.1" 200 2866
> 127.0.0.1 - - [23/Jul/2012:11:41:29 -0600] "GET /LilyStore/Css//LiliStyle.css HTTP/1.1" 304 -
> 127.0.0.1 - - [23/Jul/2012:11:41:29 -0600] "GET /LilyStore/JS//funciones.js HTTP/1.1" 304 -
> 127.0.0.1 - - [23/Jul/2012:11:41:33 -0600] "POST /LilyStore/forms/validateLogin.html?parametro=jav&param2=123 HTTP/1.1"
> 200 6606
> 127.0.0.1 - - [23/Jul/2012:11:41:33 -0600] "GET /LilyStore//Css//LiliStyle.css HTTP/1.1" 304 -
> 127.0.0.1 - - [23/Jul/2012:11:41:33 -0600] "GET /LilyStore//JS//funciones.js HTTP/1.1" 304 -
> 127.0.0.1 - - [23/Jul/2012:11:41:38 -0600] "GET /LilyStore/forms/showVentasPorRango HTTP/1.1" 200 9581
> 127.0.0.1 - - [23/Jul/2012:11:41:38 -0600] "GET /LilyStore//JS//calendar_eu.js HTTP/1.1" 304 -
> 127.0.0.1 - - [23/Jul/2012:11:41:39 -0600] "GET /LilyStore/forms/makeCorte.html HTTP/1.1" 200 9581

Catalina log its ok without errors the next part is the final lines of catalina log.jul

23, 2012 11:41:10 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/showVentasPorRangoMostrar.*] onto handler 'ventasControllerImpl'
jul 23, 2012 11:41:10 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/showVentasPorRangoMostrar/] onto handler 'ventasControllerImpl'
jul 23, 2012 11:41:10 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'dispatcher': initialization completed in 5980 ms
jul 23, 2012 11:41:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\docs
jul 23, 2012 11:41:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\manager
jul 23, 2012 11:41:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT
jul 23, 2012 11:41:10 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
jul 23, 2012 11:41:10 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
jul 23, 2012 11:41:10 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 9738 ms
jul 23, 2012 11:52:47 AM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

In the program a file is created to print it. the method who print that file is as follows:

public void imprimir(String ticketName){
    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
    //use the default printer
    PrintService service = PrintServiceLookup.lookupDefaultPrintService();
    if (service != null) {
        try {
            //create a print job
            DocPrintJob job = service.createPrintJob();
            //attributes of the job
            DocAttributeSet das = new HashDocAttributeSet();
            FileInputStream fis = new FileInputStream(ticket+".txt");
            Doc doc = new SimpleDoc(fis,flavor,das);
            try {
                //the job is send it to the printer
                job.print(doc,null);
            }
            catch(Exception e){
                e.printStackTrace();
            }
        }
        catch(Exception e){
            e.printStackTrace();
        }
    }
} 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:35:29+00:00Added an answer on June 8, 2026 at 9:35 am

    I’ve found the problem it was the path of the file to print, tomcat creates the file in the root of the folder when my application print in the path of the warfile

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application developed with Struts2, JSP, JPA, Spring and MySql. I
I have developed an web application using JSP and deployed in tomcat server. In
I developed web application using struts1.3.8 and spring2.5, I deployed war file in Websphere7
I have developed a web application using Netbeans 6.7 and Ant. The webapp works,
Hi i developed small web application, in that all the functionality working fine but
I am used to develop web applications in Java (Struts, Spring, JSP...). But now
I have an already developed web application based on struts 1.2 which contains jsp
I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my
I have developed a web application on Struts2 and used JSP. I want to
I am using jsp to develop a web application...using tomcat server... I am facing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.