This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Trying to deploy simple helloworld.jsp on tomcat  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the reason for Tomcat 9 to respond with error 404 and message "/WEB-INF/views//WEB-INF/views/helloworld.jsp.jsp"? I dont understand why I have 2 WEB-INFs and .jsp.jsp in the path when my files are named correctly. I am using Intellij Idea 2017. It worked fine before I changed suffix in dispatcher servlet from .jsp to html. Now this error happens even with old .jsp suffix.

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/" />
<property name="suffix" value=".jsp" />
</bean>

 
Sheriff
Posts: 21550
100
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

My guess is that you're forwarding to model "/WEB-INF/views/hellworld.jsp". However, you defined a prefix and suffix which get prepended and appended respectively. The resulting file is "/WEB-INF/views//WEB-INF/views/helloworld.jsp.jsp" (italic is the model, bold is the prefix and suffix).

Try using only "helloworld" as model name. That should result in file "/WEB-INF/views/helloworld.jsp".
 
Andrei Compsci
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right! I had a wrong name returning on my model. It was "/WEB-INF/views/helloworld.jsp" but had to be "helloworld". I dont know how it got changed on its own but changing it back resolved the issue. Thank you.
 
Rob Spoor
Sheriff
Posts: 21550
100
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
It runs on an internal combustion engine. This ad does not:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!