I am new here and i have a project like to develop a website
So far i have created few JSP's and now i need to link one JSP to another i don't know what exactly i should do after creating a JSP i am following the MVC architecture i understand that the JSP is Model and stuff
Like this is what i need it to do like when a user clicks on submit i need the data to go another jsp
Now my questions are after creating the JSP should i create a servlet or is there any other thing that i should create before i create a Servlet ???
I am using Struts and I have a struts.xml and web.xml like suppose i want to map the action in which file should i do it???
Hello and Welcome to the Ranch :)
It is a good idea to pick a better subject than "jsp" in a forum called "JSP".
(ok, I see you have edited the subject :) Thanks)
Since you mentioned that you are using Struts, then examining a Struts sample project will greatly help you and shed more lights.
I find it is strange to create the view first (JSP page) and then creating a controller (servlet or Struts action). I suggest you follow a Struts tutorial.
Struts framework is well documented and old, you shouldn't have pain looking for online tutorials.
Joined: Mar 27, 2012
thank you for your advice i changed the name of the topic :)
The thing is i don't know where to map the action whether i should do it on Struts.xml or web.xml
Whether it is a "success" or an "error" you are forwarding to the same page, are you setting some scope-hosted variable to indicate the result of you action?
If your question is about Struts, then please let me know. I will move it to our "Struts" forum where you can also get more Struts specific replies.