Rev 1310 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1310 | Rev 1350 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.web; |
1 | package pt.estgp.estgweb.web; |
2 | 2 | ||
- | 3 | import jomm.web.utils.NavPlace; |
|
3 | import org.apache.log4j.Logger; |
4 | import org.apache.log4j.Logger; |
4 | 5 | ||
- | 6 | import javax.servlet.ServletException; |
|
5 | import javax.servlet.http.HttpServlet; |
7 | import javax.servlet.http.HttpServlet; |
6 | import javax.servlet.http.HttpServletRequest; |
8 | import javax.servlet.http.HttpServletRequest; |
7 | import javax.servlet.http.HttpServletResponse; |
9 | import javax.servlet.http.HttpServletResponse; |
8 | import javax.servlet.ServletException; |
- | |
9 | import java.io.IOException; |
- | |
10 | import java.io.FileNotFoundException; |
10 | import java.io.FileNotFoundException; |
11 | - | ||
- | 11 | import java.io.IOException; |
|
12 | import jomm.web.utils.NavPlace; |
12 | import java.net.URLEncoder; |
13 | 13 | ||
14 | /** |
14 | /** |
15 | * @author Jorge Machado |
15 | * @author Jorge Machado |
16 | * @date 26/Fev/2008 |
16 | * @date 26/Fev/2008 |
17 | * @time 12:46:16 |
17 | * @time 12:46:16 |
Line 52... | Line 52... | ||
52 | 52 | ||
53 | if(path != null) |
53 | if(path != null) |
54 | { |
54 | { |
55 | try |
55 | try |
56 | { |
56 | { |
- | 57 | //Aqui temos de codificar em UTf-8 porque estamos dentro da máquina em UTF-8 |
|
- | 58 | //Tem de ser com o URLEncoder e não com o URIUtil porque o URLEncoder trabalha com o + e o URIUtil apenas trabalha com diacriticos |
|
57 | getServletContext().getRequestDispatcher("/layout.do?server=" + server + "&path=" + path + "&layout=" + layout + "&" + request.getQueryString()).forward(request,response); |
59 | getServletContext().getRequestDispatcher("/layout.do?server=" + server + "&path=" + 1.5.0/docs/api/java/net/URLEncoder.html">URLEncoder.encode(path, "UTF-8") + "&layout=" + layout + "&" + request.getQueryString()).forward(request, response); |
58 | } |
60 | } |
59 | catch(1.5.0/docs/api/java/io/FileNotFoundException.html">FileNotFoundException e) |
61 | catch(1.5.0/docs/api/java/io/FileNotFoundException.html">FileNotFoundException e) |
60 | { |
62 | { |
61 | throw new 1.5.0/docs/api/java/io/FileNotFoundException.html">FileNotFoundException(path); |
63 | throw new 1.5.0/docs/api/java/io/FileNotFoundException.html">FileNotFoundException(path); |
62 | } |
64 | } |