Search Results

Search found 1589 results on 64 pages for 'servlet'.

Page 51/64 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • JAXWS and sessions

    - by Pace
    I'm fairly new to writing web services. I'm working on a SOAP service using JAXWS. I'd like to be able to have users log-in and in my service know which user is issuing a command. In other words, have some session handling. One way I've seen to do this is to use cookies and access the HTTP layer from my web service. However, this puts a dependency on using HTTP as the transport layer (I'm aware HTTP is almost always the transport layer but I'm a purist). Is there a better approach which keeps the service layer unaware of the transport layer? Is there some way I can accomplish this with servlet filters? I'd like the answer to be as framework agnostic as possible.

    Read the article

  • Reverse proxy for Tomcat

    - by aauser
    I got following infrastructure. Site A - Tomcat. Can be access by url www.sitea.com Site B - php backend( or probably it will be just static html pages ). Can't be access directly. I want to forward all request comming to www.sitea.com/doforward/... (Tomcat) to php backend. And all other requests with other urls should be handled by Tomcat itself. I know i can add another web server in front of tomcat, for example nginx, and based on url forward request to php backed or tomcat backend. But i want tomcat to serve requests itself and forward it to another backend. Probably there are ready implementations for servlet containers like mod_proxy for apache. Thank you

    Read the article

  • What are the pro and cons of having localization files vs hard coded variables in source code?

    - by corgrath
    Definitions: Files: Having the localization phrases stored in a physical file that gets read at application start-up and the phrases are stored in the memory to be accessed via util-methods. The phrases are stored in key-value format. One file per language. Variables: The localization texts are stored as hard code variables in the application's source code. The variables are complex data types and depending on the current language, the appropriate phrase is returned. Background: The application is a Java Servlet and the developers use Eclipse as their primary IDE. Some brief pro and cons: Since Eclipse is use, tracking and finding unused localizations are easier when they are saved as variables, compared to having them in a file. However the application's source code becomes bigger and bloated. What are the pro and cons of having localization text in files versus hard coded varibles in source code? What do you do and why?

    Read the article

  • Configuration for log4j to log ERROR level to a DB table

    - by firnnauriel
    Using the default config of a fresh Grails project, how do i change it so that ONLY error level messages will go to 'Message' table? // log4j configuration log4j = { // Example of changing the log pattern for the default console // appender: // //appenders { // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') //} error 'org.codehaus.groovy.grails.web.servlet', // controllers 'org.codehaus.groovy.grails.web.pages', // GSP 'org.codehaus.groovy.grails.web.sitemesh', // layouts 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping 'org.codehaus.groovy.grails.web.mapping', // URL mapping 'org.codehaus.groovy.grails.commons', // core / classloading 'org.codehaus.groovy.grails.plugins', // plugins 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration 'org.springframework', 'org.hibernate', 'net.sf.ehcache.hibernate' warn 'org.mortbay.log' } Thanks for any leads on this.

    Read the article

  • AJAX server calls on a JSF-centric app

    - by Konrad Garus
    I'm building a JSF 2 application. I wanted to integrate it with jQuery, e.g.: $.getJSON(contextPath + '/something', function(data) { // ... }); I need contextPath/something to return data in JSON. How can I do it? I know I can assign another servlet to this URL, but this approach does not seem to scale well. One could use a more scalable approach with a front end controller (e.g. Spring Web MVC), but I really wanted to write this in Java Enterprise stack. What other options are there?

    Read the article

  • Issue in configuring JPA with Spring 3 in Jboss 4.2.2 server.

    - by KVMKReddy
    Hi, I am facing issues in configuring JPA with Spring 3 in JBoss 4.2.2 server. Please find the below file of persistence.xml. <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="TestPU"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/TestDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/> <property name="hibernate.show_sql" value="true"/> </properties> </persistence-unit> </persistence> My spring-beans.xml is as below <bean id="MyAdvise" class=".......Aspect"> <property name="persister"> <bean id="dbPersister" class="..............DataBasePersister"> </bean> </property> </bean> <bean id="localContainerEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true"/> <property name="database" value="ORACLE"/> </bean> </property> <property name="jpaProperties"> <props> <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</prop> </props> </property> </bean> <bean id="myTxManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="localContainerEntityManagerFactory"/> </bean> <tx:annotation-driven transaction-manager="myTxManager" /> My persister bean is as follows. public class DataBasePersister implements IPersister { private static Logger log = Logger.getLogger(DataBasePersister.class); // The Entity Manager @PersistenceContext protected EntityManager entityManager; @Transactional(readOnly = false) public void persist(Object data) { log.info("IN persist() call. Is the data can castable to MethodStats -->:"+(data instanceof MethodStats)); log.info("Entity Manager instance -->:"+(entityManager)); ---------------------- ---------------------- ---------------------- } } I am getting the following exception when the spring container creating my persister bean org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: JTA EntityManager cannot access a transactions at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy147.getTransaction(Unknown Source) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy141.persist(Unknown Source) at com.adp.sbs.aop.aspectj.SBSMethodStatsCollectorAspect.doAround(SBSMethodStatsCollectorAspect.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.adp.sbs.aop.test.TestMethodLevelAnnotationStats$$EnhancerByCGLIB$$efbc78a8.MethodWithOneParamsAndReturnTypeAsString(<generated>) at com.adp.sbs.aop.test.SimpleTestServlet.testMethodAnnotations(SimpleTestServlet.java:46) at com.adp.sbs.aop.test.SimpleTestServlet.doPost(SimpleTestServlet.java:40) at com.adp.sbs.aop.test.SimpleTestServlet.doGet(SimpleTestServlet.java:33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalStateException: JTA EntityManager cannot access a transactions at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:316) at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57) at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332) Can you somebody please suggest me how to resolve this.

    Read the article

  • Chronoscope with GWT - ChronoscopeBrowserInjector binding failed

    - by Gknee
    I want to use Timepedia Chronoscope (http://code.google.com/p/gwt-chronoscope/) in my GWT application. I have all the configuration like shown on chronoscope project site: chronoscope-1.0.jar in gwt-2.0.x applications: gwt-user-2.0.x and gwt-servlet-2.0.x chronoscope-api-1.0.jar gwtexporter-2.0.10.jar gin-1.0.jar I've inherited chornoscope module. I get the error from gwt plugin to eclipse that looks like that: java.lang.RuntimeException: Deferred binding failed for 'org.timepedia.chronoscope.client.browser.Chronoscope$ChronoscopeBrowserInjector' (did you forget to inherit a required module?) Can you help me?

    Read the article

  • Struts Tiles application

    - by rav83
    Am trying a tiles application.Below is my code tiles-defs.xml </tiles-definitions> <definition name="${YOUR_DEFINITION_HERE}"> </definition> <definition name="commonPage" path="/jsps/template.jsp"> <put name="header" value="/jsps/header.jsp" /> <put name="menu" value="/jsps/menu.jsp" /> <put name="body" value="/jsps/homebody.jsp" /> <put name="footer" value="/jsps/footer.jsp" /> </definition> <definition name="aboutUsPage" extends="commonPage"> <put name="body" value="/jsps/aboutUsBody.jsp" /> </definition> </tiles-definitions> struts-config.xml <action path="/aboutus" type="java.com.mbest.core.action.AboutUsAction" parameter="method"> <forward name="success" path="aboutUsPage"/> <forward name="failure" path="aboutUsPage"/> </action> </action-mappings> template.jsp <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <head><title></title></head> <body> <table border="1" cellspacing="0" cellpadding="0" style="width: 98%; height: 100%"> <tr> <td colspan="2"> <tiles:insert attribute="header"/> </td> </tr> <tr style="height: 500px"> <td valign="top" style="width: 200px"> <tiles:insert attribute="menu"/> </td> <td valign="baseline" align="left"> <tiles:insert attribute="body"/> </tr> <tr> <td colspan="2"> <tiles:insert attribute="footer"/> </td> </tr> </table> </body> </html> homebody.jsp <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <head> <title></title> <style type="text/css"> <%@include file="../css/helper.css"%> <%@include file="../css/dropdown.css" %> <%@include file="../css/default.ultimate.css" %> </style> </head> <body> <div id="header"> <ul id="nav" class="dropdown dropdown-horizontal"> <li><span class="dir"><html:link page="/aboutus.do?method=aboutUsPage" >About Us</html:link></span></li> <li><span class="dir"><a href="./">Products</a></span></li> <li><span class="dir"><a href="./">Infrastructure</a></span></li> <li><span class="dir"><a href="./">Pharmaceutical Formulations</a></span></li> <li><span class="dir"><a href="./">Contact Us</a></span></li> </ul> </div> </body> </html> AboutUsAction.java package java.com.mindbest.core.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.actions.DispatchAction; public class AboutUsAction extends DispatchAction { public ActionForward aboutUsPage(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response)throws Exception { return mapping.findForward("success"); } } aboutUsBody.jsp hello In my above code if i try to access the app using (domainname)/example/aboutus.do its giving 500 error.Can anyone help me figure this out?

    Read the article

  • deploying a simple html website with eclipse EE & tomcat 7 & router for pc not in LAN

    - by hawkeye
    Hello everyone and thanks for your time, first of all - I want to make a note - I can see the website from my own pc which is the only one connected to the (netgear dgn1000) router, and I can do so with several browsers on my pc, but - when I try and do a port forwarding so that I could access this simple html file (which in the way would use a simple servlet class) I can't seem to view it I have configured my router (both the "services" and the "firewall" sections), and I have also changed my LAN properties according to my ISP's explanation (via phone) : instead of choosing the "obtain an IP address automatically" I have chosen the "use the following IP address, with IP address of 10.0.0.1 (this was also set in the router's port forwarding), Subnet mask of 255.255.255.0, default gateway by checking the same value as seen in the cmd when executing the command ipconfig /all after doing so I've changed the DNS to use the address (just the preferred and not the alternate one) given with the ipconfig /all and still - nothing :/ is it something in my network settings or in my deployment of the eclipse/tomcat ? any help would be greatly appreciated, thanks :)

    Read the article

  • Spring MVC with several configurations

    - by Michael Bulla
    Hello, for my spring-mvc application I created several types of configuration (unittest, integration, qa, production). All the configs are in one war-file, so there is only one type of application I create. Which configuration to take should be decided by the server, where the application is running. To decide what kind of configuration should be used, I have to look into a file. After that I can decide which configuration should be used by spring mvc. For now by convention there is always the -servlet.xml used. Is there a way how to decide dynamically which config to take? Regards, Michael

    Read the article

  • Google App Engine PersistenceManager can process multiple objects ?

    - by Frank
    I have some code like this : PersistenceManager pm=PMF.get().getPersistenceManager(); String query="select from "+PayPal_Message.class.getName()+" where processed == false order by time desc"; List<PayPal_Message> messages=(List<PayPal_Message>)pm.newQuery(query).execute(); if (messages.isEmpty()) { } else { for (PayPal_Message g : messages) { Contact_Info_Entry A_Contact_Entry=Process_PayPal_Message_To_Get_A_License(g.getContent().getValue()); pm=PMF.get().getPersistenceManager(); try { pm.makePersistent(A_Contact_Entry); g.setProcessed(true); pm.makePersistent(g); } catch (Exception e) { Send_Email(Email_From,"[email protected]","Servlet Error Message [ "+time+" ]",new Text(e.toString())); } // finally { pm.close(); } } } pm.close(); I wonder if it's ok to use the pm above to process multiple objects before closing it. Or do I have to get and close pm for processing each object ?

    Read the article

  • In Spring MVC (2.0) how can you easily hook multiple pages/urls to use 1 controller?

    - by danny
    <!--dispatcher file--> <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/foo/bar/baz/boz_a.html">bozController</prop> </props> </property> </bean> <!--mappings file--> <bean id="bozController" class="com.mycompany.foo.bar.baz.BozController"> <property name="viewPathA" value="foo/bar/baz/boz_a" /> <property name="viewPathB" value="foo/bar/baz/boz_b" /> ... <property name="viewPathZ" value="foo/bar/baz/boz_z" /> </bean> how do I set it up so that when the user loads page boz_w.html it uses the bozController, and sets the viewPath to use boz_w.jsp?

    Read the article

  • How to pass values from client side to server side ?

    - by manojp1988
    Hi All, I got a situation to transfer values from jsp to servlet's action class. Previously we did it using <input type="hidden" id="name" value="manoj" /> we take this value in action class by request.getParameter("name"). But now we couldn't pass value like "Hi\n i am\n Manoj". Since it has new line included in the string we couldn't take it like this to action. So how I can take value like this to action or is there any way other than hidden input? Thanks .

    Read the article

  • How to know file type without extension

    - by Ayusman
    While trying to come-up with a servlet based application to read files and manipulate them (image type conversion) here is a question that came up to me: Is it possible to inspect a file content and know the filetype? Is there a standard that specifies that each file MUST provide some type of marker in their content so that the application will not have to rely on the file extension constraints? Consider an application scenario: I am creating an application that will be able to convert different file formats to a set of output formats. Say user uploads an PDF, my application can suggest that the possible conversion formats are microsoft word or TIFF or JPEG etc. As my application will gradually support different file formats (over a period of time), I want my application to inspect the input file instead of having the user to specify the format. And suggest to user the possible formats of output. I understand this is an open ended, broad question. Please let me know if it needs to be modified. Thanks, Ayusman

    Read the article

  • What are unused/undeclared dependencies in maven ? What to do with them ?

    - by b7kich
    Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared ? What should I do about them ? Example: $ mvn dependency:analyze ... [WARNING] Used undeclared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.5.0:provided [WARNING] commons-logging:commons-logging:jar:1.1.1:compile [WARNING] commons-dbutils:commons-dbutils:jar:1.1-osgi:provided [WARNING] org.codehaus.jackson:jackson-core-asl:jar:1.6.1:compile ... [WARNING] Unused declared dependencies found: [WARNING] commons-cli:commons-cli:jar:1.0:compile [WARNING] org.mortbay.jetty:servlet-api:jar:2.5-20081211:test [WARNING] org.apache.httpcomponents:httpclient:jar:4.0-alpha4:compile [WARNING] commons-collections:commons-collections:jar:3.2:provided [WARNING] javax.mail:mail:jar:1.4:provided Note: A lot of these dependencies are used in my runtime container and I declared them as provided to avoid having same library on the classpath twice with different versions.

    Read the article

  • how to start stop tomcat server using CMD?

    - by ali
    i set the path for the tomcat and set all variables like 1.JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_22 2.CATALINA_HOME=G:\springwork\server\apache-tomcat-6.0.29 3.CLASSPATH=G:\springwork\server\apache-tomcat-6.0.29\lib\servlet-api.jar;G:\springwork\server\apache-tomcat-6.0.29\lib\jsp-api.jar;.; when i go to bin folder and double click on startup.bat then my tomcat start and when i double click on shutdown.bat tomcat is stop. But I want using CMD start and stop the tomcat. And in any folder i write command startup.bat the server will start and when i write the server will stop...... Thanks in advace..........

    Read the article

  • Spring configuration in GWT Project?

    - by Firstthumb
    I am developing a GWT-Spring-Hibernate project and I want to use Spring Autowired annotation in GWT Service Servlet but my autowired annotated service is not injected. it is null. Is there a configuration detail that I missed? I add <context:annotation-config /> <context:component-scan base-package="com.org" /> to my ApplicationContext.xml and I have annotated my service as @Service("myService") @Autowired MyService myService; // This is null so WHY?

    Read the article

  • Maven 2: How to package current project version in a WAR file?

    - by Tom van Zummeren
    I am using Maven 2 to build my Java project and I am looking for a way to present the current version number of the pom.xml to the user (using a Servlet or JSP for example). As far as I can see, the best way would be that Maven packages the version number as a text file into the WAR. This allows me to read the version from that file and present it the way I want. Does anyone know of a plugin that can do something like that for me? Maybe the WAR plugin can be configured to do so? Or maybe using some other approach all together?

    Read the article

  • Redirect into two different page after login.jsp according user category

    - by Ryon
    I have created a login.jsp with some login username and password. Users are categorized into A and B. Then I have to redirect each user according to the user category. I also need to retrieve the username in the next page. My form in login.jsp page is something like this: <form method="POST" action='<%= response.encodeURL("j_security_check") %>' Do I have to use javax.servlet.Filter? what should be added in web.xml? Anyone had an idea how to do it?

    Read the article

  • reading html from an inputstream java

    - by randeel wimalagunarathne
    hello everyone, I am reading a html file using an inputstream from a java servlet. But the contents of the original and the read one are in a different format although when displayed in a web browser they are the same. These are the two links for the html files after reading output http://www.fileflyer.com/view/gQREGAe orginal output http://www.fileflyer.com/view/mWXHVAE Is there a way to get the original html when reading? why is this happening? my java code is as follows; InputStreamReader isr = new InputStreamReader(inputStream); BufferedReader br = new BufferedReader(isr); String line = null; while ( (line = br.readLine()) != null) { System.out.println(line); } Any help would be greatly appreciated!! Thank you, rana.

    Read the article

  • Extracting startup errors from Spring contexts

    - by sehugg
    Consider the following output from a Tomcat server under Eclipse: INFO: Initializing Coyote HTTP/1.1 on http-8080 INFO: Initialization processed in 634 ms INFO: Starting service Catalina INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 SEVERE: Error listenerStart SEVERE: Context [/MyServlet] startup failed due to previous errors I would like to figure out what exception caused "Error listenerStart", but Spring seems to be preventing me from finding the error via Eclipse. I'd love to start Catalina manually, but that doesn't seem to do anything. What's the best way to find the hidden exception? I'm not afraid to use torture methods.

    Read the article

  • How to write web services in java

    - by gurupriyan.e
    Though this might appear as a duplicate of Java Web Services , I would like to know Where to start and to continue.In the past, I have invested so much of time to find where to start but I wasn't able to. There are so many jargons and chaos (at least for me!) while reading the pages about web services. There are so many terms - like JAX-RPC, JAX-WS, Axis, Rest, Servlet as WebService, EJB's as Web Service and other terms that I don't know. Can this User group consolidate and give a highlevel overview of Java Web Services which is easy to understand and follow? I appreciate your kindness and thanks for your help.

    Read the article

  • Printing UTF-16 strings in JSP is outputted as HTML encoding (&#xxxx)

    - by Ori Osherov
    Hello, When I try to print a UTF-16 string in JSP, specifically Hebrew, it ends up showing up as HTML encoding (&#xxxx). This problem occurs because I print an array of variables into the web page and then parse them. The variables are all UTF-16 strings, but once the servlet prints the variables, it becomes translated to HTML encoding. Is there any way to get rid of the encoding? Thanks in advance Edit for a bit more background: The JSP that I'm printing is not the entirety of the page. It's used in a manner I don't quite understand by a server app which prints the JSPs output into its built in page. As a result, I can't, for instance, use a tag because the will have already been placed somewhere else. This isn't a frame or anything like that. It's just redirected output.

    Read the article

  • What is the preferred way of loading browser-specific CSS files?

    - by Yuval A
    What is the best way to handle browser-specific CSS file loading? Assume you are running in the context of a proper MVC framework. Here are some options, you are free to discuss the pros and cons of these options as well as any other methods you know of, and prefer: Server-side solution: use the controller (e.g. servlet) to analyze the user-agent header in the request and return the proper CSS file in the view. Use browser specific hacks to load files, such as: <!--[if IE]> ... <![endif]--> Load CSS files asynchronously in client side by inspecting user-agent and adding respective files Use a client side framework to handle browser-specifics (such as jQuery browser-specific css rules)

    Read the article

  • Add HttpOnly flag to cookies on the fly with Apache?

    - by Zack
    So I have a java webapp that uses tomcat with an apache proxy layer. I'm looking to make all cookies set from the app have the httpOnly flag. The problem with this is that tomcat is responsible for setting the flag from the application side and its default (in servlet api 2.5) is false. I was hoping I could set this flag for all cookies on the fly using apache. I've been trying different combinations and the closest I have gotten is setting the last cookie passed to httpOnly which is of course wrong: Header append Set-Cookie "; HttpOnly" I have no way of knowing what cookies/values are going to be passed from the app. Is this even possible?

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >