File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes passing parameter to a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "passing parameter to a servlet" Watch "passing parameter to a servlet" New topic
Author

passing parameter to a servlet

Delmiro Costa
Greenhorn

Joined: Jul 24, 2005
Posts: 8
There is some other way to pass a large string to servlet, but not included in the url, today I have the following code:

http://localhost:8084/Home/Home?name=File&result=" + parameter.trim();

But the problem is the string parameter is too long, so I am getting an error.

I know this is a basic question, I am apologise, I am just a begginer on this matter.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Create a form with a hidden parameter for the string and submit it to the servlet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Bear Bibeault:
Create a form with a hidden parameter for the string and submit it to the servlet.


METHOD="POST"


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

Oh, yeah. Don't forget that. (Thanks Ben).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passing parameter to a servlet