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

  • Home
  • SEARCH
  • 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 6249871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:19:08+00:00 2026-05-24T13:19:08+00:00

controller: @Controller @SessionAttributes public class ContactController { @RequestMapping(value = /addContact, method = RequestMethod.POST) public

  • 0

controller:

@Controller
@SessionAttributes
public class ContactController {

    @RequestMapping(value = "/addContact", method = RequestMethod.POST) 
    public String addContact(@ModelAttribute("contact") 
                            Contact contact, BindingResult result) {

         System.out.println("First Name:" + contact.getFirstName() +
                 "Last Name:" + contact.getLastName());

     return "redirect:contacts.html";
    }

    @RequestMapping("/contact")
    public ModelAndView showContacts() {

        return new ModelAndView("contact", "command", new Contact());
    }
}

this is my tiles.xml:

<tiles-definitions>
    <definition name="base.definition"
        template="/WEB-INF/jsp/layout.jsp">
        <put-attribute name="title" value="" />
        <put-attribute name="header" value="/WEB-INF/jsp/header.jsp" />
        <put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" />
        <put-attribute name="body" value="" />
        <put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" />
    </definition>

    <definition name="contact" extends="base.definition">
        <put-attribute name="title" value="Contact Manager" />
        <put-attribute name="body" value="/WEB-INF/jsp/contact.jsp" />
    </definition>

error is this:

org.apache.jasper.JasperException: javax.servlet.ServletException: Could not resolve view with name 'contact' in servlet with name 'spring'
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:456)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

feel free to ask for any more source code

  • 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-05-24T13:19:08+00:00Added an answer on May 24, 2026 at 1:19 pm

    In your last question you showed that you used a UrlBasedView Resolver with an pre and suffix.

    Remove that pre and suffix.

    That should be enogth:

    <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver"
        id="tilesViewResolver">
        <property name="viewClass"
            value="org.springframework.web.servlet.view.tiles2.TilesView" />
    </bean>
    <bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
        id="tilesConfigurer">
        <property name="definitions">
            <list>
                <value>/WEB-INF/layouts/layouts.xml</value>
                <!-- Scan views directory for Tiles configurations -->
                <value>/WEB-INF/views/**/views.xml</value>
            </list>
        </property>
    </bean>
    

    btw: this configruation allowes two tzps (only there sermatic differs) of tiles configuration files

    • the /WEB-INF/layouts/layouts.xml contains all the (lets call it) “base definitions”
    • the /WEB-INF/views/**/views.xml contains the concrete definitions that extends the “base definitions” (for example the “contact” definition) — You can have a seperate view.xml for each folder — this is usefull if you group your views, for example all views (create, update, show and list) for each entity, in a separete folder

    If you do not need this feature, then simply remove that line.

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

Sidebar

Related Questions

I have a controller with an action method as follows: public class InventoryController :
@Controller @RequestMapping(/User.html); @sessionAttributes(user); class something Now i know that @Controller = implements Controller @requestMaping
I have an abstract controller support class for searches and result lists: @Controller @SessionAttributes(query)
Controller class PageController extends Zend_Controller_Action { public function editAction() { $this->view->attach('name' => 'crazor'); echo
Controller ClientDocument. def upload_document ClientDocument.upload_client_document(params) end Model ClientDocument. Class method.. def self.upload_client_document(params) self.new :uploaded_data
Controller: <?php class VideosController extends ForumAppController { /** * Controller Name * @access public
Controller class: public class PlantHeadController : Controller { private WOMSEntities2 db = new WOMSEntities2();
Controller : <?php class AdminController extends Zend_Controller_Action { public function init() { error_reporting(E_ALL); }
My controller actions: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Login() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult
Post methods handled by SuperController class due to code-sharing. I guess such as @Controller

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.