Run JSP file in Android

by Billsen » Fri, 26 Sep 2008 07:06:25 GMT


Sponsored Links
 Hi,

I try to run jsp file in Android, just want print some string in
webpage with <%= "test" %>. However, nothing happens after execution.
No error occurs. Can Android run jsp file? If yes, how?

Thanks in advance,

Senshan
--~--~---------~--~----~------------~-------~--~----~



Run JSP file in Android

by Mark Murphy » Fri, 26 Sep 2008 07:15:57 GMT


 


Only if you supply some sort of JSP interpreter. I believe there are no 
template languages in Android, beyond the limited string-replacement 
system provided in stock Java's String.format() method.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Warescription: All titles, revisions, & ebook formats, just $35/year

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Run JSP file in Android

by Peterman » Fri, 26 Sep 2008 15:13:52 GMT


 I think that you only can view jsp'files with a web browser of
Android, but no if the jsp file was a application..





--~--~---------~--~----~------------~-------~--~----~



Run JSP file in Android

by Mauro » Fri, 26 Sep 2008 17:11:48 GMT


 JSP is a SERVER's technology. If you want to execute a JSP on an
Android powered phone you'll need a servlet/JSP container running ON
THE PHONE. Now, if you just want to SEE a JSP page on the phone, you
should have to setup a server (ie. Apache Tomcat) and browse the
server ip/web address using the phone's BROWSER.




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Simplify Media Equivalent

Does anyone know if there's and equivalent application to Simplify
Media for the Android platform?

http://www.simplifymedia.com/


--~--~---------~--~----~------------~-------~--~----~

2. Android application trying out rss feed read using Rome. Getting exception ExceptionInInitializerError

Hello All,
I am trying to write some test code to receive RSS feeds. I am using the
ROME api's. But I am getting a exception when executing the following line
of code
  SyndFeed feed = new SyndFeedInput().build(reader);
I googled this exception and found the following. I dont know if thats
helpful or not. Please advice me on my next steps.
"Ok, I figured it out after traversing through the Rome code.
ClassLoader isn't supported by Android's DalvikVM. Is there an
implementation of this project that doesn't use ClassLoader?"
*Exception Stack*
Thread [<3> main] (Suspended (exception ExceptionInInitializerError))
 SyndFeedInput.build(Reader) line: 123
 MainActivity.onCreate(Bundle) line: 42
 Instrumentation.callActivityOnCreate(Activity, Bundle) line: 1123
 ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord) line:
2231
 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord) line:
2284
 ActivityThread.access$1800(ActivityThread, ActivityThread$ActivityRecord)
line: 112
 ActivityThread$H.handleMessage(Message) line: 1692
 ActivityThread$H(Handler).dispatchMessage(Message) line: 99
 Looper.loop() line: 123
 ActivityThread.main(String[]) line: 3948
 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean)
line: not available [native method]
 Method.invoke(Object, Object...) line: 521
 ZygoteInit$MethodAndArgsCaller.run() line: 782
 ZygoteInit.main(String[]) line: 540
 NativeStart.main(String[]) line: not available [native method]


*Code*

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;

import android.app.Activity;
import android.os.Bundle;
import com.sun.syndication.*;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;

public class MainActivity extends Activity
{
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  URL url;
  try
  {
  url = new URL("http://viralpatel.net/blogs/feed");
  }
  catch (MalformedURLException e1)
  {
  // TODO Auto-generated catch block
  e1.printStackTrace();
  return ;
  }
  XmlReader reader = null;

  try
  {
  reader = new XmlReader(url);
  SyndFeed feed = new SyndFeedInput().build(reader);
  System.out.println("Feed Title: "+ feed.getAuthor());
  for (Iterator i = feed.getEntries().iterator(); i.hasNext();)
  {
  SyndEntry entry = (SyndEntry) i.next();
  System.out.println(entry.getTitle());
  }
  }
  catch (IllegalArgumentException e)
  {
  e.printStackTrace();
  }
  catch (FeedException e)
  {
  e.printStackTrace() ;
  }
  catch (IOException e)
  {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }
  /*finally
  {
  if (reader != null)
  try
  {
  reader.close();
  } catch (IOException e)
  {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }
  } */
  }
}

--~--~---------~--~----~------------~-------~--~----~

3. Using maps in Android application

4. Problem with tutorials.

5. bug displaying gps coordinates

6. password mode

7. Strange ListView loading problems