Jose Alvarez

Greenhorn
+ Follow
since Jan 23, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jose Alvarez

I solved the problem. I edit the file context.xml (tomcat->conf). You need to edit it, putting the attribute allowCasualMultipartParsing="true" in the tag <Context>, and then you have: <Context allowCasualMultipartParsing="true">. Restart the server and it works.
9 years ago
Well, I'm programming a web site.

In one page the user can upload a image (in the html I use the element <input type="file" name="flUpload"....> and in the form I add this attribute: enctype="multipart/form-data"), when the user press Send I receive the form in a servlet. In this servlet I do this:


But when I upload my web site to my Tomcat 7 server, the user can't upload images. I have got this exception:

java.lang.NullPointerException
org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:184)
Interfaz.RegistroImagen.doPost(RegistroImagen.java:108)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Where Interfaz.RegistroImagen is my servlet.

In my GlassFish server this runs OK, the user can upload images.

What can I do?

Thanks.
9 years ago
Well, I used the old version of the web page and it works. Thanks for all.
9 years ago

Bear Bibeault wrote:Don't tell us, show us.

Otherwise, all we can do is to guess.



What do you need to see? Tell me and I show what you want.
9 years ago

Rob Spoor wrote:Did you add the proper url-mapping elements to your web.xml file?



Yes, because Glassfish add the elements automatically. But I saw the web.xml file and the tags are correctly.
9 years ago
Well, I'm doing a web page using Glassfish tools bundle for Eclipse (I use the server provided by the Glassfish).

I have a package called "Interfaz" where I put the servlets. I added a servlet called "RegistroConciertos" but when I try to execute this, I receive the exception mentioned in the title of my topic. I try to add more servlets, but I receive the same exception. With the servlets what I have created above, I don't have problems.

At the first time I try to run the servlet after the server starts, I receive the exception HTTP Status 500 - javax.servlet.ServletException: PWC1397: Wrapper cannot find servlet class 'x' or a class it depends on.
And then, if I touch "Refresh" in the WebBrowser provides by GlassFish, I receive the exception HTTP 404.

What can I do?

Thanks for all.
9 years ago
I solve this calling to my ISP. They tell me what the public IP is not really public, then they change my configuration and now I have a public and fixed IP and all works correctly.

Thanks of all.
9 years ago

Tim Holloway wrote:

Jose Juan wrote:

Tim Holloway wrote:
Need I open the ports also in the modem? May be that the problem?



Almost certainly. Since other machines on the LAN have no problem, that leaves the router.



Ok, what ports I need to open? Because I tomorrow call to the ISP and request to open the ports.

9 years ago

Tim Holloway wrote:Welcome to the JavaRanch, Jose! I'm not English, either!

It sounds like you've done most of what is necessary, except that you probably need to open up a firewall port for traffic coming into the router from outside. Since you're doing port forwarding, that would be ports 80 and 443, although for testing, port 8080 could be enabled as well.



Thanks for your reply.

How can I open the port mentioned? For testing, I disabled the firewall in the server.

I opened the ports you mentioned (80, 443 and 8080) in the Port Forwarding section of the router, but the result is the same, I can't view the web from outside the LAN.

Need I open the ports also in the modem? May be that the problem?
9 years ago
First of all, I'm not english so excuse me for the expressions.

I have a LAN with a static IP in each PC. I provides internet to this LAN with a Huawei MT882 modem. This modem it's connected to the router. The router is a Linksys WRT54G with a DD-WRT firmware.

In the machine which I try to mount the server, I installed JAVA SE and Tomcat 7.0, when I execute Tomcat, I can access to the Configuration Panel of this typing http://localhost:8080. Then, when I try to do this from another PC of the LAN, I type in the navigator http://<Private IP>:8080 and works correctly, I see the Configuration Panel.

But when I try to enter from another PC which isn't in the LAN, I type http://<Public IP>:8080 or http://<Public IP> but not works. In my router, I do Port Forwarding to the 8080 port puting the IP of the server, and I put the IP of the server in the DMZ section of the router, enabling this, but nothing.

What can I do?

Thanks.
9 years ago