Search Results

Search found 696 results on 28 pages for 'servlets'.

Page 17/28 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Table changes depending on dropdown list values with servlet

    - by kawtousse
    What I want to realize is the following: In a JSP x I have a 3 dropdownlists and a button called edit when user click this button a table dynamically should be displayed. Now this table is modified correponding the values in those 3 dropdownlists. So it can be 3 cols or 4 cols or even 6 cols, it depends on the selected values. So what I tried is to use the servlet to getParameter doing the if clause construct the html and then forward the response. Have you any the suggestion of the structure that I can use in JSP? Thank you.

    Read the article

  • deploying project to tomcat ROOT

    - by stsd
    I have deployed my project to tomcat root, and it works fine without any problem. To acheive this I created a ROOT file TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml with content below: <Context docBase="/home/user/project.war" path="" reloadable="true" /> So right now I can see my project under localhost:8080/ without any problem.. but I don't know where my project has been extracted, there is even no ROOT directory under TOMCAT_HOME/webapps, any idea?

    Read the article

  • How to add response headers based on Content-type; getting Content-type before the response is commi

    - by Bozho
    I want to set the Expires header for all image/* and text/css. I'm doing this in a Filter. However: before calling chain.doFilter(..) the Content-type is not yet "realized" after calling chain.doFilter(..) the Content-type is set, but so is content-length, which forbids adding new headers (at least in Tomcat implementation) I can use the extensions of the requested resource, but since some of the css files are generated by richfaces by taking them from inside jar-files, the name of the file isn't x.css, but is /xx/yy/zz.xcss/DATB/.... So, is there a way to get the Content-type before the response is committed.

    Read the article

  • servlet stops working with tomcat server after some hits or time

    - by nekin
    hi all i have very strange issue with some of my servlet. below is my configuration Folder A is having X number os servelet deployed in tomcat directory Folder B is having Y number of servelet deployed in tomcat directory. now after certain amount of time or hits to any of the servelet in Folder B is stops working properly, whereas at same time All servelet of Folder A works fine i am not able to trace where i am doing mistake all coding for both folder's servelet is same only difference is they are with different dB, but it is very simple read only operation with dB though. any idea ? thks

    Read the article

  • How do I refer to a client_deploy.wsdd file that's in WEB-INF?

    - by Paul
    A basic question, but I can't seem to find the answer. I have an Axis-generated web service that also calls another web service (for which the stubs are also generated with Axis). It's deployed in weblogic 9.2 That called web service requires authentication. I've googled for the code to set up authentication. It requires that I set up a client_deploy.wsdd file which I've done, and added it to WEB-INF. I need to specify this flle to Axis. There seem to be several ways of doing this, including System.setProperty("axis.ClientConfigFile", "client_deploy.wsdd") or EngineConfiguration config = new FileProvider("client_deploy.wsdd"); but these aren't working for me. Is the issue the path for the client_deploy.wsdd file? How do I refer to a file that's at the top level of the WEB-INF directory? Googling tells me how to access it as a stream, but I don't want that, I need to pass a file name to these functions... Please point out the obvious that I have missed

    Read the article

  • How can I get an image too big from a server?

    - by Daniel Calderon Mori
    I'm currenty developing for blackberry and just bumped into this problem as i was trying to download an image from a server. The servlet which the device communicates with is working correctly, as I have made a number of tests for it. But it gives me the 413 HTTP error ("Request entity too large"). I figure i will just get the bytes, uhm, portion by portion. How can i accomplish this? This is the code of the servlet (the doGet() method): try { ImageIcon imageIcon = new ImageIcon("c:\\Users\\dcalderon\\prueba.png"); Image image = imageIcon.getImage(); PngEncoder pngEncoder = new PngEncoder(image, true); output.write(pngEncoder.pngEncode()); } finally { output.close(); } Thanks. It's worth mentioning that I am developing both the client-side and the server-side.

    Read the article

  • Hiding java package structure in url

    - by user179056
    Hello, Our current web application url reveals the class package structure to the end user. This is because in web.xml the servlet mapping tag is as follows Servlet_ name /servlet/com.xxx.yyy.ClassName Is there any way by which i can hide the package structure. i.e com.xxx.yyy.ClassName to just ClassName? Thanks Sameer

    Read the article

  • How to explicitly terminate http connection from server with no response header

    - by Gagandip
    I am developing a server simulator for one of my client application. I am using GlassFish server. I have to simulate a http connection terminate condition in my server application. Is there a way by which I can explicitly terminate a connection from server side such that client does not receive any response header. Currently I have tried many options like closing the response outputStream. But in every case a http 200 OK message is delivered to the client application. I would like to consume the http-request and do not want to return anything to the client. I am using a simple conrtroller servlet and had overridden doGet() and doPost() functions.

    Read the article

  • How can I find out a servlet's URL?

    - by Geo
    Let's say I have this in my web.xml: <servlet> <description></description> <display-name>MainServ</display-name> <servlet-name>MainServ</servlet-name> <servlet-class>MainServ</servlet-class> </servlet> <servlet-mapping> <servlet-name>MainServ</servlet-name> <url-pattern>/MainServ</url-pattern> </servlet-mapping> Imagine I'm in that servlet's doGet method. Is there anyway of getting at the /MainServ value?

    Read the article

  • FileNotFound exception

    - by Pratik
    I am trying to read a file in a servlet. I am using eclipse IDE. I get a FileNotFoundException if I provide relative file name. List<String> ls=new ArrayList<String>(); Scanner input = new Scanner(new File("Input.txt")); while(input.hasNextLine()) { ls.add(input.nextLine()); } The same code works if I put the absolute path like this: Scanner input = new Scanner(new File("F:/Spring and other stuff/AjaxDemo/src/com/pdd/ajax/Input.txt")); The Java file and text file are there in the same folder. Does it searches text file in some other folder ?

    Read the article

  • errorPage directive works, but error-page in web.xml doesn't?

    - by danb
    I get jsp exceptions causing a forward to my error page when I put this at the top of my JSPs... <%@ page errorPage="/error.page" %> but when I try to do it globally with web.xml like so: <error-page> <exception-type>java.lang.Throwable</exception-type> <location>/error.page</location> </error-page> I just get a blank page... I've also tried putting /error.jsp in the location element.. but no love with that either.. I am triggering an exception with a jsp that just contains this: <%if(true)throw new RuntimeException("test exception");%> I do see the exception in the console from tomcat but I just can't get that error page to show without a directive on every jsp... am I missing something simple here?

    Read the article

  • receiving OPTIONS instead of GET requests?

    - by Urs
    Hi, all I want to achieve is to implement a servlet providing a json feed for my fullcalendar application. When I inspect http://arshaw.com/js/fullcalendar/examples/json.html with Bugzilla, I see that GET-requests are sent to receive the json feed. However, when I use this example within my scenario, fullcalendar seems to send OPTIONS-requests. The only difference is that I replaced "events: "json-events.php" with "http://localhost:8080/CalendarServletTest/HelloWorldServlet" (the url of my servlet). What do I miss? or is this really a bug?

    Read the article

  • Does a servlet knows the encoding of the sent form that specified using http-equiv?

    - by Daziplqa
    Does a servlet knows the encoding of the sent form that specified using http-equiv? When I specify an encoding of a POSTed form using http-equiv like that: <HTML> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312'/> </head> <BODY > <form name="form" method="post" > <input type="text" name="v_rcvname" value="????"> </form> </BODY> </HTML> And then at the servlet I use the method, request.getCharacterEncoding() I got null ! So, Is there a way that I can tell the server that I am encoding the data in some char encoding??

    Read the article

  • ApplicationDispatcher exception

    - by JFB
    Whenever I try to redirect to a certain page using this dispatch method that is called from my doGet method, I get the following exception. I have no idea why! account controller servlet protected void dispatch(HttpServletRequest request, HttpServletResponse response, String page) throws javax.servlet.ServletException, java.io.IOException { RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(page); try { dispatcher.forward(request, response); } catch (java.lang.NullPointerException e) { System.out.println("NullPointerException: attribute expected in view"); } } Error msg java.lang.NullPointerException org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:430) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) java.lang.NullPointerException org.apache.jsp.content.edit_jsp._jspService(edit_jsp.java:109) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) controller.AccountController.dispatch(AccountController.java:91) controller.AccountController.doExecute(AccountController.java:72) controller.AccountController.doGet(AccountController.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    Read the article

  • Writing to a file in a servlet

    - by ankur verma
    I am working in a servlet and has this code : public void doPost(blah blah){ response.setContentType("text/html"); String datasent = request.getParameter("dataSent"); System.out.println(datasent); try{ FileWriter writer = new FileWriter("C:/xyz.txt"); writer.write("hello"); System.out.println("I wrote"); }catch(Exception ex){ ex.printStackTrace(); } response.getWriter().write("I am from server"); } But everytime it is throwing an error saying Access Denied.. Even when there is no lock on that file and there is no file whose name is C:/xyz.txt what should I do? ;( java.io.FileNotFoundException: C:\xyz.txt (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:212) at java.io.FileOutputStream.<init>(FileOutputStream.java:104) at java.io.FileWriter.<init>(FileWriter.java:63) at test.TestServlet.doPost(TestServlet.java:49) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:237) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)

    Read the article

  • Call an external web service from a servlet

    - by pAkY88
    Hi, I'm developing a servlet that gets a name of a web service and could be forward the request to an external web service, for example: "http://www.webservice.com/..." I have build a response wrapper that intercept response output but I can't forward request to an external web service, it works only if I redirect the request to a servlet that is on same server. Example: request.getRequestDispatcher("aMyServlet").forward(request, response) IT WORKS request.getRequestDispatcher("http://www.webservice.com/...").forward(request, response) IT DON'T WORKS because Tomcat search "http://www.webservice.com/..." on the server as a local resource. How can I do external request? Thanks

    Read the article

  • How to define a url not found servlet mapping in web.xml?

    - by user246114
    Hi, I have a web app, I want to define my index.jsp file to be shown when the entered url is like: www.mysite.com www.mysite.com/ www.mysite.com/index.jsp but if any other url is entered, like: wwww.mysite.com/g I want a particular servlet to handle the request. In my web.xml file, I am doing this: <servlet> <servlet-name>ServletCore</servlet-name> <servlet-class>com.me.test.ServletCore</servlet-class> </servlet> <servlet-mapping> <servlet-name>ServletCore</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> so that is letting the ServletCore servlet pick up any url, but as expected it is taking over even the: www.mysite.com/index.jsp type urls. How can I define it in such a way to work how I want? Thank you

    Read the article

  • can we do getwriter and forward in a single servlet

    - by karanits
    Lets say my form called a servlet. I would do some processing in it. In the servlet i want to print something on the page. for that i used PrintWriter out=response.getWriter(); out.println("some text here"); then further in the servlet i did some more form processing which works fine and after that i want the servlet to be forwarded to a jsp page. For this i used RequestDispatcher rd = request.getRequestDispatcher("/somepage.jsp"); rd.forward(request, response); the problem comes here. the text some text here gets printed, but the servlet doesn't forward request to the jsp page, as if the code doesn't run.

    Read the article

  • JBoss 5.1.0 (JSF/Seam) cookies blowing up with accented characters

    - by user283680
    I cannot see this behavior in JBoss 4.2.3. If I try to call addCookie() on HttpServletResponse and my cookie value has accented characters in it (ex. ç) I get this exception: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value Does anyone know what change in JBoss 5.1.0 could be causing these problems?

    Read the article

  • How do I reload servlet classes without restarting my web application?

    - by Ramon
    I want to reload just my web layer classes without reloading my service layer classes (which take longer to initialize and change less frequently). There are no references from my service layer into the web layer and I can create a whole new instance of the web layer without problems. I can conceive of a solution involving complicated class-loader tricks to isolate the web layer in its own class-loader and I think this is probably the only way to do this so what I'm asking is, is there a library out there which does this? I know about JavaRebel - I don't need that much power and I'm really looking for a more lightweight free solution.

    Read the article

  • Need a design approach or suggestion for a simple structure using Servlet.

    - by akshay
    Hi I have to design such that whenever user pass a query I process it using servlet and then call the js page to draw the chart 1 user writes a query on a page 2 the page call the servelt class public class MyServlet extends Httpservlet implements DataSourceServlet {..... return data The user see a beautiful string like this.. google.visualization.Query.setResponse......... /Tiger'},{v:80.0}, {v:false}]}]}}); 3 when the user hits on different html page myhtml.js it draws the chart. I want the Myservlet class itself call the myhtml.js page and draw the chart directly. and want to eliminate the beautiful string google.visualization.Query.setResponse......... /Tiger'},{v:80.0}, {v:false}]}]}}); from coming on user's browser What should i do? I tried using functions to call another page like request dispatcher(), redirect() calling myhtml.js page directly after myservlet process the query results. But i get the result like this google.visualization.Query.setResponse......... /Tiger'},{v:80.0}, {v:false}]}]}}); and the entire myhtml.js code page below it on the browsers that to without the chart been draw. Is there anyway to element the beautiful string from coming on clients browser and only show them the chart been drawn ? :) This is the small tutorial i am following http://code.google.com/apis/visualization/documentation/dev/dsl_get_started.html

    Read the article

  • Create servlet from existing Java project

    - by user69514
    I have a Java Swing project for my class. I would like put it on my website so people can use it. However I'm not sure if there is a way to turn it into a servlet. Or do I need to know JavaScript? I'm confused. Is there a way to make my swing application into a servlet automatically?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >