File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with JSP (can not find url)" Watch "Problem with JSP (can not find url)" New topic
Author

Problem with JSP (can not find url)

Estefania fanny
Greenhorn

Joined: Jun 06, 2013
Posts: 9
Hello,

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

thanks
Hussein Baghdadi
clojure forum advocate
Bartender

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?


Regards,
Prajakta
Estefania fanny
Greenhorn

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
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

I found that the call does not reach


Which call does not reach.


Swastik
Estefania fanny
Greenhorn

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
java.lang.NullPointerException
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

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JSP (can not find url)