• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Path of template not found

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have imported a maven project that was previously in a computer with WIndows as OS and the project is now in Linux OS. So I had to change the directory of the templates. Now when I try to run the program, he says that he can not find the template path because he is still using the old one, even if I have changed it.

The error message is :

Template not found: C:\Users\Aula1_2\Desktop\workspace\Sigil\WebContent\WEB-INF\template\Door.html




I have defined the template url in Confing class:



Then I have used the template in a view class:



 
Marshal
Posts: 64685
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Discussion moved to our Maven forum.
 
Sheriff
Posts: 6033
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the connection between the classes Config and ViewHtml.  How is ViewHtml called?
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:I don't see the connection between the classes Config and ViewHtml.  How is ViewHtml called?



There is an Interface wich ViewHtml implements, wich is IView:



then I use the view in the servlet, for example here:



And the fact is that the browser can not find the template, because he is still using the old path e non not the new one.

I have recently discovered that when I go to "configure build path" there is an error in servlet-api.jar, because he can not find obviously the old path, and he says that is missing.

 
Knute Snortum
Sheriff
Posts: 6033
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the full error message and stack trace?  Can you have the class log what path it is trying when it fails?
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:What's the full error message and stack trace?  Can you have the class log what path it is trying when it fails?


In the console it is not displayed any error. The only message is on the browser and it is this:

Template not found: C:\Users\Aula1_2\Desktop\workspace\Sigil\WebContent\WEB-INF\template\Door.html



He is trying to search the old directory and it doesn't find it, because, I have changed it to the new one, the one of Linux, wich is this:

 /home/dario/eclipse-workspace/Sigil/WebContent/WEB-INF/template/Door.html



this path is defined in the class Config.
 
Knute Snortum
Sheriff
Posts: 6033
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming you've restarted the server after changing the config.  Is there any possibility that the config info is still in the jar, or have you rebuilt that?
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:I'm assuming you've restarted the server after changing the config.  Is there any possibility that the config info is still in the jar, or have you rebuilt that?



Yes, it is possible, I haven't changed any jar file. In fact when I go to "configure build path" there is a message near the servlet-api.jar and the message is:

/Sigil/C:/Users/Aula1_2/Dekstop/workspace/tomcat/lib (missing)



it means that there has to be a library with the new path?
 
Knute Snortum
Sheriff
Posts: 6033
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure exactly what it means because I don't know what "configure build path" is (in your IDE maybe?), but it seems like a good indication that the jar file has not been updated.
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:I'm not sure exactly what it means because I don't know what "configure build path" is (in your IDE maybe?), but it seems like a good indication that the jar file has not been updated.


Yes, it's on my IDE, I'am using Eclipse for Java. How can I update a jar?
 
Knute Snortum
Sheriff
Posts: 6033
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had assumed that you built the jar file.

This has gone from a Maven problem to a Servlet problem, which I know very little about.  So I'm changing the forum this thread is posted in and we'll see if someone else can help you.
 
Marshal
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Daniel Russell wrote:How can I update a jar?



You can't update a jar.

However I don't know what the context was that made you ask that. It's possible that you would accept "Just create the jar over again" as an answer -- but I can't tell.
 
Daniel Russell
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham wrote:

Daniel Russell wrote:How can I update a jar?



You can't update a jar.

However I don't know what the context was that made you ask that. It's possible that you would accept "Just create the jar over again" as an answer -- but I can't tell.



It seems that I have solved the problem from my own, had only to eliminate a jar which gave me the problem, now the program can reach the page I wanted.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!