jQuery in Action, 3rd edition
The moose likes JSP and the fly likes Problem with JSP (can not find url) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with JSP (can not find url)" Watch "Problem with JSP (can not find url)" New topic

Problem with JSP (can not find url)

Estefania fanny

Joined: Jun 06, 2013
Posts: 9

I'm doing:

public final static void ForwardTo (HttpServletRequest request,
HttpServletResponse response, String url) throws IOException,
ServletException {

RequestDispatcher RequestDispatcher = request.getRequestDispatcher (url);

RequestDispatcher.forward (request, response);


But can not find the url, I call it like this:
request.setAttribute ("terminal", terminal);
WebUtil.forwardTo (request, response, "/ ShowTerminal.jsp");

No missing, because I have a similar project, almost equal, and that does the same but it works.
Also without the "/" of ShowTerminal.jsp

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

What is the error you are getting?
Prajakta Acharya
Ranch Hand

Joined: Nov 08, 2012
Posts: 138

Did you try prefixing to the URL?

Estefania fanny

Joined: Jun 06, 2013
Posts: 9
There appears no error, is redirected to the home page.

I found that the call does not reach
I have first: FindTerminalForm.jsp with which sent the form with GET to FindTerminalServlet.java that is where I do the prologue of the previous message instruction.

But note that not already FindTerminalServlet.java access.

Thank you very much
Sorry if I explained poorly in English
Swastik Dey

Joined: Jan 08, 2009
Posts: 1528

I found that the call does not reach

Which call does not reach.

Estefania fanny

Joined: Jun 06, 2013
Posts: 9
Does not call to FindTerminalServlet.java.

But I'm trying in different ways, and the other I get this error:

jun 11, 2013 5:40:32 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
jun 11, 2013 5:40:43 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() para servlet FindTerminal lanzó excepción
at es.udc.pojo.servjsptutorial.web.FindTerminalServlet.doGet(FindTerminalServlet.java:35)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

It seems that I have something that is null, but I checked that if the object is null Terminal

It is sorta covered in the JavaRanch Style Guide.
subject: Problem with JSP (can not find url)
It's not a secret anymore!