•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 427,225 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,221 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1475 | Replies: 1 | Solved
![]() |
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,467
Reputation:
Rep Power: 11
Solved Threads: 296
If servlets are not mapped with use of web.xml you call it like this from the form for example
The web.xml mapping will look like this
Example:
REAL_SERVLET_NAME_NO_FILE_EXTENSRION is FrontController
SERVLET_NAME_YOU_WANT_TO_CALL_IT I want to be Front
A_NAME.jsp I want to be front.jsp
to call my FrontController I will do following
<form action="http://localhost:8080/PROJECT_NAME/servlet/SERVLET_NAME_NO_FILE_EXTENSION" method="POST"> YOUR FORM HERE </form>
The web.xml mapping will look like this
xml Syntax (Toggle Plain Text)
<servlet> <servlet-name>SERVLET_NAME_YOU_WANT_TO_CALL_IT</servlet-name> <servlet-class>REAL_SERVLET_NAME_NO_FILE_EXTENSRION</servlet-class> </servlet> <servlet-mapping> <servlet-name>SERVLET_NAME_YOU_WANT_TO_CALL_IT</servlet-name> <url-pattern>/A_NAME.jsp</url-pattern> </servlet-mapping>
REAL_SERVLET_NAME_NO_FILE_EXTENSRION is FrontController
SERVLET_NAME_YOU_WANT_TO_CALL_IT I want to be Front
A_NAME.jsp I want to be front.jsp
to call my FrontController I will do following
<form action="front.jsp" method="POST"> FORM CODE HERE </form>
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Help for learnign JSP (JSP)
- javascript to jsp (JSP)
- Calling JSP function from Button?? (JSP)
- How to use a Hyperlink to send info to a servlet (JSP)
- how to call javabean from jsp page upon onChange event (JSP)
Other Threads in the JSP Forum
- Previous Thread: How to store Answer avilable in option format in table
- Next Thread: How to call JSP from servlet



Linear Mode